/* ============================================================
   Nada & Seamus — Paris · 12 December 2026
   Option 4 — "L'Éditorial": a photograph-led wedding site.
   The engagement photograph carries the first screen with a
   single line — "You're invited" — and the details follow.

   Shared language with the other options: wine #771d1d on warm
   ivory, Sudestada (script) + Edgethorn (italic) display faces.
   ============================================================ */

@font-face {
  font-family: "Sudestada";
  src: url("fonts/Sudestada.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Edgethorn";
  src: local("Edgethorn Italic"), local("Edgethorn-Italic"),
       url("fonts/Edgethorn-Italic.woff2") format("woff2"),
       url("fonts/Edgethorn-Italic.woff")  format("woff"),
       url("fonts/Edgethorn-Italic.ttf")   format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --wine:       #771d1d;
  --wine-deep:  #531414;
  --wine-soft:  #8f3a3a;
  --rose:       #b98a86;
  --rose-deep:  #a96f77;
  --ink:        #2b2521;
  --ink-soft:   #6c625a;
  --ivory:      #faf4ea;
  --ivory-2:    #f4ead8;
  --paper:      #fdfbf7;
  --line:       rgba(119, 29, 29, 0.20);
  --line-soft:  rgba(119, 29, 29, 0.11);

  --serif:   "Cormorant Garamond", Cormorant, "Hoefler Text", Garamond, serif;
  --script:  "Sudestada", "Pinyon Script", "Snell Roundhand", cursive;
  --display: "Edgethorn", "Cormorant Garamond", Garamond, serif;

  --maxw:   1140px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.02rem, 0.55vw + 0.9rem, 1.18rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--wine); color: var(--ivory); }

/* paper grain ------------------------------------------------------------- */
.grain {
  position: fixed; inset: 0; z-index: 9;
  pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* shared ------------------------------------------------------------------ */
.eyebrow {
  font-size: clamp(0.66rem, 0.4vw + 0.55rem, 0.78rem);
  letter-spacing: 0.42em; text-transform: uppercase;
  font-weight: 600; color: var(--wine); margin: 0;
}
.eyebrow--rose  { color: var(--rose-deep); }
.eyebrow--cream { color: var(--rose); }

.section { padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

.section__head { text-align: center; max-width: 40rem; margin: 0 auto; }
.section__title {
  font-family: var(--display);
  font-style: italic; font-weight: 500;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  letter-spacing: 0.01em; line-height: 1.05;
  margin: 0.5rem 0 0; color: var(--wine);
}
.section__intro { color: var(--ink-soft); font-size: 1.1rem; margin-top: 1rem; }

/* centred hairline rule with a diamond node */
.rule {
  display: flex; align-items: center; justify-content: center;
  gap: 0.85rem; margin: 1.5rem auto; color: var(--rose-deep);
  max-width: 15rem;
}
.rule::before, .rule::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, currentColor);
}
.rule::after { background: linear-gradient(90deg, currentColor, transparent); }
.rule span { width: 6px; height: 6px; transform: rotate(45deg); background: currentColor; }
.rule--cream { color: var(--rose); }

/* reveal on scroll -------------------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc((var(--d, 0) - 1) * 0.11s);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-d="1"]{--d:1;} .reveal[data-d="2"]{--d:2;} .reveal[data-d="3"]{--d:3;}
.reveal[data-d="4"]{--d:4;} .reveal[data-d="5"]{--d:5;} .reveal[data-d="6"]{--d:6;}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero__photo, .hero__invite { opacity: 1 !important; animation: none !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(0.9rem, 2vw, 1.35rem) var(--gutter);
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), padding 0.5s var(--ease);
}
.nav--solid {
  background: color-mix(in srgb, var(--ivory) 90%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  box-shadow: 0 1px 0 var(--line-soft);
  padding-top: clamp(0.65rem, 1.3vw, 0.95rem);
  padding-bottom: clamp(0.65rem, 1.3vw, 0.95rem);
}
.nav__mark { text-decoration: none; color: var(--wine); }
.nav__name { font-family: var(--display); font-style: italic; font-size: 1.35rem; line-height: 1; color: var(--wine); }
.nav__links { display: flex; align-items: center; gap: clamp(0.9rem, 1.8vw, 1.9rem); }
.nav__links a {
  text-decoration: none; color: var(--ink);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; position: relative; padding-bottom: 3px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--wine);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__rsvp {
  color: var(--wine) !important;
  border: 1px solid color-mix(in srgb, var(--wine) 35%, transparent);
  padding: 0.42rem 1rem !important; border-radius: 2px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.nav__rsvp::after { display: none; }
.nav__rsvp:hover { background: var(--wine); color: var(--ivory) !important; }

/* ============================================================
   Hero — the photograph, full bleed, with one line over it
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  background: var(--ivory-2);
  overflow: hidden;
}

.hero__photo { position: absolute; inset: 0; }
.hero__photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* biased low: when an unusually wide window crops vertically,
     keep the couple (lower half) rather than empty sky */
  object-position: 50% 72%;
  opacity: 0; transform: scale(1.02);
}
.play-hero .hero__photo img { animation: photoIn 1.8s var(--ease) 0.1s forwards; }
@keyframes photoIn { to { opacity: 1; transform: none; } }

/* the single line, in the sky of the photograph */
.hero__invite {
  position: absolute; left: 0; right: 0;
  top: 15vh; top: 15svh;
  z-index: 3; text-align: center;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3.2rem, 10.5vw, 7.25rem);
  line-height: 1; color: var(--wine);
  text-shadow: 0 0 26px rgba(250, 244, 234, 0.5);
  pointer-events: none;
  opacity: 0; transform: translateY(14px);
}
.play-hero .hero__invite { animation: inviteIn 1.5s var(--ease) 0.75s forwards; }
@keyframes inviteIn { to { opacity: 1; transform: none; } }

/* portrait screens (phones): the portrait crop, sky sits lower */
@media (max-aspect-ratio: 1/1) {
  .hero__photo img { object-position: 50% 40%; }
  .hero__invite { top: 26vh; top: 26svh; }
}

.scrollcue {
  position: absolute; bottom: clamp(1.4rem, 3.5vh, 2.6rem);
  left: 50%; transform: translateX(-50%); z-index: 3;
  width: 30px; height: 34px; display: grid; place-items: start center;
}
.scrollcue__line {
  width: 1px; height: 26px;
  background: linear-gradient(rgba(250, 244, 234, 0.95), transparent);
  animation: cue 2.2s var(--ease) infinite; transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(26px); opacity: 0; }
}

/* ============================================================
   Decorative images — crest, garland, roses
   ============================================================ */
.deco {
  display: block;
  margin: 0 auto 1.4rem;
  max-width: 100%;
}
.deco--crest  { width: clamp(7rem, 16vw, 11rem); }
.deco--garland { width: clamp(16rem, 44vw, 28rem); }
.deco--roses  { width: clamp(5.5rem, 13vw, 9rem); }

/* Venue thumbnails in itinerary when-column */
.prog__venue-img {
  display: block;
  width: clamp(7rem, 13vw, 11rem);
  margin-top: 0.75rem;
}
.prog__row[data-d="1"] .prog__venue-img,
.prog__row[data-d="3"] .prog__venue-img {
  width: clamp(9rem, 16vw, 13.5rem);
}
.prog__row[data-d="2"] .prog__venue-img {
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 600px) {
  .prog__when { flex-wrap: wrap; }
  .prog__venue-img { flex-basis: 100%; margin-top: 0.5rem; }
}

/* ============================================================
   The Details — the invitation, set in type
   ============================================================ */
.details { background: var(--ivory); }
.details__inner { text-align: center; max-width: 46rem; margin: 0 auto; }
.details__eyebrow { color: var(--wine); }

.couple {
  font-family: var(--script); font-weight: 400; color: var(--wine);
  line-height: 0.94; margin: clamp(1.8rem, 3.4vw, 2.6rem) 0 0;
}
.couple__name { display: block; font-size: clamp(2.5rem, 7vw, 4.9rem); }
.couple__amp {
  display: block; font-size: clamp(2.2rem, 5.2vw, 3.5rem);
  color: var(--rose-deep); margin: 0.08rem 0; line-height: 1;
}

.details__request {
  font-style: italic; color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.7vw, 1.34rem); line-height: 1.55;
  margin-top: clamp(1.3rem, 2.6vw, 1.9rem);
}
.details__date {
  font-variant: small-caps; letter-spacing: 0.16em;
  font-size: clamp(1.06rem, 1.7vw, 1.42rem); font-weight: 600;
  color: var(--ink);
}
.details__time { font-style: italic; color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.22rem); margin-top: 0.25rem; }
.details__place { font-style: italic; font-size: clamp(1.04rem, 1.6vw, 1.36rem); color: var(--wine-deep); margin-top: 0.55rem; }
.details__note {
  font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: clamp(1rem, 2.2vw, 1.5rem);
}

/* ============================================================
   Itinerary — the programme
   ============================================================ */
.prog {
  max-width: 56rem; margin: clamp(2.4rem, 5vw, 3.8rem) auto 0;
  border-top: 1px solid var(--line);
}
.prog__row {
  display: grid; grid-template-columns: minmax(9.5rem, 14rem) 1fr;
  gap: clamp(1.4rem, 4vw, 3.4rem);
  padding: clamp(1.9rem, 3.6vw, 2.9rem) clamp(0.2rem, 1.5vw, 1rem);
  border-bottom: 1px solid var(--line);
}
.prog__when { text-align: left; padding-top: 0.45rem; }
.prog__day {
  font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--rose-deep); font-weight: 600;
}
.prog__date {
  font-variant: small-caps; letter-spacing: 0.1em; font-weight: 600;
  color: var(--ink); font-size: 1.1rem; margin-top: 0.3rem;
}
.prog__what { text-align: left; }
.prog__name {
  font-family: var(--script); font-size: clamp(2.2rem, 4.4vw, 3rem);
  color: var(--wine); line-height: 1;
}
.prog__meta { margin-top: 0.6rem; color: var(--ink); font-size: 1.06rem; }
.prog__meta em { font-style: italic; }
.prog__place { font-variant: small-caps; letter-spacing: 0.08em; font-weight: 600; color: var(--wine-deep); }
.prog__desc { color: var(--ink-soft); font-size: 0.98rem; margin-top: 0.45rem; max-width: 30rem; }
.prog__attire {
  font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 600;
  color: var(--wine); margin-top: 0.9rem;
}

/* ============================================================
   Photographs — woven between sections (placeholders until uploaded)
   ============================================================ */
.photos { padding: clamp(1.2rem, 3vw, 2.6rem) var(--gutter); }
.filmstrip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 1.2vw, 1rem);
  max-width: var(--maxw); margin: 0 auto;
}
.photoband { max-width: var(--maxw); margin: 0 auto; }
.shot {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: var(--paper) var(--img, none) center / cover no-repeat;
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.shot--banner { aspect-ratio: 21 / 9; }
.shot__ph { display: grid; place-items: center; gap: 0.5rem; color: color-mix(in srgb, var(--wine) 42%, var(--ivory-2)); }
.shot__ph svg { width: 34px; height: 34px; }
.shot__ph span { font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; }
/* when a real photo is set (see the HTML note by the filmstrip), hide the placeholder */
.shot--filled .shot__ph { display: none; }
.shot--filled { transition: transform 0.6s var(--ease); }
.shot--filled:hover { transform: scale(1.03); }

/* ============================================================
   Registry — cash funds only
   ============================================================ */
.registry { background: var(--ivory-2); }
.funds {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.1rem, 2.4vw, 2rem);
  max-width: 52rem; margin: clamp(2.4rem, 5vw, 3.4rem) auto 0;
}
.fund {
  text-align: center; background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(2rem, 3.4vw, 2.9rem) clamp(1.3rem, 2.6vw, 2.2rem);
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 22px 46px -38px rgba(83, 20, 20, 0.42);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease), border-color 0.55s var(--ease);
}
.fund:hover {
  transform: translateY(-7px);
  box-shadow: 0 26px 50px -30px color-mix(in srgb, var(--wine) 55%, transparent);
  border-color: color-mix(in srgb, var(--wine) 38%, var(--line));
}
.fund__no { font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--rose-deep); font-weight: 600; }
.fund__name {
  font-family: var(--script); font-size: clamp(2.2rem, 4vw, 2.8rem);
  color: var(--wine); line-height: 1; margin: 0.5rem 0 0;
}
.fund__desc { color: var(--ink-soft); font-size: 0.98rem; margin: 0.85rem auto 0; max-width: 20rem; }
.fund .btn { margin-top: 1.5rem; }
.registry__fine { text-align: center; font-style: italic; color: var(--ink-soft); margin-top: 1.9rem; font-size: 0.98rem; }
.registry__cta { display: flex; justify-content: center; margin-top: 2rem; }

/* ============================================================
   R.S.V.P. — the reply card + form
   ============================================================ */
.rsvp { background: linear-gradient(200deg, var(--wine-deep) 0%, var(--wine) 100%); text-align: center; }
.rsvp .section__title { color: var(--ivory); }
.rsvp .section__intro { color: #e8d4d0; }

.reply {
  position: relative; max-width: 40rem; margin: clamp(2.4rem, 5vw, 3.4rem) auto 0;
  background: var(--paper); color: var(--ink);
  border: 6px solid var(--paper);
  box-shadow: 0 40px 70px -34px rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}
.reply__inner { position: relative; padding: clamp(2.2rem, 5vw, 3.6rem) clamp(1.5rem, 4vw, 3rem); }
.reply__inner::before {
  content: ""; position: absolute; inset: clamp(0.7rem, 1.6vw, 1.1rem);
  border: 1px solid var(--line); pointer-events: none;
}
.reply__corner {
  position: absolute; font-family: var(--script); font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  color: var(--wine); line-height: 1; z-index: 1;
}
.reply__corner--tl { top: clamp(0.7rem, 1.8vw, 1.2rem); left: clamp(0.9rem, 2vw, 1.5rem); }
.reply__corner--tr { top: clamp(0.7rem, 1.8vw, 1.2rem); right: clamp(0.9rem, 2vw, 1.5rem); }
.reply__corner--bl { bottom: clamp(0.7rem, 1.8vw, 1.2rem); left: clamp(0.9rem, 2vw, 1.5rem); }
.reply__corner--br { bottom: clamp(0.7rem, 1.8vw, 1.2rem); right: clamp(0.9rem, 2vw, 1.5rem); }

.reply__lead { font-style: italic; color: var(--ink-soft); }
.reply__date { font-family: var(--script); font-size: clamp(2.4rem, 6vw, 3.4rem); color: var(--wine); line-height: 1; margin: 0.2rem 0 0.1rem; }

.form { display: grid; gap: 1.3rem; margin-top: 1.8rem; text-align: left; }
.field { display: grid; gap: 0.4rem; }
.field > label, .legend {
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600; color: var(--wine); padding: 0;
}
.input, .select, .textarea {
  width: 100%; font-family: var(--serif); font-size: 1.02rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  padding: 0.62rem 0.8rem; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.textarea { resize: vertical; min-height: 5.5rem; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--wine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 28%, transparent);
}
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23771d1d' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.2rem; }

.fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__box {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1rem; text-align: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 2px; background: #fff;
  font-style: italic; font-size: 1.06rem; color: var(--ink-soft);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.choice input:hover + .choice__box { border-color: color-mix(in srgb, var(--wine) 40%, var(--line)); }
.choice input:checked + .choice__box { border-color: var(--wine); background: color-mix(in srgb, var(--wine) 7%, #fff); color: var(--wine); font-style: normal; }
.choice input:focus-visible + .choice__box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 30%, transparent); }

.conditional { display: grid; gap: 1.3rem; overflow: hidden; }
.conditional[hidden] { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.btn {
  justify-self: center; margin-top: 0.4rem;
  font-family: var(--serif); font-size: 0.82rem; letter-spacing: 0.22em;
  text-transform: uppercase; font-weight: 600; cursor: pointer;
  color: var(--ivory); background: var(--wine); border: 1px solid var(--wine);
  border-radius: 2px; padding: 0.9rem 2.6rem;
  transition: background 0.4s var(--ease);
  text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--wine-deep); }
/* registry buttons awaiting their fund links */
.btn--pending { opacity: 0.55; cursor: not-allowed; }
.btn--pending:hover { background: var(--wine); }

.form__fine { text-align: center; font-size: 0.9rem; color: var(--ink-soft); font-style: italic; margin-top: 0.2rem; }

.reply__thanks { display: none; padding: clamp(0.5rem, 2vw, 1.5rem) 0; }
.reply.is-sent .form, .reply.is-sent .reply__lead, .reply.is-sent .reply__date { display: none; }
.reply.is-sent .reply__thanks { display: block; }
.thanks__mark { font-family: var(--script); font-size: 2.6rem; color: var(--rose-deep); line-height: 1; margin-bottom: 0.6rem; }
.thanks__title { font-family: var(--script); font-size: clamp(2.4rem, 5vw, 3.2rem); color: var(--wine); line-height: 1; }
.thanks__body { color: var(--ink-soft); margin-top: 0.8rem; }

/* ============================================================
   Footer
   ============================================================ */
.foot { background: var(--wine-deep); color: var(--ivory); text-align: center; padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter) clamp(2.5rem, 5vw, 3.5rem); }
.foot__invite { font-family: var(--script); font-size: 2.4rem; color: var(--rose); line-height: 1; margin-bottom: 1rem; }
.foot__names { font-family: var(--script); font-size: clamp(2.4rem, 6vw, 3.4rem); color: var(--ivory); line-height: 1; }
.foot__credit { font-style: italic; color: var(--rose); margin-bottom: 1rem; font-size: 1.1rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav__links a:not(.nav__rsvp) { display: none; }
  .funds { grid-template-columns: 1fr; max-width: 28rem; }
}
@media (max-width: 700px) {
  .prog__row { grid-template-columns: 1fr; gap: 0.9rem; }
  .prog__when { display: flex; align-items: baseline; gap: 0.8rem; padding-top: 0; }
  .prog__date { margin-top: 0; }
}
@media (max-width: 560px) {
  .choices { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .filmstrip { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }
}

/* ============================================================
   Password gate  (soft privacy screen — matches the other options)
   ============================================================ */
html:not(.is-unlocked) { overflow: hidden; }
html.is-unlocked .gate { display: none; }

.gate {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(120% 90% at 50% 10%, var(--paper), var(--ivory) 60%, var(--ivory-2));
  display: grid; place-items: center; padding: 2rem 1.25rem;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}
.gate--out { opacity: 0; visibility: hidden; pointer-events: none; }
.gate__inner { display: grid; justify-items: center; gap: clamp(1.1rem, 3vh, 1.8rem); text-align: center; max-width: min(90vw, 44rem); }
.gate__inner .deco { margin-bottom: 0; }
.gate__inner .deco--crest { width: clamp(11rem, 25vw, 16.5rem); }
.gate__eyebrow {
  font-size: 0.72rem; letter-spacing: 0.42em; text-transform: uppercase;
  font-weight: 600; color: var(--rose-deep);
}
.gate__welcome { font-family: var(--script); font-size: clamp(2rem, 7.5vw, 5.5rem); color: var(--wine); line-height: 1; margin-top: 0.3rem; white-space: nowrap; }
.gate__prompt { font-style: italic; color: var(--ink-soft); margin-top: -0.4rem; }
.gate__form { display: grid; justify-items: center; gap: 0.8rem; width: 100%; }
.gate__input {
  width: 100%; font-family: var(--serif); font-size: 1.05rem; text-align: center;
  letter-spacing: 0.08em; color: var(--wine); background: #fff;
  border: 1px solid var(--line); border-radius: 2px; padding: 0.62rem 0.8rem;
}
.gate__input::placeholder { color: color-mix(in srgb, var(--ink-soft) 55%, transparent); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.74rem; }
.gate__input:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 28%, transparent); }
.gate__input.shake { animation: gate-shake 0.4s var(--ease); }
@keyframes gate-shake { 0%,100%{transform:translateX(0);} 20%{transform:translateX(-7px);} 40%{transform:translateX(7px);} 60%{transform:translateX(-4px);} 80%{transform:translateX(4px);} }
.gate__submit {
  font-family: var(--serif); font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600;
  color: var(--ivory); background: var(--wine); border: 1px solid var(--wine); border-radius: 2px;
  padding: 0.7rem 2rem; cursor: pointer; transition: background 0.4s var(--ease);
}
.gate__submit:hover { background: var(--wine-deep); }
.gate__error { font-size: 0.84rem; font-style: italic; color: var(--wine); min-height: 1.1em; opacity: 0; transition: opacity 0.3s var(--ease); }
.gate__error.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .gate { transition: none; } }
