*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #2a0b0b;
  --muted: #6e4545;
  --line: #f1d9d5;
  --violet: #9c1010; 
  --coral: #e0452f;
  --amber: #ffc2b8; 
  --grad: linear-gradient(135deg, var(--violet), var(--coral));
  --shadow: 0 10px 30px rgba(156, 16, 16, 0.12);
  --shadow-hover: 0 18px 40px rgba(156, 16, 16, 0.28);
  --font: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-script: "Segoe Script", "Brush Script MT", cursive;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Dasar (mobile-first) ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--font);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 {
  font-size: 2.2rem;
  font-weight: 800;
}
h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}
h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 5px;
  margin-top: 0.6rem;
  border-radius: 99px;
  background: var(--grad);
}
h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--violet);
  text-underline-offset: 0.2em;
}
a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: var(--violet);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 30;
  border-radius: 8px;
}
.skip-link:focus {
  top: 0.5rem;
}

/* ---------- Header kaca & navigasi (Flexbox) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-script);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}
.nav-list a {
  position: relative;
  display: block;
  padding: 0.3rem 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 99px;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease);
}
.nav-list a:hover {
  background: var(--violet);
  color: #fff;
}

/* ---------- Hero ---------- */
main {
  width: 100%;
}
.hero,
.section,
.site-footer {
  padding: 2.75rem 1.25rem;
}

.hero {
  position: relative;
  overflow: clip;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero::before {
  width: 18rem;
  height: 18rem;
  background: var(--violet);
  top: -6rem;
  right: -5rem;
}
.hero::after {
  width: 14rem;
  height: 14rem;
  background: var(--coral);
  bottom: -5rem;
  left: -4rem;
  animation-delay: -6s;
}
.hero > * {
  position: relative;
  z-index: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}
.hero-text > * {
  animation: rise 0.8s var(--ease) both;
}
.hero-text > :nth-child(2) {
  animation-delay: 0.1s;
}
.hero-text > :nth-child(3) {
  animation-delay: 0.2s;
}
.hero-text > :nth-child(4) {
  animation-delay: 0.3s;
}
.hero-text p:not(.badge) {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.badge::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 2s infinite;
}

.hero-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.hero-collage img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease);
  animation: float 6s ease-in-out infinite;
}
.hero-collage img:nth-child(1) {
  transform: rotate(-5deg);
}
.hero-collage img:nth-child(2) {
  transform: translateY(-1rem) rotate(2deg);
  animation-delay: -2s;
}
.hero-collage img:nth-child(3) {
  transform: rotate(6deg);
  animation-delay: -4s;
}
.hero-collage img:hover {
  transform: rotate(0) scale(1.08);
}

/* ---------- Tombol (Flexbox) ---------- */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(156, 16, 16, 0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--violet);
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.btn-secondary:hover {
  background: var(--violet);
  color: #fff;
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- Section ---------- */
.about-grid {
  display: grid;
  gap: 1.5rem;
}
.about-grid > p {
  color: var(--muted);
  font-size: 1.05rem;
}
.callout {
  padding: 1.5rem;
  border-radius: var(--radius);
  color: #fff;
  background: var(--grad);
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-hover);
  transition: transform 0.4s var(--ease);
}
.callout:hover {
  transform: rotate(-1.5deg) scale(1.02);
}
.callout-source {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
}

/* Galeri kartu (Grid auto-fit) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--violet);
}
.card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-bottom: 0.5rem;
  transition: transform 0.6s var(--ease);
}
.card:hover img {
  transform: scale(1.06);
}
.card p {
  color: var(--muted);
}
.card a {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
}
.card a:hover {
  text-decoration: underline;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.tag-list li {
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--line);
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.tag-list li:hover {
  background: var(--violet);
  color: #fff;
  transform: scale(1.08);
}

.cert-list {
  display: grid;
  gap: 0.85rem;
}
.cert-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--violet);
  border-radius: 12px;
  transition:
    transform 0.3s var(--ease),
    border-left-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.cert-list li:hover {
  transform: translateX(8px);
  border-left-color: var(--coral);
  box-shadow: var(--shadow);
}
.cert-list span {
  color: var(--muted);
  font-size: 0.95rem;
}

.section > p {
  color: var(--muted);
}
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease);
}
.contact-list a:hover {
  background: var(--violet);
  color: #fff;
  transform: translateY(-3px);
}
.contact-list img {
  transition: filter 0.25s var(--ease);
}
.contact-list a:hover img {
  filter: invert(1);
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.site-footer a {
  font-weight: 700;
}

/* ---------- Tema merah-putih pada hero ---------- */
.hero {
  background: var(--violet);
  color: #fff;
}
.hero::before {
  background: #fff;
  opacity: 0.16;
}
.hero::after {
  background: var(--coral);
  opacity: 0.6;
}
.hero-text p:not(.badge) {
  color: rgba(255, 255, 255, 0.88);
}
.hero .badge {
  color: var(--ink);
}
.hero .btn-primary {
  background: #fff;
  color: var(--violet);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.hero .btn-secondary {
  color: #fff;
  border-color: #fff;
}
.hero .btn-secondary:hover {
  background: #fff;
  color: var(--violet);
}
.hero a:focus-visible {
  outline-color: #fff;
}

/* ---------- Animasi ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}
@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(30px, 20px);
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 69, 47, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(224, 69, 47, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2.1rem;
  }
  .site-header {
    flex-direction: row;
    justify-content: space-between;
    padding-inline: 2rem;
  }
  .hero,
  .section,
  .site-footer {
    padding: 4rem 2rem;
  }
  .hero {
    grid-template-columns: 1.4fr 1fr;
  }
  .about-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
  }
  .cert-list li {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  h1 {
    font-size: 3.8rem;
  }
  .site-header {
    padding-inline: max(2rem, calc((100% - 1100px) / 2));
  }
  .hero,
  .section,
  .site-footer {
    padding-inline: max(2rem, calc((100% - 1100px) / 2));
  }
  .hero {
    padding-block: 6rem;
    gap: 4rem;
  }
  .section {
    padding-block: 5rem;
  }
  .card-grid {
    gap: 2rem;
  }
}
