/* ==========================================================================
   Ek Haan — private invitation
   Palette: midnight black, espresso, plum; blush rose and rose-gold accents.
   ========================================================================== */

@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); }

:root {
  --midnight: #0b0708;
  --espresso: #1a1012;
  --plum: #2a1620;
  --ivory: #f5e9e2;
  --text: #e9dad3;
  --muted: #c4aea6;
  --rose: #eaa59f;
  --rose-soft: #f2c3bb;
  --rose-gold: #d49a82;
  --line: rgba(212, 154, 130, 0.42);
  --line-soft: rgba(212, 154, 130, 0.22);
  --error: #ff9c8f;

  --serif-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --serif-text: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--midnight);
  color: var(--text);
  font-family: var(--serif-text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--rose-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ivory); }

:focus-visible { outline: 2px solid var(--rose-soft); outline-offset: 3px; }

.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;
}

/* ---------- Cinematic backdrop ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--midnight);
  background-image:
    radial-gradient(ellipse 60% 70% at 26% 48%, rgba(11, 7, 8, 0.55), rgba(11, 7, 8, 0) 70%),
    linear-gradient(90deg, rgba(11, 7, 8, 0.55) 0%, rgba(11, 7, 8, 0.15) 45%, rgba(20, 10, 14, 0.35) 100%),
    linear-gradient(180deg, rgba(11, 7, 8, 0.25) 0%, rgba(11, 7, 8, 0) 40%, rgba(11, 7, 8, 0.6) 100%),
    url("/.netlify/images?url=/img/ek-haan-backdrop.jpg&w=1920&fm=webp&q=72");
  background-size: cover;
  background-position: 30% center;
}

@media (max-width: 900px) {
  .backdrop {
    background-image:
      linear-gradient(180deg, rgba(11, 7, 8, 0.35) 0%, rgba(11, 7, 8, 0.7) 45%, rgba(11, 7, 8, 0.9) 100%),
      url("/.netlify/images?url=/img/ek-haan-backdrop.jpg&w=1000&fm=webp&q=70");
    background-position: 18% center;
  }
}

/* ---------- Page layout ---------- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 590px);
  grid-template-rows: 1fr auto;
  column-gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(1.25rem, 3vh, 2.25rem) clamp(1.5rem, 5vw, 5.5rem) 0.75rem;
  max-width: 1500px;
  margin: 0 auto;
}

/* ---------- Brand (left) ---------- */

.brand {
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 34rem;
  padding: 2rem 0;
}

.brand__logo {
  width: clamp(150px, 22vh, 230px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(234, 165, 159, 0.35),
    0 0 40px 6px rgba(234, 165, 159, 0.22),
    0 18px 50px rgba(0, 0, 0, 0.55);
}

.brand__wordmark {
  margin: clamp(1.1rem, 2.6vh, 1.75rem) 0 0;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.42em;
  /* letter-spacing adds trailing space; compensate so it stays centred */
  margin-right: -0.42em;
  color: var(--ivory);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.brand__tagline {
  margin: 0;
  font-family: var(--serif-text);
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose);
}

.brand__audience {
  margin: 1.4rem 0 0.35rem;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 1.7vw, 1.6rem);
  line-height: 1.25;
  color: var(--ivory);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.brand__poem {
  margin: 0;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.08rem, 1.3vw, 1.25rem);
  color: var(--rose-soft);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

/* ---------- Separators ---------- */

.sep {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  margin: clamp(0.85rem, 1.9vh, 1.3rem) 0;
}

.sep::before, .sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 154, 130, 0), var(--line) 40%, var(--line));
}
.sep::after { background: linear-gradient(90deg, var(--line), var(--line) 60%, rgba(212, 154, 130, 0)); }

.sep__star {
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--rose-soft);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 4px rgba(242, 195, 187, 0.8));
}

.sep--brand { width: min(240px, 70%); margin: 1rem 0 0.9rem; }
.sep--small { width: 70%; margin: 0.5rem auto 0.45rem; }
.sep--small .sep__star { width: 9px; height: 9px; }

/* ---------- Invitation panel (right) ---------- */

.panel {
  align-self: center;
  position: relative;
  margin: 0;
  padding: clamp(1.5rem, 3.4vh, 2.4rem) clamp(1.4rem, 3.2vw, 2.75rem);
  border-radius: 22px;
  border: 1px solid rgba(212, 154, 130, 0.38);
  background:
    linear-gradient(180deg, rgba(36, 21, 24, 0.86) 0%, rgba(22, 13, 15, 0.9) 55%, rgba(18, 11, 13, 0.93) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 215, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.25);
  text-align: center;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .panel {
    background: linear-gradient(180deg, rgba(36, 21, 24, 0.74) 0%, rgba(22, 13, 15, 0.8) 55%, rgba(18, 11, 13, 0.86) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(115%);
    backdrop-filter: blur(14px) saturate(115%);
  }
}

.story p { margin: 0; }

.story__headline {
  margin: 0 auto 0.75rem;
  max-width: 19ch;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.6vh, 2.35rem);
  line-height: 1.12;
  color: var(--ivory);
  text-wrap: balance;
}

.story--opening p {
  font-size: clamp(1rem, 1.9vh, 1.08rem);
  color: var(--text);
}

.story__emphasis {
  margin-top: 0.15rem !important;
  font-weight: 600;
  color: var(--ivory);
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--serif-text);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
  text-transform: uppercase;
  color: var(--rose);
}

.story__statement {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.32rem, 2.6vh, 1.62rem);
  line-height: 1.22;
  color: var(--ivory);
  text-wrap: balance;
}

.story__statement--rose { color: var(--rose); }

.story__body {
  max-width: 36rem;
  margin: 0.55rem auto 0 !important;
  font-size: clamp(1rem, 1.9vh, 1.06rem);
  line-height: 1.5;
  color: var(--text);
}

.story__body + .story__body { margin-top: 0.15rem !important; }

.story__body--sign { color: var(--ivory); letter-spacing: 0.02em; }

/* ---------- Form ---------- */

.invite-form {
  margin-top: clamp(1rem, 2.2vh, 1.5rem);
  text-align: left;
}

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.field { margin-bottom: 0.7rem; }

.field__label {
  display: block;
  margin: 0 0 0.3rem 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__optional { letter-spacing: 0.08em; text-transform: none; font-style: italic; color: var(--muted); opacity: 0.85; }

.field__control {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.field__icon, .field__chevron {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--rose-soft);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.field__icon { left: 0.95rem; opacity: 0.85; }
.field__chevron { right: 0.9rem; opacity: 0.85; }

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem 0.7rem 2.85rem;
  border: 1px solid rgba(212, 154, 130, 0.36);
  border-radius: 8px;
  background: rgba(10, 6, 7, 0.55);
  color: var(--ivory);
  font-family: var(--serif-text);
  font-size: 1.04rem; /* ≥16px avoids iOS zoom */
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
}
.field select:invalid, .field select option[value=""] { color: var(--muted); }
.field select option { color: #1a1012; background: #f5e9e2; }

.field input::placeholder { color: var(--muted); opacity: 0.8; }

.field input:hover, .field select:hover { border-color: rgba(234, 165, 159, 0.6); }

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--rose-soft);
  background: rgba(14, 8, 10, 0.75);
  box-shadow: 0 0 0 3px rgba(234, 165, 159, 0.18);
}

.field [aria-invalid="true"] { border-color: var(--error); }

.field__phone { display: flex; gap: 0.55rem; }
.field__control--code { flex: 0 0 8.4rem; }
.field__control--code select { padding-left: 0.9rem; }

.field__error {
  min-height: 0;
  margin: 0.3rem 0 0 0.15rem;
  font-size: 0.92rem;
  color: var(--error);
}
.field__error:empty { display: none; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.85rem 0 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--muted);
}

.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
  accent-color: var(--rose);
  cursor: pointer;
}
.consent label { cursor: pointer; }

.invite-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 54px;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8d3cb 0%, #eeb2a8 48%, #e19c90 100%);
  color: #2a1117;
  font-family: var(--serif-text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 30px rgba(225, 156, 144, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.invite-form__submit:hover { filter: brightness(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 14px 38px rgba(225, 156, 144, 0.35); }
.invite-form__submit:active { transform: translateY(1px); }
.invite-form__submit:focus-visible { outline-offset: 4px; }
.invite-form__submit[disabled] { cursor: progress; filter: saturate(0.6) brightness(0.92); }

.invite-form__arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}
.invite-form__submit:hover .invite-form__arrow { transform: translateX(4px); }

.form-status {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 156, 143, 0.5);
  border-radius: 8px;
  background: rgba(60, 18, 20, 0.5);
  color: #ffd2cb;
  font-size: 0.98rem;
  text-align: center;
}

.invite-form__note {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 1rem;
  color: var(--text);
}

.invite-form__closing {
  margin: 0;
  text-align: center;
  font-size: 0.98rem;
  color: var(--rose);
}

.privacy-disclosure {
  margin: 0.8rem auto 0;
  max-width: 34rem;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- Confirmation ---------- */

.confirmation {
  padding: clamp(1.5rem, 6vh, 4rem) 0;
  outline: none;
}

.confirmation__title {
  margin: 0.5rem 0 1rem;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vh, 2.6rem);
  line-height: 1.15;
  color: var(--ivory);
}

.confirmation__thanks {
  margin: 0 0 0.6rem;
  font-size: 1.12rem;
}

.confirmation__promise {
  margin: 0 auto 0.5rem;
  max-width: 26ch;
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vh, 1.6rem);
  line-height: 1.25;
  color: var(--rose);
}

.confirmation__sign {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rose-soft);
}

.panel--confirmed .confirmation { animation: reveal 0.9s ease both; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  grid-column: 1 / -1;
  padding: 1rem 0 0.25rem;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--rose-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) and (min-width: 901px) {
  .page { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); column-gap: 2.5rem; padding-inline: 2rem; }
  .brand__wordmark { font-size: 2.4rem; }
  .brand__tagline { letter-spacing: 0.22em; }
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding: 2.25rem 1rem 1rem;
    row-gap: 0.5rem;
    max-width: 640px;
  }

  .brand { padding: 0.5rem 0 1.25rem; }
  .brand__logo { width: 156px; }
  .brand__wordmark { font-size: clamp(2rem, 9vw, 2.6rem); letter-spacing: 0.36em; margin-right: -0.36em; }
  .brand__tagline { font-size: 0.78rem; letter-spacing: 0.22em; line-height: 1.6; }

  .panel { padding: 1.75rem 1.15rem 1.5rem; border-radius: 18px; }
  .story__headline { font-size: clamp(1.65rem, 7vw, 2rem); }
  .story__statement { font-size: clamp(1.28rem, 5.4vw, 1.5rem); }
  .story--opening p, .story__body { font-size: 1.04rem; }
  .sep { margin: 1.1rem 0; }
}

@media (max-width: 380px) {
  .field__control--code { flex-basis: 7.4rem; }
  .field__control--code select { font-size: 1rem; padding-right: 2.2rem; }
  .invite-form__submit { letter-spacing: 0.2em; font-size: 0.9rem; }
}

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

/* ---------- Standalone pages (thank-you, privacy, 404) ---------- */

.solo {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1rem;
}
.solo__logo { width: 120px; }
.solo__panel { width: min(100%, 600px); }

.doc {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}
.doc__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; text-decoration: none; }
.doc__header img { width: 64px; height: 64px; }
.doc__header span { font-family: var(--serif-display); font-size: 1.6rem; letter-spacing: 0.3em; color: var(--ivory); }
.doc .panel { text-align: left; padding: clamp(1.5rem, 4vw, 2.75rem); }
.doc h1 { margin: 0 0 0.25rem; font-family: var(--serif-display); font-weight: 500; font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.1; color: var(--ivory); }
.doc h2 { margin: 1.75rem 0 0.5rem; font-family: var(--serif-display); font-weight: 600; font-size: 1.45rem; color: var(--rose-soft); }
.doc p, .doc li { font-size: 1.06rem; line-height: 1.6; color: var(--text); }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.35rem; }
.doc__meta { margin-top: 0; color: var(--muted) !important; font-style: italic; }

/* Items the owner must fill in before publication */
.todo {
  padding: 0.05rem 0.4rem;
  border: 1px dashed var(--rose);
  border-radius: 4px;
  background: rgba(234, 165, 159, 0.12);
  color: var(--rose-soft);
  font-style: normal;
}
