/* ──────────────────────────────────────────────────────────────
   Undangan Tahlil 7 Hari — Anugerah Muhammad Rizky Yasin
   Palet & ukuran mengikuti desain asli (Claude Design).
   ────────────────────────────────────────────────────────────── */

:root {
  --ink:        #22302A;
  --ink-strong: #1B2721;
  --ink-soft:   #4B5852;
  --ink-mute:   #5B6660;
  --cream:      #F7F3EB;
  --sand:       #EFE8DA;
  --paper:      #FBF8F2;
  --paper-lite: #FFFDF8;
  --dark:       #111A16;
  --dark-cell:  #131D19;
  --light:      #EFE9DC;
  --light-hi:   #F6F1E6;
  --gold:       #B08D57;
  --gold-lite:  #C7A972;
  --gold-pale:  #E4CFA5;
  --gold-mute:  #8E7B5E;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: #0E1512;
}

body {
  font-family: 'Karla', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #8E6F3E; }
input, textarea, button { font-family: inherit; }
::selection { background: var(--gold); color: #0E1512; }

@keyframes fadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes softGlow { 0%, 100% { opacity: .35; } 50% { opacity: .6; } }
@keyframes scrollCue{ 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

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

.page {
  background: var(--cream);
  color: var(--ink);
  width: 100%;
  overflow-x: hidden;
}

/* ── Elemen bersama ──────────────────────────────────────────── */

.section { padding: clamp(56px, 11vw, 120px) clamp(20px, 6vw, 64px); }
.section--cream { background: var(--cream); }
.section--sand  { background: var(--sand); }
.section--dark  { background: var(--dark); color: var(--light); }
.center { text-align: center; }

.eyebrow {
  margin: 0;
  font-size: clamp(10px, 2.6vw, 12px);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-mute);
}
.eyebrow--light { color: rgba(239, 233, 220, .5); }

/* Penanda "Almarhum" di bagian profil — sengaja lebih besar dan lebih
   tegas dari eyebrow biasa, dengan garis emas pendek sebagai jangkar. */
.eyebrow--feature {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 500;
  letter-spacing: .3em;
  color: var(--gold);
}
.eyebrow--feature::before {
  content: "";
  flex: none;
  width: clamp(22px, 6vw, 34px);
  height: 1px;
  background: var(--gold);
}

.rule { width: 44px; height: 1px; background: rgba(176, 141, 87, .55); }
.rule--hero { width: 52px; background: rgba(176, 141, 87, .6); }

.arabic {
  margin: 0;
  font-family: 'Amiri', serif;
  font-weight: 400;
}
.arabic--hero    { font-size: clamp(22px, min(6.4vw, 5.4vh), 40px); line-height: 1.9;  color: var(--gold-pale); }
.arabic--prayer  { font-size: clamp(20px, 5.2vw, 32px);            line-height: 2.15; color: var(--ink); }
.arabic--closing { font-size: clamp(16px, 4vw, 24px);              line-height: 2;    color: rgba(239, 233, 220, .6); }

.quote {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(15px, 3.6vw, 20px);
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 40ch;
}
.quote--hero {
  font-size: clamp(14px, 3.4vw, 18px);
  line-height: 1.7;
  color: rgba(239, 233, 220, .66);
  max-width: 34ch;
}

.gold { color: var(--gold); }

/* ── Pembuka ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vh, 88px) clamp(20px, 6vw, 64px) clamp(76px, 13vh, 112px);
  background: var(--dark);
  color: var(--light);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -20% -30% auto -30%;
  height: 70vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(176, 141, 87, .28), rgba(17, 26, 22, 0) 68%);
  animation: softGlow 9s ease-in-out infinite;
  pointer-events: none;
}

.hero__thread {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: clamp(40px, 9vh, 96px);
  background: linear-gradient(var(--gold), rgba(176, 141, 87, 0));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.6vh, 28px);
  max-width: 760px;
  animation: fadeUp 1.1s ease both;
}

.hero__name {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vh, 14px);
}

.hero__title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(32px, min(9vw, 7.6vh), 64px);
  line-height: 1.14;
  letter-spacing: .01em;
  color: var(--light-hi);
  text-wrap: balance;
}

.hero__date {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 3.6vw, 20px);
  letter-spacing: .16em;
  color: var(--gold-lite);
}

.hero__cue {
  position: absolute;
  bottom: clamp(20px, 4vh, 38px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(239, 233, 220, .45);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.hero__cue-line {
  display: block;
  width: 1px;
  height: 22px;
  background: rgba(239, 233, 220, .5);
  animation: scrollCue 2.4s ease-in-out infinite;
}

/* ── Almarhum ────────────────────────────────────────────────── */

.profile {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.profile__frame {
  position: relative;
  justify-self: center;
  width: min(320px, 80vw);
}

/* Garis kubah, 14px di luar foto; berhenti 26px sebelum dasar foto
   karena bagian bawah foto memudar. */
.profile__arch {
  position: absolute;
  inset: -14px -14px 26px;
  border: 1px solid rgba(176, 141, 87, .32);
  border-radius: 220px 220px 0 0;
  border-bottom: none;
  pointer-events: none;
}

.profile__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 38%;
  display: block;
  /* Bentuk kubah, nada sepia, dan tepi bawah yang memudar sudah ada di
     PNG-nya (latar transparan), jadi tidak perlu border-radius/filter. */
}

.profile__body {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 20px);
}

.profile__name {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.18;
  color: var(--ink-strong);
}

.profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: clamp(13px, 3vw, 15px);
  color: var(--ink-mute);
}

.profile__text {
  margin: 0;
  font-size: clamp(14px, 3.2vw, 16px);
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ── Doa ─────────────────────────────────────────────────────── */

.prayer {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3.4vw, 28px);
}

/* ── Waktu & Tempat ──────────────────────────────────────────── */

.event {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(30px, 5vw, 52px);
  text-align: center;
}

.event__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.event__title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(28px, 6.4vw, 46px);
  color: var(--light-hi);
}

.event__grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: rgba(176, 141, 87, .28);
  border: 1px solid rgba(176, 141, 87, .28);
}

.event__cell {
  background: var(--dark-cell);
  padding: clamp(24px, 4.4vw, 36px) 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event__label {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(239, 233, 220, .45);
}

.event__value {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 4.6vw, 30px);
  color: var(--gold-pale);
}
.event__value--tight { line-height: 1.25; }

.event__note { font-size: 14px; color: rgba(239, 233, 220, .7); }
.event__note--address { line-height: 1.5; }

.event__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .25s ease, color .25s ease;
}

.btn--ghost {
  border: 1px solid rgba(176, 141, 87, .6);
  color: var(--gold-pale);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: rgba(176, 141, 87, .14);
  color: var(--gold-pale);
}

.btn--gold {
  background: var(--gold);
  color: var(--dark);
}
.btn--gold:hover, .btn--gold:focus-visible {
  background: var(--gold-lite);
  color: var(--dark);
}

/* ── Hitung mundur ───────────────────────────────────────────── */

.count {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vw, 40px);
}

.count__live {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 5.6vw, 38px);
  color: var(--ink-strong);
}
.count__live[hidden], .count__grid[hidden] { display: none; }

.count__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.4vw, 20px);
  width: 100%;
  max-width: 620px;
}

.count__box {
  border: 1px solid rgba(176, 141, 87, .35);
  padding: clamp(14px, 3.2vw, 26px) 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--paper);
}

.count__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 8vw, 52px);
  line-height: 1;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

.count__unit {
  font-size: clamp(9px, 2.2vw, 11px);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-mute);
}

.count__foot {
  margin: 0;
  font-size: clamp(13px, 3vw, 15px);
  line-height: 1.8;
  color: var(--ink-mute);
  max-width: 44ch;
}

/* ── Kirim doa ───────────────────────────────────────────────── */

.wishes {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 4vw, 34px);
}

.wishes__head {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wishes__title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(26px, 5.6vw, 38px);
  color: var(--ink-strong);
}

.wishes__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--cream);
  border: 1px solid rgba(176, 141, 87, .3);
  padding: clamp(18px, 4vw, 28px);
}

.field {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(34, 48, 42, .16);
  background: var(--paper-lite);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  border-radius: 0;
}
.field:focus { border-color: rgba(176, 141, 87, .75); }

.field--area {
  padding: 12px 14px;
  line-height: 1.7;
  resize: vertical;
}

.wishes__submit {
  min-height: 48px;
  border: none;
  background: var(--ink-strong);
  color: var(--light);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease;
}
.wishes__submit:hover, .wishes__submit:focus-visible { background: #2A3A32; }
.wishes__submit[disabled] { opacity: .6; cursor: progress; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.wishes__status {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-mute);
}
.wishes__status[hidden] { display: none; }
.wishes__status--error { color: #8C3A2B; }

.wishes__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(176, 141, 87, .28);
}

.wishes__count {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-mute);
}

.wishes__hint {
  font-size: 12px;
  color: var(--gold-mute);
  opacity: .75;
}

.wishes__listwrap { position: relative; }

.wishes__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: clamp(260px, 46vh, 440px);
  overflow-y: auto;
  padding: 2px 14px 22px 0;
}

.wish {
  border-left: 1px solid rgba(176, 141, 87, .55);
  padding: 2px 0 2px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wish__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink-strong);
}

.wish__text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.wishes__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  background: linear-gradient(rgba(239, 232, 218, 0), var(--sand));
  pointer-events: none;
}

/* ── Penutup ─────────────────────────────────────────────────── */

.section--dark.center { padding: clamp(60px, 12vw, 130px) clamp(20px, 6vw, 64px); }

.closing {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3.4vw, 28px);
}

.closing__text {
  margin: 0;
  font-size: clamp(14px, 3.2vw, 16px);
  line-height: 1.9;
  color: rgba(239, 233, 220, .72);
  text-wrap: pretty;
}

.closing__family {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 5vw, 32px);
  color: var(--gold-pale);
}
