/* =========================================================
   Special For Zura — AXION Neuralis & AZRIEL SPACE
   Tema: malam romantis, rose-gold, elegan
   ========================================================= */

:root {
  --bg: #0d0a14;
  --bg-soft: #14101f;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(232, 164, 184, 0.18);
  --text: #f3ecef;
  --muted: #a99ba6;
  --accent: #e8a4b8;          /* rose pink */
  --accent-2: #d4af6a;        /* soft gold */
  --accent-soft: rgba(232, 164, 184, 0.12);
  --glow: rgba(232, 164, 184, 0.35);
  --font-script: "Great Vibes", cursive;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Karla", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Latar gradien lembut */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(212, 175, 106, 0.08), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(232, 164, 184, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(120, 80, 140, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(5, 3, 9, 0.55) 100%);
  pointer-events: none;
  z-index: 2;
}

.container {
  position: relative;
  z-index: 5;
  width: min(1100px, 92%);
  margin: 0 auto;
}
.container.narrow { width: min(720px, 92%); }
.container.center { text-align: center; }

.script { font-family: var(--font-script); font-weight: 400; }
.accent { color: var(--accent); }

/* ===================== LOADER ===================== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  z-index: 100;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }

.loader-heart {
  width: 56px; height: 56px;
  color: var(--accent);
  animation: heartbeat 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 18px var(--glow));
}
.loader-heart svg { width: 100%; height: 100%; }

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.18); }
  30% { transform: scale(1); }
  45% { transform: scale(1.12); }
  60% { transform: scale(1); }
}

.loader-text {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.dots::after {
  content: "";
  animation: dots 1.6s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 0 3rem;
}

.nav {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-brand em { color: var(--accent); font-style: italic; text-transform: none; letter-spacing: 0.02em; }
.nav-date { font-size: 0.8rem; opacity: 0.75; }

.hero-inner {
  flex: 1;
  width: min(900px, 92%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
  padding: 2rem 0;
}

.hero-eyebrow, .section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
}
.hero-title .line { display: block; }
.hero-title .script {
  font-size: clamp(2.6rem, 7vw, 5rem);
  color: var(--accent);
  margin-top: 0.4rem;
  text-shadow: 0 0 40px var(--glow);
}

.hero-sub {
  color: var(--muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  max-width: 520px;
}

/* ===================== ENVELOPE ===================== */
.envelope-wrap {
  margin-top: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.envelope {
  position: relative;
  width: 260px;
  height: 170px;
  transition: transform 0.5s ease;
  outline: none;
}
.envelope:hover { transform: translateY(-4px); }
.envelope:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

.env-back, .env-front, .env-flap {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}
.env-back {
  background: linear-gradient(160deg, #2a1f33, #1c1526);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(232, 164, 184, 0.12);
}
.env-front {
  background: linear-gradient(160deg, #352640, #241a30);
  clip-path: polygon(0 38%, 50% 72%, 100% 38%, 100% 100%, 0 100%);
  z-index: 3;
}
.env-flap {
  background: linear-gradient(200deg, #433052, #2c1f3a);
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.6, -0.28, 0.735, 0.045);
  z-index: 4;
}
.env-letter {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 12%;
  bottom: 10%;
  background: #f5efe6;
  border-radius: 3px;
  z-index: 2;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}
.env-letter-line {
  height: 3px;
  background: linear-gradient(90deg, #d8cbb8, transparent);
  border-radius: 2px;
}
.env-letter-line.short { width: 60%; }

.env-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f0b8c8, var(--accent) 60%, #b97a90);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 16px var(--glow);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* state terbuka */
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 1; }
.envelope.open .env-seal { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
.envelope.open .env-letter { transform: translateY(-120px) scale(1.04); }

.env-hint {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: opacity 0.5s ease;
}
.envelope-wrap.opened .env-hint { opacity: 0; }

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 36px;
  border: 1px solid rgba(232, 164, 184, 0.4);
  border-radius: 12px;
  z-index: 5;
  opacity: 0;
  transition: opacity 1s ease 1s;
}
.scroll-hint.show { opacity: 1; }
.scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; }
}

/* ===================== SECTIONS ===================== */
.section {
  position: relative;
  z-index: 5;
  padding: 6rem 0;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 2rem;
}
.section-title .script.accent {
  font-size: 1.35em;
  text-shadow: 0 0 30px var(--glow);
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===================== LETTER ===================== */
.letter-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 2.4rem 2.2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
}
.letter-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.typewriter {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  min-height: 8em;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.3em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 0.9s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.poem {
  margin-top: 2.6rem;
  text-align: center;
}
.poem p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 2;
  color: var(--muted);
}

/* ===================== BIG REVEAL ===================== */
.reveal-section {
  padding: 7rem 0;
  text-align: center;
}
.big-reveal {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 1rem 0 1.4rem;
}
.big-reveal .line { display: block; }
.big-reveal .small {
  font-size: clamp(1.3rem, 3.5vw, 2.2rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.big-reveal .huge {
  font-size: clamp(4rem, 14vw, 9rem);
  color: var(--accent);
  background: linear-gradient(120deg, #f5c6d0, var(--accent) 40%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 50px var(--glow));
  margin: 0.3rem 0;
}
.big-reveal .age {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--text);
}
.big-reveal .num {
  font-family: var(--font-script);
  font-size: 1.6em;
  color: var(--accent-2);
  margin: 0 0.15em;
}
.reveal-sub {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  max-width: 540px;
  margin: 0 auto 2rem;
}

.btn-primary {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.35s ease;
  backdrop-filter: blur(6px);
}
.btn-primary:hover {
  background: var(--accent);
  color: #1a0f16;
  box-shadow: 0 0 30px var(--glow);
  transform: translateY(-2px);
}

/* ===================== WISHES ===================== */
.wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-top: 1rem;
}
.wish-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 2rem 1.6rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.wish-card:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 164, 184, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(232, 164, 184, 0.12);
}
.wish-icon {
  width: 48px; height: 48px;
  color: var(--accent);
  margin-bottom: 1rem;
  background: var(--accent-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wish-icon svg { width: 24px; height: 24px; }
.wish-card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--accent-2);
  margin-bottom: 0.6rem;
}
.wish-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ===================== SORRY / APOLOGY ===================== */
.sorry-card {
  background: linear-gradient(160deg, rgba(232, 164, 184, 0.07), rgba(212, 175, 106, 0.05));
  border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: 16px;
  padding: 2.8rem 2.4rem;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.sorry-card p {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 1.2rem;
}
.sorry-card p:last-child { margin-bottom: 0; }
.sorry-card em { color: var(--accent); font-style: italic; }
.sorry-card .emphasis {
  color: var(--accent-2);
  font-style: italic;
  font-size: 1.15em;
  border-top: 1px solid rgba(212, 175, 106, 0.25);
  padding-top: 1.4rem;
  margin-top: 1.6rem;
}

/* ===================== CLOSING ===================== */
.closing-text {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.9;
  margin-bottom: 2.5rem;
}
.signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 1rem;
}
.signature .script {
  font-size: 1.6rem;
  color: var(--muted);
}
.signature .name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.8rem;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-shadow: 0 0 24px var(--glow);
  padding-left: 0.35em; /* balance letter-spacing */
}

/* ===================== FOOTER ===================== */
.footer {
  position: relative;
  z-index: 5;
  padding: 3.5rem 0 2.5rem;
  border-top: 1px solid rgba(232, 164, 184, 0.12);
  text-align: center;
  background: linear-gradient(to top, rgba(5, 3, 9, 0.6), transparent);
}
.footer-brand {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.footer-copy {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.footer-note {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .letter-card, .sorry-card { padding: 1.8rem 1.3rem; }
  .envelope { width: 220px; height: 145px; }
  .envelope.open .env-letter { transform: translateY(-100px) scale(1.04); }
  .nav-date { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
