/* =========================================================
   Varrak — a paper kite lifts off a mahalla rooftop into the sun;
   a paper-cut spring sky full of kites. Sunnat toʻy and children's
   birthdays. Built on shared/base.css; this sheet is the look.
   ========================================================= */

:root {
  --bg: #fbf3e4;
  --ink: #23404d;
  --ink-soft: #66808a;
  --accent: #1f8f98;
  --accent-deep: #17606f;
  --accent-soft: #dcefee;
  --line: rgba(23, 96, 111, 0.14);
  --line-strong: rgba(23, 96, 111, 0.3);
  --surface: #fffbf3;
  --on-accent: #fff8ea;
  --shadow: 40 80 90;
  --glow: rgba(255, 250, 238, 0.95);
  --intro-bg: #9fd0ea;

  --sky: #9fd0ea;
  --saffron: #f2b134;
  --coral: #e8584a;
  --turq: #2aa6a8;
  --apricot: #f5b7a3;

  --display: "Montserrat Alternates", "Alegreya Sans", sans-serif;
  --body: "Alegreya Sans", system-ui, sans-serif;
  --label: "Alegreya Sans", system-ui, sans-serif;
  --tale: "Alegreya", Georgia, serif;

  --open-default: url("/styles/varrak/media/open-poster.jpg");
  --amb-poster: url("/styles/varrak/media/amb-poster.jpg");
  --close-poster: url("/styles/varrak/media/close-poster.jpg");
  --dissolve: 2s;
  --pulse: rgba(255, 252, 240, 0.95);
  --pulse-glow: rgba(255, 220, 150, 0.7);
  --music-fg: #17606f;

  /* a small paper kite: saffron, coral and turquoise quarters */
  --kite: conic-gradient(from 45deg at 50% 50%, var(--coral) 0 25%, var(--turq) 0 50%, var(--saffron) 0 75%, #f08a3c 0);
  --diamond: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* paper with a soft fibre grain */
body {
  font-size: 19px;
  background:
    radial-gradient(circle at 20% 30%, rgba(214, 190, 150, 0.12) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 80%, rgba(214, 190, 150, 0.1) 0 1px, transparent 1.5px),
    var(--bg);
  background-size: 7px 7px, 11px 11px, auto;
}

.label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--coral);
}

/* ---------- Opening ---------- */

.intro__kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 238, 0.82);
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 6px 16px -10px rgba(20, 60, 80, 0.6);
}

.intro__to {
  font-family: var(--tale);
  font-size: clamp(32px, 9vw, 42px);
  color: #fffdf6;
  text-shadow: 0 2px 14px rgba(20, 70, 110, 0.75), 0 0 3px rgba(20, 70, 110, 0.5);
}

.intro__hint {
  font-family: var(--label);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
}

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

.hero__veil {
  background:
    radial-gradient(ellipse 92% 26% at 50% 22%, rgba(255, 250, 238, 0.55), rgba(255, 250, 238, 0) 72%),
    linear-gradient(to bottom, rgba(251, 243, 228, 0) 82%, rgba(251, 243, 228, 0.85) 95%, var(--bg) 100%);
}

.hero__kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-family: var(--label);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-shadow: 0 0 10px var(--glow);
}

/* a tiny paper kite on each side of the kicker */
.rhomb {
  display: inline-block;
  width: 12px;
  height: 15px;
  background: var(--kite);
  clip-path: var(--diamond);
}

/* the name: layered cut paper, cream under coral */
.name {
  white-space: nowrap;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 12.5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--coral);
  text-shadow:
    2px 3px 0 #fff6e2,
    3px 5px 0 rgba(23, 96, 111, 0.22),
    0 0 26px rgba(255, 250, 238, 0.7);
}

.hero__date {
  position: absolute;
  left: 50%;
  bottom: max(98px, calc(env(safe-area-inset-bottom) + 86px));
  translate: -50% 0;
  margin: 0;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent-deep);
  border: 2px solid #fff6e2;
  white-space: nowrap;
  font-family: var(--label);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff6e2;
  box-shadow: 0 3px 0 rgba(15, 60, 70, 0.35), 0 14px 26px -14px rgb(var(--shadow) / 0.9);
}

.hero.is-in .hero__kicker {
  animation: rise 1.8s var(--ease) 0.5s both;
}

/* the name is lifted up on the wind, swaying a little like a kite */
.hero.is-in .name {
  animation: lift 2.6s var(--ease) 0.9s both;
}

.hero.is-in .hero__date {
  animation: rise 1.8s var(--ease) 2.4s both;
}

.hero {
  --cue-d: 3.4s;
}

@keyframes lift {
  0% {
    opacity: 0;
    transform: translateY(46px) rotate(-4deg);
  }
  45% {
    opacity: 1;
  }
  70% {
    transform: translateY(-4px) rotate(1.2deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Living touch: two little kites bobbing at the edges ---------- */

.kites {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 3s var(--ease-soft);
}

body.is-open .kites {
  opacity: 1;
}

.kites i {
  position: absolute;
  width: 26px;
  transform-origin: 50% 100%;
  animation: bob 7s ease-in-out infinite;
}

.kites i:nth-child(1) {
  top: 36%;
  right: 3px;
}

.kites i:nth-child(2) {
  top: 68%;
  left: 2px;
  width: 21px;
  animation-duration: 8.5s;
  animation-delay: -3s;
}

.kites svg {
  display: block;
  width: 100%;
  overflow: visible;
  filter: drop-shadow(1px 2px 1px rgba(23, 70, 80, 0.3));
}

/* the tail flutters on its own */
.kites .b {
  transform-origin: 20px 50px;
  animation: flutter 1.6s ease-in-out infinite;
}

.kites .t {
  stroke: rgba(23, 96, 111, 0.45);
}

@keyframes bob {
  0%,
  100% {
    transform: translate(0, 0) rotate(-6deg);
  }
  30% {
    transform: translate(-3px, -7px) rotate(4deg);
  }
  60% {
    transform: translate(2px, 3px) rotate(-2deg);
  }
}

@keyframes flutter {
  0%,
  100% {
    transform: skewX(-8deg);
  }
  50% {
    transform: skewX(9deg);
  }
}

/* ---------- Sections ---------- */

.title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 9.4vw, 42px);
  letter-spacing: -0.01em;
  color: var(--accent-deep);
}

.divider {
  width: min(78%, 300px);
}

/* a strip of paper sky with cut-paper clouds and a kite between sections */
.sky {
  position: relative;
  height: 74px;
  margin: 8px 0;
  background: var(--sky);
  -webkit-mask: radial-gradient(14px at 50% 0, #0000 98%, #000) 50% 0 / 28px 51% repeat-x,
    radial-gradient(14px at 50% 100%, #0000 98%, #000) 50% 100% / 28px 51% repeat-x;
  mask: radial-gradient(14px at 50% 0, #0000 98%, #000) 50% 0 / 28px 51% repeat-x,
    radial-gradient(14px at 50% 100%, #0000 98%, #000) 50% 100% / 28px 51% repeat-x;
  overflow: hidden;
}

.sky i {
  position: absolute;
  top: 26px;
  width: 54px;
  height: 20px;
  border-radius: 20px;
  background: #fff8ea;
  box-shadow: 1px 2px 0 rgba(23, 96, 111, 0.15);
}

.sky i::before {
  content: "";
  position: absolute;
  left: 12px;
  top: -11px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: inherit;
}

.sky i:nth-child(1) {
  left: 9%;
}

.sky i:nth-child(2) {
  left: 62%;
  top: 34px;
  width: 44px;
  height: 16px;
}

/* the third one is a kite */
.sky i:nth-child(3) {
  left: 38%;
  top: 18px;
  width: 22px;
  height: 28px;
  border-radius: 0;
  background: var(--kite);
  clip-path: var(--diamond);
  box-shadow: none;
}

.sky i:nth-child(3)::before {
  display: none;
}

.emblem {
  width: 76px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 12px rgb(var(--shadow) / 0.2));
}

.invite {
  padding-top: 190px;
}

.invite__greet {
  font-family: var(--tale);
  font-size: clamp(30px, 8.8vw, 38px);
  color: var(--accent-deep);
}

.invite .divider {
  margin: 0 auto 28px;
}

.parents__names {
  font-family: var(--tale);
  font-size: 23px;
  color: var(--accent-deep);
}

.invite__quote {
  font-family: var(--tale);
  font-size: 22px;
  color: var(--coral);
}

.corner {
  width: min(42vw, 176px);
}

.section:has(> .corner) {
  padding-top: 196px;
}

/* ---------- Date: the day on a big paper kite ---------- */

.bigdate {
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  justify-items: stretch;
  margin-bottom: 4px;
}

.bigdate__side {
  font-family: var(--label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bigdate__day {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 164px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 54px;
  line-height: 1;
  color: #fffaf0;
  text-shadow: 0 2px 0 rgba(23, 70, 80, 0.4);
  background:
    linear-gradient(#fff6e2, #fff6e2) 50% 0 / 3px 100% no-repeat,
    linear-gradient(#fff6e2, #fff6e2) 0 50% / 100% 3px no-repeat,
    var(--kite);
  clip-path: var(--diamond);
}

.bigdate__meta {
  margin: 10px 0 30px;
  font-family: var(--tale);
  font-size: 21px;
}

.cal {
  border-radius: 18px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 4px 5px 0 var(--accent-soft);
}

.cal__wd {
  color: var(--coral);
}

/* the day: a little kite */
.cal__d.is-day::before {
  width: 36px;
  height: 44px;
  border-radius: 0;
  background: var(--kite);
  box-shadow: none;
  clip-path: var(--diamond);
}

.cd__row {
  gap: 8px;
}

.cd__cell {
  padding: 12px 0 8px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 3px 4px 0 var(--accent-soft);
}

.cd__cell:first-child {
  border-left: 2px solid var(--line-strong);
}

.cd__num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 7vw, 30px);
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.cd__unit {
  color: var(--coral);
  font-weight: 700;
}

.cd__past {
  font-family: var(--display);
  color: var(--coral);
}

/* ---------- Buttons ---------- */

.btn {
  border-radius: 999px;
  border-width: 2px;
  font-family: var(--label);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.btn--solid {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  box-shadow: 0 3px 0 rgba(15, 60, 70, 0.4), 0 12px 24px -14px rgb(var(--shadow) / 0.9);
}

.copy {
  border-radius: 999px;
}

/* ---------- Program ---------- */

.tl__time {
  font-family: var(--label);
  font-weight: 700;
  color: var(--accent-deep);
  font-size: 21px;
}

.tl__ico {
  background: var(--saffron);
  border: 2px solid #fff6e2;
  color: #5a3208;
  box-shadow: 2px 3px 0 rgba(23, 96, 111, 0.2);
}

.tl:nth-child(3n + 2) .tl__ico {
  background: var(--turq);
  color: #fffaf0;
}

.tl:nth-child(3n + 3) .tl__ico {
  background: var(--coral);
  color: #fffaf0;
}

/* the kite string runs down the program */
.tl::before {
  background: repeating-linear-gradient(var(--accent) 0 5px, transparent 5px 10px);
  opacity: 0.45;
}

.tl__title {
  font-family: var(--tale);
  font-size: 22px;
  font-weight: 400;
}

.detail {
  border-radius: 18px;
  border-width: 2px;
  box-shadow: 4px 5px 0 var(--accent-soft);
}

.detail__ico {
  background: var(--turq);
  color: #fffaf0;
}

.detail__title {
  font-family: var(--tale);
  font-size: 21px;
  font-weight: 400;
}

/* ---------- Venue ---------- */

.venue__name {
  font-family: var(--tale);
  font-weight: 400;
  font-size: 30px;
  color: var(--accent-deep);
}

.mapcard {
  border-radius: 22px;
  border: 2px solid var(--line-strong);
  box-shadow: 5px 6px 0 var(--accent-soft);
}

.map {
  border-radius: 16px;
}

.pin svg {
  width: 40px;
  height: 58px;
}

/* ---------- Gifts: cards in kite colours with a paper kite in the corner ---------- */

.ccard {
  border-radius: 18px;
  color: #fffaf0;
  background: linear-gradient(135deg, #1f8f98, #145867);
  border: 2px solid rgba(255, 246, 226, 0.7);
}

.ccard::before {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -18px;
  width: 74px;
  height: 92px;
  background: var(--kite);
  clip-path: var(--diamond);
  opacity: 0.3;
}

.ccard--humo {
  background: linear-gradient(135deg, #ea6a4f, #b8392d);
}

.ccard--visa {
  background: linear-gradient(135deg, #e7a23a, #b8701a);
}

.ccard__chip {
  background: linear-gradient(135deg, #fff1cc, #d7a957);
}

/* ---------- Answer ---------- */

.reply {
  border-radius: 22px;
  border: 2px solid var(--line-strong);
  box-shadow: 5px 6px 0 var(--accent-soft);
}

.choice span {
  border-radius: 999px;
}

.stepper {
  border-radius: 999px;
}

.sent__art {
  width: 84px;
}

.sent__title {
  font-family: var(--display);
  color: var(--accent-deep);
}

.tg {
  font-weight: 700;
}

/* ---------- Closing ---------- */

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(251, 243, 228, 0.55) 8%, rgba(251, 243, 228, 0) 22%),
    radial-gradient(ellipse 92% 18% at 50% 19%, rgba(255, 244, 222, 0.6), transparent 76%),
    linear-gradient(to top, var(--bg) 0%, rgba(251, 243, 228, 0) 14%);
}

.closing__wait {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 8.6vw, 40px);
  line-height: 1.15;
  color: var(--coral);
  text-shadow: 2px 3px 0 #fff6e2, 3px 5px 0 rgba(150, 60, 30, 0.25), 0 0 24px rgba(255, 244, 222, 0.8);
}

.closing__names {
  margin-top: 14px;
  font-family: var(--tale);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--accent-deep);
  text-shadow: 0 0 12px var(--glow), 0 0 4px var(--glow);
}

.footer__art {
  width: 58px;
}

.footer__sign {
  font-family: var(--tale);
}

/* ---------- Small and wide screens ---------- */

@media (max-height: 700px) and (max-aspect-ratio: 3/4) {
  .hero__text {
    top: max(6%, calc(env(safe-area-inset-top) + 50px));
  }

  .name {
    font-size: clamp(36px, 11vw, 50px);
  }
}

@media (min-aspect-ratio: 3/4) {
  .name {
    font-size: min(64px, 7vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kites {
    display: none;
  }
}
