/* =========================================================
   Barakallahu fii Umrik — Ibu Ema Fatmahwati
   TIM IT · PT Mandala Cahaya Sentosa
   ========================================================= */

:root {
  --ink: #071512;
  --forest: #0a2e28;
  --emerald: #0f5c4c;
  --teal: #1a8a78;
  --mint: #d8efe8;
  --gold: #c9a227;
  --gold-soft: #e8d59a;
  --ivory: #f3f7f5;
  --mist: rgba(243, 247, 245, 0.82);
  --line: rgba(201, 162, 39, 0.35);
  --shadow: 0 24px 60px rgba(7, 21, 18, 0.45);
  --display: "Cormorant Garamond", Georgia, serif;
  --arabic: "Amiri", "Times New Roman", serif;
  --body: "Sora", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--body);
  font-weight: 300;
  color: var(--ivory);
  background: var(--ink);
  overflow-x: hidden;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--gold-soft);
}

/* ---------- Loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(26, 138, 120, 0.35), transparent 55%),
    linear-gradient(160deg, #04110e 0%, #0a2e28 50%, #071512 100%);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__ornament {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.5rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: relative;
  animation: breathe 2.4s ease-in-out infinite;
}

.loader__ornament::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.45);
}

.loader__ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--gold);
}

.loader__brand {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.loader__arabic {
  font-family: var(--arabic);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--ivory);
}

.loader__hint {
  font-size: 0.8rem;
  color: rgba(243, 247, 245, 0.55);
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ---------- Ambient particles ---------- */

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-soft);
  opacity: 0.35;
  animation: drift 18s linear infinite;
}

.particle:nth-child(1) { left: 12%; top: 80%; animation-duration: 22s; }
.particle:nth-child(2) { left: 35%; top: 90%; animation-duration: 16s; animation-delay: -4s; width: 2px; height: 2px; }
.particle:nth-child(3) { left: 58%; top: 85%; animation-duration: 20s; animation-delay: -8s; }
.particle:nth-child(4) { left: 78%; top: 92%; animation-duration: 24s; animation-delay: -2s; width: 4px; height: 4px; }
.particle:nth-child(5) { left: 90%; top: 75%; animation-duration: 19s; animation-delay: -6s; }

@keyframes drift {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.4; }
  100% { transform: translateY(-110vh) scale(0.6); opacity: 0; }
}

/* ---------- Muslimah cartoon icons (gallery only) ---------- */

.icon-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.muslimah-icon {
  width: clamp(64px, 12vw, 96px);
  height: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(232, 213, 154, 0.18), transparent 65%);
  animation: iconBob 5.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.icon-row .muslimah-icon:nth-child(2) {
  width: clamp(78px, 14vw, 118px);
  animation-delay: -1.5s;
}

.icon-row .muslimah-icon:nth-child(3) {
  animation-delay: -3s;
}

@keyframes iconBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

/* ---------- Music toggle ---------- */

.music-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 21, 18, 0.72);
  color: var(--gold-soft);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.music-toggle:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.music-toggle.is-playing .music-toggle__icon {
  animation: pulseNote 1.2s ease-in-out infinite;
}

.music-toggle__icon {
  font-size: 1rem;
}

.music-toggle__label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes pulseNote {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 20%;
  transform: scale(1.04);
  animation: kenBurns 22s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from { transform: scale(1.04) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, -1%); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 21, 18, 0.92) 0%, rgba(7, 21, 18, 0.72) 42%, rgba(7, 21, 18, 0.28) 72%, rgba(7, 21, 18, 0.55) 100%),
    linear-gradient(180deg, rgba(7, 21, 18, 0.25) 0%, rgba(7, 21, 18, 0.15) 40%, rgba(7, 21, 18, 0.92) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(15, 92, 76, 0.25), transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(640px, 92vw);
  padding: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 10vh, 6.5rem);
  animation: riseIn 1.2s var(--ease) 0.3s both;
}

.hero__company {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  animation: fadeSlide 1s var(--ease) 0.5s both;
}

.hero__arabic {
  font-family: var(--arabic);
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  color: var(--gold-soft);
  margin-bottom: 0.35rem;
  animation: fadeSlide 1s var(--ease) 0.65s both;
}

.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ivory);
  margin-bottom: 0.35rem;
  animation: fadeSlide 1s var(--ease) 0.8s both;
}

.hero__subtitle {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  color: var(--gold-soft);
  margin-bottom: 1.5rem;
  animation: fadeSlide 1s var(--ease) 0.95s both;
}

.hero__name {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  color: var(--ivory);
  animation: fadeSlide 1s var(--ease) 1.1s both;
}

.hero__role {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 247, 245, 0.65);
  margin-bottom: 2rem;
  animation: fadeSlide 1s var(--ease) 1.2s both;
}

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero__scroll span {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- CTA ---------- */

.cta {
  appearance: none;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.95), rgba(168, 130, 30, 0.9));
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1rem 1.75rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s;
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.25);
  animation: fadeSlide 1s var(--ease) 1.35s both;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(201, 162, 39, 0.4);
}

.cta:hover::after {
  transform: translateX(120%);
}

.cta--ghost {
  background: transparent;
  color: var(--gold-soft);
  box-shadow: none;
  animation: none;
}

.cta--ghost:hover {
  background: rgba(201, 162, 39, 0.12);
  box-shadow: none;
}

/* ---------- Main sections ---------- */

.main {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(26, 138, 120, 0.18), transparent 45%),
    radial-gradient(ellipse at 90% 20%, rgba(201, 162, 39, 0.08), transparent 40%),
    linear-gradient(180deg, #071512 0%, #0a2e28 35%, #071512 100%);
}

.main[hidden],
.site-footer[hidden],
.music-toggle[hidden] {
  display: none !important;
}

.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section__inner {
  width: min(1080px, 90vw);
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}

.section__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--ivory);
}

.section__desc,
.lead {
  max-width: 640px;
  color: rgba(243, 247, 245, 0.78);
  font-size: 1.02rem;
}

.section__desc {
  margin-bottom: 2.5rem;
}

.lead {
  margin-bottom: 2rem;
}

/* ---------- Salute ---------- */

.quote {
  margin-top: 2rem;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 2px solid var(--gold);
  max-width: 560px;
}

.quote p {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.45rem;
  color: var(--gold-soft);
  line-height: 1.4;
}

.quote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 247, 245, 0.5);
}

/* ---------- Gallery ---------- */

.gallery {
  position: relative;
  display: grid;
  gap: 1.25rem;
  justify-items: center;
}

.gallery__frame {
  width: min(420px, 100%);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: #04110e;
  transition: width 0.45s var(--ease), aspect-ratio 0.45s var(--ease);
}

.gallery__frame.is-wide {
  width: min(860px, 100%);
  aspect-ratio: 16 / 9;
}

.gallery__frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 162, 39, 0.2);
  pointer-events: none;
}

.gallery__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.45s ease, transform 0.8s var(--ease);
}

.gallery__frame.is-wide img {
  object-fit: contain;
  object-position: center center;
  background: #04110e;
}

.gallery__frame.is-fading img {
  opacity: 0;
  transform: scale(1.04);
}

.gallery__thumbs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.thumb {
  width: 64px;
  height: 80px;
  padding: 0;
  border: 1px solid transparent;
  background: #04110e;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.3s, border-color 0.3s, transform 0.3s;
}

.thumb.is-wide-thumb,
.thumb:nth-child(4),
.thumb:nth-child(5),
.thumb:nth-child(6),
.thumb:nth-child(7) {
  width: 96px;
  height: 56px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover,
.thumb.is-active {
  opacity: 1;
  border-color: var(--gold);
  transform: translateY(-2px);
}

.gallery__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gallery__counter {
  min-width: 4.5rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(243, 247, 245, 0.65);
}

.nav-btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: rgba(15, 92, 76, 0.35);
  color: var(--gold-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.nav-btn:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: var(--gold);
}

/* ---------- Doa ---------- */

.doa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.doa {
  padding: 1.75rem 1.5rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 92, 76, 0.18), rgba(7, 21, 18, 0.2));
  transition: transform 0.4s var(--ease), background 0.4s;
}

.doa:hover {
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(15, 92, 76, 0.28), rgba(7, 21, 18, 0.35));
}

.doa__arabic {
  font-family: var(--arabic);
  font-size: 1.25rem;
  color: var(--gold-soft);
  margin-bottom: 0.85rem;
  line-height: 1.8;
  direction: rtl;
}

.doa h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--ivory);
}

.doa p:last-child {
  font-size: 0.92rem;
  color: rgba(243, 247, 245, 0.72);
}

/* ---------- Letter / Team ---------- */

.letter__body {
  max-width: 680px;
  margin-bottom: 3rem;
}

.letter__body p {
  margin-bottom: 1.1rem;
  color: rgba(243, 247, 245, 0.82);
}

.letter__closing {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--gold-soft) !important;
}

.team {
  display: block;
  padding-top: 2rem;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.team__label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243, 247, 245, 0.5);
  margin-bottom: 0.5rem;
}

.team__dept {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--gold-soft);
  margin-bottom: 1rem;
}

.team__names {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.team__names li {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ivory);
  padding-left: 1rem;
  position: relative;
}

.team__names li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}

/* ---------- Finale ---------- */

.finale {
  text-align: center;
  padding-bottom: clamp(5rem, 12vw, 8rem);
}

.finale__inner {
  position: relative;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  border-top: 1px solid rgba(201, 162, 39, 0.25);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(26, 138, 120, 0.22), transparent 65%);
}

.finale__arabic {
  font-family: var(--arabic);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.finale__title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.finale__sub {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-soft);
  margin-bottom: 1.25rem;
}

.finale__age {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 600;
  color: var(--ivory);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.finale__age sup {
  font-size: 0.4em;
  color: var(--gold);
}

.finale__company {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(243, 247, 245, 0.55);
  margin-bottom: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 2.5rem;
  background: #04110e;
  border-top: 1px solid rgba(201, 162, 39, 0.15);
  font-size: 0.8rem;
  color: rgba(243, 247, 245, 0.45);
}

.site-footer__credit {
  margin-top: 0.35rem;
  color: var(--gold-soft);
  letter-spacing: 0.08em;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .hero__veil {
    background:
      linear-gradient(180deg, rgba(7, 21, 18, 0.35) 0%, rgba(7, 21, 18, 0.55) 45%, rgba(7, 21, 18, 0.94) 100%),
      linear-gradient(90deg, rgba(7, 21, 18, 0.55), transparent 70%);
  }

  .hero__photo {
    object-position: 60% 15%;
  }

  .hero__content {
    width: 100%;
    text-align: left;
  }

  .team {
    justify-items: start;
  }

  .music-toggle__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__photo {
    animation: none;
  }
}
