/* =========================
   Kimia Birthday Gift
   Mobile-first static page
   ========================= */

:root {
  --bg: #f2f0e7;
  --paper: #faf9f4;
  --paper-soft: rgba(250, 249, 244, 0.72);
  --ink: #3d4638;
  --ink-soft: #707667;
  --sage: #78856c;
  --sage-deep: #56614d;
  --sage-soft: #b7beab;
  --line: rgba(61, 70, 56, 0.14);
  --gold: #b29b6a;
  --shadow: 0 30px 90px rgba(56, 62, 49, 0.12);
  --radius-xl: 36px;
  --radius-lg: 28px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255,255,255,.9), transparent 26rem),
    radial-gradient(circle at 85% 32%, rgba(183,190,171,.22), transparent 24rem),
    var(--bg);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

::selection {
  background: rgba(120, 133, 108, 0.22);
}

/* Intro */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.95), transparent 22rem),
    #ecebdd;
  transition: opacity .85s ease, visibility .85s ease;
}

.intro-screen.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-glow {
  position: absolute;
  width: min(70vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(170, 181, 158, 0.18);
  filter: blur(2px);
}

.intro-inner {
  position: relative;
  text-align: center;
  max-width: 480px;
  animation: introIn 1s cubic-bezier(.2,.75,.2,1) both;
}

.intro-kicker {
  display: inline-block;
  margin-bottom: 28px;
  direction: ltr;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .34em;
  color: var(--sage);
}

.intro-inner h1 {
  margin: 28px 0 4px;
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 600;
}

.intro-inner > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 300;
}

.intro-personal-message {
  width: min(92vw, 430px);
  margin: 14px auto 0 !important;
  color: var(--ink-soft);
  font-size: 14px !important;
  line-height: 2.05;
  font-weight: 400 !important;
  text-wrap: balance;
}

.intro-personal-message span {
  display: inline-block;
  margin-right: 3px;
  transform: rotate(-8deg);
}

.open-gift {
  margin-top: 28px;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  min-width: 128px;
  color: white;
  background: var(--sage-deep);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(86, 97, 77, 0.2);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.open-gift:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(86, 97, 77, 0.24);
  background: #4f5947;
}

.open-gift span {
  margin-right: 5px;
}

.envelope {
  width: min(70vw, 240px);
  aspect-ratio: 1.48;
  position: relative;
  margin: 0 auto;
  filter: drop-shadow(0 24px 28px rgba(61,70,56,.12));
}

.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset: 0;
  border-radius: 9px;
}

.envelope-back {
  background: #d9ddcf;
}

.envelope-paper {
  position: absolute;
  z-index: 2;
  left: 8%;
  right: 8%;
  top: 8%;
  height: 72%;
  padding-top: 22px;
  border-radius: 7px;
  background: #fffefa;
  transform: translateY(-12%);
  box-shadow: 0 8px 20px rgba(60,70,55,.08);
  direction: ltr;
}

.envelope-paper span {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 25px;
  color: var(--sage-deep);
}

.envelope-paper small {
  display: block;
  margin-top: 3px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 14px;
  color: #8a907f;
}

.envelope-front {
  z-index: 3;
  background:
    linear-gradient(31deg, #cbd1c0 49%, transparent 50%) left bottom / 52% 100% no-repeat,
    linear-gradient(-31deg, #cbd1c0 49%, transparent 50%) right bottom / 52% 100% no-repeat;
}

.envelope-flap {
  z-index: 4;
  height: 61%;
  background: #bcc5b0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  animation: flap 2.4s ease-in-out infinite alternate;
}

.seal {
  z-index: 5;
  position: absolute;
  left: 50%;
  top: 47%;
  translate: -50% -50%;
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f8f4e9;
  background: var(--sage-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  box-shadow: 0 5px 12px rgba(61,70,56,.18);
}

/* Shared */
.page {
  position: relative;
  overflow: hidden;
}

.container {
  width: min(100% - 32px, 980px);
  margin-inline: auto;
}

.ambient {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
}

.ambient-one {
  width: 420px;
  height: 420px;
  top: 28rem;
  right: -260px;
  background: rgba(183, 190, 171, .16);
}

.ambient-two {
  width: 300px;
  height: 300px;
  top: 76rem;
  left: -190px;
  background: rgba(178, 155, 106, .08);
}

.sparkle {
  position: absolute;
  color: rgba(120,133,108,.34);
  font-size: 14px;
  pointer-events: none;
}

.sparkle-1 {
  top: 21rem;
  left: 8%;
}

.sparkle-2 {
  top: 52rem;
  right: 7%;
  font-size: 21px;
}

.sparkle-3 {
  top: 91rem;
  left: 10%;
  font-size: 18px;
}

/* Hero */
.hero {
  min-height: 100svh;
  padding: max(70px, env(safe-area-inset-top)) 0 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .28em;
  color: var(--sage);
}

.eyebrow span {
  width: 27px;
  height: 1px;
  background: var(--sage-soft);
}

.hero h1 {
  margin: 16px 0 0;
  direction: ltr;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(48px, 13vw, 92px);
  font-weight: 500;
  line-height: .88;
  letter-spacing: -.035em;
  color: var(--ink);
}

.hero h1 strong {
  display: block;
  font-weight: 600;
  font-style: italic;
  color: var(--sage-deep);
}

.hero-subtitle {
  margin: 17px 0 0;
  direction: ltr;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.4;
}

.card-stage {
  width: min(100%, 680px);
  position: relative;
  margin-top: 42px;
  perspective: 1100px;
}

.card-halo {
  position: absolute;
  inset: 9% 10% -4%;
  border-radius: 40px;
  background: rgba(120,133,108,.16);
  filter: blur(34px);
  transform: translateY(20px);
}

.gift-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 23px;
  background: #eff0e5;
  box-shadow:
    0 28px 65px rgba(66,73,58,.18),
    0 2px 8px rgba(66,73,58,.1);
  transform-style: preserve-3d;
  transition: transform .18s ease-out;
  will-change: transform;
}

.gift-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255,255,255,.28),
    rgba(255,255,255,0) 28%,
    rgba(255,255,255,0) 72%,
    rgba(255,255,255,.15)
  );
}

.gift-card img {
  width: 100%;
}

.card-caption {
  display: inline-block;
  margin-top: 17px;
  direction: ltr;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .28em;
  color: #929888;
}

.scroll-hint {
  margin-top: 30px;
  direction: ltr;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.scroll-hint span {
  font-size: 8px;
  letter-spacing: .25em;
  color: #9a9f92;
}

.scroll-hint i {
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--sage-soft), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

/* Story */
.story {
  padding: 70px 0 30px;
}

.section-number {
  width: fit-content;
  margin: 0 auto 18px;
  direction: ltr;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #aaa99d;
  font-size: 14px;
}

.story-card {
  position: relative;
  max-width: 760px;
  margin: auto;
  padding: 36px 24px 34px;
  text-align: center;
  border: 1px solid rgba(86,97,77,.12);
  border-radius: var(--radius-lg);
  background: var(--paper-soft);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 70px rgba(76,84,68,.07);
}

.story-brand {
  direction: ltr;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .26em;
  color: var(--sage);
}

.story-brand i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.story-card h2 {
  margin: 18px 0 17px;
  font-size: clamp(25px, 6vw, 35px);
  line-height: 1.6;
  font-weight: 600;
  color: var(--ink);
}

.story-card p {
  margin: 0 auto 14px;
  max-width: 610px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2.05;
  font-weight: 300;
}

.story-card bdi {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.12em;
  font-weight: 600;
  color: var(--sage-deep);
}

.nabat-contact {
  width: min(100%, 430px);
  margin: 28px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.contact-label {
  display: block;
  margin-bottom: 5px;
  color: #8b9084;
  font-size: 12px;
  font-weight: 400;
}

.contact-phone {
  display: inline-block;
  color: var(--sage-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
}

.contact-actions {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.contact-btn {
  min-width: 112px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(86, 97, 77, .16);
  border-radius: 999px;
  color: var(--sage-deep);
  background: rgba(255,255,255,.62);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.contact-btn:hover {
  transform: translateY(-2px);
  background: white;
  box-shadow: 0 10px 24px rgba(86,97,77,.09);
}

.contact-btn.whatsapp {
  color: #4f6650;
  background: rgba(117, 139, 112, .09);
}

.contact-icon {
  direction: ltr;
  font-size: 14px;
  line-height: 1;
}

.tiny-leaf {
  margin-top: 20px;
  font-size: 22px;
  color: var(--sage);
}

/* Personal message */
.message {
  padding: 54px 0 90px;
}

.message-card {
  position: relative;
  max-width: 830px;
  margin: auto;
  padding: 52px 22px 46px;
  text-align: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(96,108,85,.98), rgba(75,86,67,.98));
  color: #f5f3ea;
  box-shadow: var(--shadow);
}

.message-card::before,
.message-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.message-card::before {
  width: 230px;
  height: 230px;
  top: -165px;
  right: -80px;
}

.message-card::after {
  width: 170px;
  height: 170px;
  bottom: -125px;
  left: -65px;
}

.message-label {
  direction: ltr;
  display: inline-block;
  font-size: 8px;
  letter-spacing: .29em;
  color: rgba(255,255,255,.58);
}

.quote-mark {
  height: 48px;
  margin-top: 10px;
  direction: ltr;
  font-family: Georgia, serif;
  font-size: 73px;
  line-height: 1;
  color: rgba(255,255,255,.14);
}

.personal-message {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  max-width: 670px;
  font-size: clamp(18px, 4.6vw, 26px);
  line-height: 2;
  font-weight: 400;
}

.nail {
  display: inline-block;
  margin-right: 4px;
  font-size: .95em;
  transform: rotate(-8deg);
}

.message-divider {
  width: min(260px, 70%);
  margin: 29px auto 22px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.message-divider span {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.18);
}

.message-divider b {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,.75);
}

.wish {
  position: relative;
  z-index: 2;
  max-width: 510px;
  margin: 0 auto;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.95;
  font-weight: 300;
}

/* Footer */
.footer {
  padding: 0 0 max(42px, env(safe-area-inset-bottom));
  text-align: center;
  direction: ltr;
}

.footer p {
  margin: 0 0 7px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 16px;
  color: var(--sage-deep);
}

.footer .footer-wish {
  direction: rtl;
  max-width: 540px;
  margin: 0 auto 26px;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.95;
  font-weight: 300;
}

.footer span {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .3em;
  color: #a0a497;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .9s cubic-bezier(.2,.7,.2,1),
    transform .9s cubic-bezier(.2,.7,.2,1);
}

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

/* Animations */
@keyframes introIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes flap {
  from { transform: rotateX(0deg); }
  to { transform: rotateX(-8deg); }
}

@keyframes scrollLine {
  0%, 100% {
    opacity: .35;
    transform: scaleY(.75);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Tablet + Desktop */
@media (min-width: 700px) {
  .container {
    width: min(100% - 64px, 980px);
  }

  .hero {
    padding-top: 80px;
    padding-bottom: 70px;
  }

  .card-stage {
    margin-top: 50px;
  }

  .gift-card {
    border-radius: 31px;
  }

  .story {
    padding-top: 100px;
  }

  .story-card {
    padding: 52px 60px 48px;
  }

  .story-card p {
    font-size: 15px;
  }

  .message {
    padding-top: 85px;
    padding-bottom: 120px;
  }

  .message-card {
    padding: 70px 58px 62px;
  }
}

/* Mobile */
@media (max-width: 520px) {
  .hero {
    min-height: 100svh;
    justify-content: flex-start;
    padding-top: max(64px, env(safe-area-inset-top));
  }

  .hero h1 {
    margin-top: 13px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .card-stage {
    margin-top: 34px;
  }

  .gift-card {
    border-radius: 18px;
  }

  .card-caption {
    font-size: 7px;
  }

  .story {
    padding-top: 55px;
  }

  .story-card {
    border-radius: 24px;
  }

  .message {
    padding-top: 44px;
    padding-bottom: 72px;
  }

  .message-card {
    border-radius: 28px;
  }

  .desktop-break {
    display: none;
  }

  .intro-personal-message {
    width: min(88vw, 360px);
    font-size: 13px !important;
    line-height: 1.95;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-btn {
    flex: 1;
    min-width: 0;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
