/* The First Key · Barbara Queen · Maison Sarti Éditions
   Palette: cream #F5EEE3 · oxblood #4A0E0E · deep ink #140D0F */

@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/ebgaramond-italic.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
  --cream: #F5EEE3;
  --cream-2: #EDE3D4;
  --oxblood: #4A0E0E;
  --oxblood-2: #6B1A1A;
  --ink: #140D0F;
  --ink-2: #1D1315;
  --ink-text: #2A1A1A;
  --cream-70: rgba(245, 238, 227, .72);
  --cream-45: rgba(245, 238, 227, .45);
  --cream-20: rgba(245, 238, 227, .20);
  --ox-40: rgba(74, 14, 14, .40);
  --ox-20: rgba(74, 14, 14, .20);
  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --body: "EB Garamond", Garamond, Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
em { font-style: italic; }
::selection { background: var(--oxblood); color: var(--cream); }

.wrap { width: min(100% - 48px, 1120px); margin-inline: auto; }
.wrap--narrow { width: min(100% - 48px, 720px); }

/* ---------- type ---------- */
.eyebrow {
  margin: 0;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--cream-70);
  padding-left: .42em; /* optically recentre tracked caps */
}
.eyebrow em { text-transform: none; letter-spacing: .02em; font-size: 15px; }
.eyebrow--ink { color: var(--oxblood); }

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(64px, 19vw, 132px);
  line-height: .92;
  letter-spacing: -.012em;
  color: var(--cream);
}
.h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 8.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -.005em;
  color: var(--oxblood);
}
.h2 em { font-weight: 300; }
.h2, .confession blockquote p, .subhead { text-wrap: balance; }
.h2--light { color: var(--cream); }

/* ---------- I. hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(107, 26, 26, .42) 0%, rgba(74, 14, 14, .12) 45%, transparent 70%),
    radial-gradient(90% 50% at 50% 100%, rgba(74, 14, 14, .30), transparent 70%),
    var(--ink);
  isolation: isolate;
}
.hero__portrait { display: none; margin: 0; }

.hero__panel { position: relative; padding: 56px 0 60px; }
.frame {
  position: absolute; inset: 14px;
  border: 1px solid var(--cream-20);
  pointer-events: none;
}
.frame::after {
  content: ""; position: absolute; inset: 4px;
  border: 1px solid rgba(245, 238, 227, .10);
}
.hero__inner {
  position: relative;
  width: min(100% - 64px, 460px);
  margin-inline: auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero .eyebrow { font-size: 10.5px; }

.seal {
  width: 88px; height: auto;
  margin: 30px auto 22px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)) drop-shadow(0 0 28px rgba(107, 26, 26, .35));
}
.subhead {
  margin: 20px 0 0;
  max-width: 21em;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.32;
  color: var(--cream-70);
}
.subhead em { font-style: normal; color: var(--cream); }

.rule {
  display: block; width: 44px; height: 1px; margin: 30px auto 28px;
  background: var(--cream-45);
  position: relative;
}
.rule::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; background: var(--ink); border: 1px solid var(--cream-45);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- form ---------- */
.key-form { width: 100%; text-align: left; }
.field { margin: 0 0 16px; }
.field label, .field legend {
  display: block; margin: 0 0 6px;
  font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--cream-45);
}
.field input[type="text"], .field input[type="email"] {
  width: 100%; height: 54px; padding: 0 16px;
  font: 400 18px/1 var(--body);
  color: var(--cream);
  background: rgba(245, 238, 227, .035);
  border: 1px solid var(--cream-20);
  border-radius: 0;
  -webkit-appearance: none; appearance: none;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.field input::placeholder { color: rgba(245, 238, 227, .30); font-style: italic; }
.field input:focus { outline: none; border-color: var(--cream-70); background: rgba(245, 238, 227, .06); }
.field input[aria-invalid="true"] { border-color: #C88A7F; }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--cream);
  -webkit-box-shadow: 0 0 0 1000px #221618 inset;
  caret-color: var(--cream);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 58px; margin-top: 8px;
  font: 500 13px/1 var(--body);
  letter-spacing: .46em; text-transform: uppercase; text-decoration: none;
  color: var(--cream);
  background: var(--oxblood);
  border: 1px solid rgba(245, 238, 227, .55);
  box-shadow: inset 0 0 0 3px var(--oxblood), inset 0 0 0 4px rgba(245, 238, 227, .22);
  border-radius: 0; cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.btn span { padding-left: .46em; }
.btn:hover, .btn:focus-visible { background: var(--cream); color: var(--oxblood); box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px var(--ox-40); outline: none; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--ghost { width: auto; min-width: 240px; padding: 0 36px; margin-top: 36px; }

.form-msg { min-height: 1.4em; margin: 12px 0 0; font-size: 15px; font-style: italic; color: #E4B9AF; text-align: center; }

.key-sent { width: 100%; padding: 28px 22px; border: 1px solid var(--cream-20); text-align: center; color: var(--cream-70); outline: none; }
.key-sent p { margin: 0 0 10px; }
.key-sent__title { font-family: var(--display); font-size: 28px; font-style: italic; color: var(--cream); }
.key-sent__note { font-size: 15px; color: var(--cream-45); margin: 0 !important; }

.closing-line {
  margin: 26px 0 0;
  font-size: 15.5px; line-height: 1.6;
  font-style: italic;
  color: var(--cream-45);
}

/* ---------- paper sections (the kit) ---------- */
.paper {
  background: var(--cream);
  color: var(--ink-text);
  background-image: radial-gradient(120% 80% at 50% 0%, #F8F2E9 0%, var(--cream) 60%, var(--cream-2) 100%);
}

/* ---------- II. what arrives ---------- */
.arrives { padding: 88px 0 92px; text-align: center; }
.arrives .h2 { margin: 18px auto 0; max-width: 14em; }
.sequence { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 0; }
.sequence li { padding: 34px 8px 36px; border-top: 1px solid var(--ox-20); }
.sequence li:last-child { border-bottom: 1px solid var(--ox-20); }
.numeral { display: block; font-family: var(--display); font-size: 17px; letter-spacing: .2em; color: var(--oxblood); opacity: .8; }
.when { margin: 10px 0 2px; font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: rgba(42, 26, 26, .6); padding-left: .34em; }
.sequence h3 { margin: 4px 0 10px; font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1.1; color: var(--oxblood); }
.sequence p:last-child { margin: 0 auto; max-width: 25em; font-size: 17.5px; color: rgba(42, 26, 26, .86); }

/* ---------- III. confession ---------- */
.confession {
  padding: 96px 0 100px; text-align: center;
  background:
    radial-gradient(80% 70% at 50% 50%, rgba(107, 26, 26, .55), transparent 75%),
    var(--oxblood);
  background-color: #3A0B0C;
}
.confession .eyebrow { color: var(--cream-70); line-height: 2; }
.conf-title { margin: 8px 0 0; font-family: var(--display); font-size: 19px; color: var(--cream-70); }
.confession blockquote { margin: 30px 0 0; }
.confession blockquote p {
  margin: 0;
  font-family: var(--display);
  font-style: italic; font-weight: 400;
  font-size: clamp(28px, 7.4vw, 44px);
  line-height: 1.24;
  color: var(--cream);
  text-wrap: balance;
}
.coda {
  margin: 38px auto 0; padding-top: 30px; max-width: 22em;
  border-top: 1px solid var(--cream-20);
  width: 64px; width: auto;
  font-size: 16px; color: var(--cream-70); letter-spacing: .02em;
  position: relative;
}
.coda { border-top: 0; }
.coda::before { content: ""; position: absolute; top: 0; left: 50%; width: 44px; height: 1px; background: var(--cream-45); transform: translateX(-50%); }

/* ---------- IV. author ---------- */
.author { padding: 88px 0 96px; }
.author__grid { display: grid; gap: 46px; }
.author__photo { margin: 0; position: relative; padding: 10px; border: 1px solid var(--ox-40); }
.author__photo::after { content: ""; position: absolute; inset: 4px; border: 1px solid var(--ox-20); pointer-events: none; }
.author__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; }
.author__note { text-align: center; }
.author__note .h2 { margin: 16px 0 24px; }
.author__note p:not(.eyebrow):not(.signature) { margin: 0 auto 16px; max-width: 27em; font-size: 18px; line-height: 1.66; color: rgba(42, 26, 26, .9); }
.signoff { font-size: 20px !important; color: var(--oxblood) !important; margin-top: 24px !important; }
.signature { margin: 4px 0 0; font-family: var(--display); font-style: italic; font-weight: 300; font-size: 44px; line-height: 1; color: var(--oxblood); }

/* ---------- V. last call ---------- */
.lastcall { padding: 92px 0 96px; text-align: center; background: radial-gradient(90% 70% at 50% 0%, rgba(107, 26, 26, .35), transparent 70%), var(--ink); }
.seal--small { width: 64px; margin: 0 auto 28px; }

/* ---------- footer ---------- */
.footer { padding: 44px 0 56px; background: #0E0909; border-top: 1px solid rgba(245, 238, 227, .08); text-align: center; }
.footer p { margin: 0 auto 8px; max-width: 34em; font-size: 13.5px; line-height: 1.6; color: rgba(245, 238, 227, .5); }
.footer__brand { font-size: 11px !important; letter-spacing: .36em; text-transform: uppercase; color: var(--cream-70) !important; margin-bottom: 16px !important; }
.footer .nw { white-space: nowrap; }
.footer__brand .sep { letter-spacing: 0; }
@media (max-width: 699px) { .footer .sep { display: none; } .footer__brand .nw, .footer .co { display: block; } }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__inner > * { animation: rise 1.1s var(--ease) both; }
  .hero__inner > :nth-child(2) { animation-delay: .08s; }
  .hero__inner > :nth-child(3) { animation-delay: .16s; }
  .hero__inner > :nth-child(4) { animation-delay: .24s; }
  .hero__inner > :nth-child(n+5) { animation-delay: .32s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
.no-motion .hero__inner > * { animation: none !important; }

/* ========== tablet ========== */
@media (min-width: 700px) {
  .hero__panel { padding: 88px 0 92px; }
  .frame { inset: 22px; }
  .sequence { grid-template-columns: repeat(3, 1fr); margin-top: 64px; }
  .sequence li { padding: 38px 30px 40px; border-top: 1px solid var(--ox-20); border-bottom: 1px solid var(--ox-20); }
  .sequence li + li { border-left: 1px solid var(--ox-20); }
  .sequence h3 { font-size: 28px; }
  .sequence p:last-child { font-size: 17px; }
}

/* ========== desktop ========== */
@media (min-width: 1024px) {
  body { font-size: 19px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: max(100vh, 860px); }
  .hero__portrait { display: block; position: relative; overflow: hidden; }
  .hero__portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: saturate(.92) contrast(1.02); }
  .hero__portrait::after {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(90deg, transparent 55%, rgba(20, 13, 15, .55) 82%, var(--ink) 100%),
      linear-gradient(0deg, rgba(20, 13, 15, .55) 0%, transparent 30%);
  }
  .hero__panel { display: flex; align-items: center; padding: 72px 0; }
  .frame { inset: 28px 28px 28px 0; }
  .hero__inner { width: min(100% - 120px, 560px); }
  .key-form, .key-sent { max-width: 460px; }
  .seal { width: 92px; margin: 34px auto 26px; }
  .display { font-size: clamp(84px, 7.2vw, 108px); white-space: nowrap; }
  .subhead { font-size: 24px; }

  .arrives { padding: 128px 0 132px; }
  .confession { padding: 140px 0 144px; }
  .coda { font-size: 17px; }

  .author { padding: 128px 0 136px; }
  .author__grid { grid-template-columns: 400px minmax(0, 1fr); gap: 96px; align-items: center; width: min(100% - 96px, 1000px); }
  .author__note { text-align: left; }
  .author__note p:not(.eyebrow):not(.signature) { margin-left: 0; }
  .author__note .eyebrow { padding-left: 0; }

  .lastcall { padding: 132px 0 136px; }
  .footer { padding: 56px 0 64px; }
}

/* ---------- footer links ---------- */
.footer a { color: var(--cream-70); text-decoration: none; border-bottom: 1px solid var(--cream-20); padding-bottom: 1px; transition: color .3s var(--ease), border-color .3s var(--ease); }
.footer a:hover, .footer a:focus-visible { color: var(--cream); border-color: var(--cream-70); outline: none; }

/* ---------- privacy page ---------- */
.legal-hero {
  position: relative; text-align: center; padding: 64px 0 60px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(107, 26, 26, .42) 0%, rgba(74, 14, 14, .12) 45%, transparent 75%),
    var(--ink);
}
.legal-hero .frame { bottom: 0; border-bottom: 0; }
.legal-hero .frame::after { bottom: 0; border-bottom: 0; }
.legal-hero__inner { position: relative; width: min(100% - 64px, 560px); margin-inline: auto; display: flex; flex-direction: column; align-items: center; }
.legal-home { text-decoration: none; font-size: 10.5px; }
.legal-home:hover { color: var(--cream); }
.legal-hero .seal--small { margin: 28px auto 18px; width: 60px; }
.legal-title { font-size: clamp(52px, 14vw, 88px); font-weight: 300; line-height: 1; }
.legal-hero .subhead { margin-top: 14px; }

.legal { padding: 64px 0 88px; }
.legal__body { max-width: 640px; }
.legal__lede { margin: 0 0 12px; font-family: var(--display); font-style: italic; font-size: 23px; line-height: 1.4; color: var(--oxblood); text-wrap: balance; }
.legal h2 {
  margin: 44px 0 12px;
  font-family: var(--body); font-weight: 500;
  font-size: 11.5px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--oxblood);
  display: flex; align-items: center; gap: 14px;
}
.legal h2::after { content: ""; flex: 1; height: 1px; background: var(--ox-20); }
.legal p { margin: 0 0 14px; font-size: 18px; line-height: 1.7; color: rgba(42, 26, 26, .9); }
.legal a { color: var(--oxblood); text-decoration: none; border-bottom: 1px solid var(--ox-40); }
.legal a:hover, .legal a:focus-visible { border-color: var(--oxblood); outline: none; }
.legal__date { margin-top: 48px !important; padding-top: 22px; border-top: 1px solid var(--ox-20); font-style: italic; font-size: 16px !important; color: rgba(42, 26, 26, .65) !important; }
.legal__back { margin-top: 18px !important; font-size: 13px !important; letter-spacing: .3em; text-transform: uppercase; }
.legal__back a { border: 0; }

@media (min-width: 1024px) {
  .legal-hero { padding: 96px 0 88px; }
  .legal { padding: 96px 0 128px; }
  .legal__lede { font-size: 26px; }
  .legal h2 { margin-top: 52px; }
}
