/* Concept B — Шаңырақ. Tokens first; every colour and face on the page comes from here. */
:root {
  --night: #141A36;        /* page ground */
  --night-deep: #0C0F20;   /* caption chips, desktop surround */
  --felt: #EFE6D6;         /* text on night; RSVP panel */
  --felt-muted: rgba(239, 230, 214, 0.72);
  --ochre: #D9A54E;        /* labels, lines, ornaments */
  --ochre-light: #E2B566;  /* highlighted words, links on night */
  --wood: #2A1E12;         /* шаңырақ wood */
  --ink: #141A36;          /* text on felt */
  --label-on-felt: #5A4520;

  --font-display: "Forum", Georgia, "Times New Roman", serif;
  --font-body: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;

  --page-max: 480px;
  --crown: min(78vw, 340px);  /* hero circle diameter */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night-deep);
  color: var(--felt);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
p { margin: 0; }
a { color: var(--ochre-light); }

.page {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--night);
  overflow-x: hidden;
  min-height: 100vh;
}

.label {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ochre);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  padding: calc(36px + env(safe-area-inset-top)) 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.hero__top {
  position: relative;
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--ochre);
  padding-left: 0.34em; /* optically centre tracked caps */
}
.music {
  position: absolute;
  right: 20px;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(217, 165, 78, 0.7);
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.music svg { fill: none; stroke: var(--ochre); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.music.is-playing { background: rgba(217, 165, 78, 0.16); }
.music.is-playing::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(217, 165, 78, 0.35);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { from { transform: scale(0.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

.crown {
  position: relative;
  margin-top: 40px;
  width: var(--crown);
  height: var(--crown);
}
.crown__rays {
  position: absolute;
  width: calc(var(--crown) * 8 / 3);
  height: calc(var(--crown) * 8 / 3);
  max-width: none;
  left: calc(var(--crown) * -5 / 6);
  top: calc(var(--crown) * -5 / 6);
  pointer-events: none;
  /* Poles fade out before the hero ends, instead of stopping in a hard line. */
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}
.crown__window {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #DCE3EC 0%, #A7B7CF 22%, #5C6E98 48%, #28315C 74%, #161C3A 100%);
}
.crown__film {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* 9:16 film, centre square shows (see safe-area guide) */
  object-position: 50% 50%;
}
.crown__ring {
  position: absolute;
  inset: calc(var(--crown) * -0.023);
  width: calc(100% + var(--crown) * 0.046);
  height: calc(100% + var(--crown) * 0.046);
  max-width: none;
  pointer-events: none;
}
.ai-tag {
  position: absolute;
  right: 4%;
  bottom: 4%;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--felt);
  background: rgba(12, 15, 32, 0.7);
  border: 1px solid rgba(239, 230, 214, 0.5);
  border-radius: 3px;
  padding: 2px 5px;
}

.names {
  position: relative;
  margin: 44px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}
.names > span:not(.names__amp) {
  font-size: clamp(38px, 12.3vw, 54px);
  letter-spacing: 0.12em;
  padding-left: 0.12em;
}
.names__amp { font-size: 28px; color: var(--ochre); }
.hero__date {
  position: relative;
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--ochre);
  padding-left: 0.34em;
}

/* ---------- 2. Countdown ---------- */
.countdown {
  padding: 0 0 52px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.countdown[hidden] { display: none; }
.countdown__item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.countdown__num {
  width: min(18.5vw, 72px);
  height: min(18.5vw, 72px);
  border-radius: 50%;
  border: 1px solid rgba(217, 165, 78, 0.75);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: min(7.7vw, 30px);
  font-variant-numeric: tabular-nums;
}
.countdown .label { font-size: 9.5px; letter-spacing: 0.22em; }

/* ---------- Кереге band ---------- */
.kerege {
  height: 34px;
  background: url("assets/svg/kerege.svg") repeat-x left center / 22px 34px;
  opacity: 0.55;
}

/* ---------- 3. Invitation ---------- */
.invite {
  padding: 60px 30px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.invite__title { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.22em; padding-left: 0.22em; }
.invite__text { font-size: 17px; line-height: 1.75; text-wrap: pretty; }
.highlight { color: var(--ochre-light); font-weight: 400; }

/* ---------- 4. Hosts ---------- */
.hosts {
  padding: 20px 30px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.hosts__names { font-family: var(--font-display); font-size: 32px; }

/* ---------- 5. Arched still ---------- */
.arch {
  margin: 0 auto;
  width: min(300px, 77vw);
  aspect-ratio: 300 / 404;
  border-radius: 50% 50% 6px 6px / 37.1% 37.1% 6px 6px;
  overflow: hidden;
  outline: 1px solid rgba(217, 165, 78, 0.6);
  outline-offset: 9px;
  background: linear-gradient(180deg, #27325F 0%, #3E3F6C 36%, #7D5A5A 66%, #C88D4E 88%, #E5B574 100%);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 6. Details ---------- */
.details {
  padding: 72px 30px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.details__item { display: flex; flex-direction: column; gap: 8px; }
.details__value { font-family: var(--font-display); font-size: 28px; }
.details__value--venue { font-size: 26px; line-height: 1.2; }
.details__address { font-size: 15px; }
.rhombus { width: 10px; height: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 26px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-decoration: none;
  cursor: pointer;
}
.btn--outline { margin-top: 4px; width: 230px; border: 1px solid var(--ochre); color: var(--ochre-light); }
.btn--outline:hover { background: rgba(217, 165, 78, 0.1); }

/* ---------- 7. RSVP ---------- */
.rsvp {
  --panel-w: calc(min(100vw, var(--page-max)) - 32px);
  margin: 0 16px;
  padding: 104px 26px 38px;
  border-radius: calc(var(--panel-w) / 2) calc(var(--panel-w) / 2) 10px 10px;
  background: var(--felt);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rsvp__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}
.rsvp__form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 10.5px; font-weight: 400; letter-spacing: 0.26em; color: var(--label-on-felt); }
.field input {
  height: 44px;
  border: none;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font: 400 17px var(--font-body);
  color: var(--ink);
  padding: 0;
}
.field input:focus-visible { outline: none; border-bottom-width: 2px; }
.field--count input { width: 120px; }
.field--count.is-disabled { opacity: 0.4; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 16px; font-weight: 400; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.btn--solid { margin-top: 6px; width: 100%; height: 54px; border-radius: 27px; border: none; background: var(--ink); color: var(--felt); }
.btn--solid[disabled] { opacity: 0.6; cursor: default; }
.rsvp__status { min-height: 1.4em; text-align: center; font-size: 15px; font-weight: 400; }
.rsvp__status.is-error { color: #8E2C2C; }
.rsvp__wa { min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 400; color: var(--ink); }

/* ---------- 8. Footer ---------- */
.footer {
  padding: 60px 32px calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer__names { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.2em; text-transform: uppercase; }
.footer__ai { font-size: 10.5px; line-height: 1.5; color: var(--felt-muted); max-width: 260px; }

/* ---------- Motion: one slow reveal per section, nothing else ---------- */
.reveal { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.will-reveal { opacity: 0; transform: translateY(16px); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.will-reveal { opacity: 1; transform: none; transition: none; }
  .music.is-playing::after { animation: none; }
}

/* Photo-led refinements and small-phone spacing. */
.hero__top { padding: 0 20px; justify-content: flex-start; }
.eyebrow { font-size: clamp(8px, 2.6vw, 11px); letter-spacing: .25em; max-width: calc(100% - 56px); padding-left: 0; }
.crown__portrait, .crown__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.crown__film[hidden] { display: none; }
.crown__rays { opacity: .68; }
.together-photo { width: min(300px, 77vw); margin: 0 auto 64px; overflow: hidden; border-radius: 18px; }
.together-photo img { width: 100%; height: auto; }
.guest-sentence { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.guest-sentence input { width: 54px; text-align: center; }
.field__hint { font-size: 12px; line-height: 1.5; color: var(--label-on-felt); }
.field__label { line-height: 1.6; letter-spacing: .16em; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 5px; }
@media (max-width: 350px) { .rsvp { padding-left: 20px; padding-right: 20px; } .guest-sentence { gap: 8px; font-size: 12px; } }
