/* Preiser Key — site styles
   Layout: cream editorial pages, one collage hero, every path ends at the email field.
   Palette: "The Garden Ledger" (linen, sage, moss, terracotta, charcoal, key yellow). */

:root {
  --cream: #f4efe5;   /* Linen */
  --ink: #34332f;     /* Charcoal */
  --mustard: #ffde59;
  --brown: #b78474;   /* Terracotta */
  --sage: #87917a;
  --moss: #4f5c4a;
  --olive: #4f5c4a;   /* Moss */
  --cream-75: rgba(244, 239, 229, 0.78);
  --cream-60: rgba(244, 239, 229, 0.62);
  --ink-20: rgba(52, 51, 47, 0.2);

  --font-display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  --font-display-italic: 'Libre Caslon Text', Georgia, serif;
  --font-body: Jost, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-hand: 'Homemade Apple', 'Bradley Hand', cursive;
  --font-logo: 'Bodoni Moda', Didot, 'Bodoni 72', serif;

  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --measure: 62ch;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.65; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: max(72px, env(safe-area-inset-left, 0px));
  padding-right: max(72px, env(safe-area-inset-right, 0px));
}
@media (max-width: 900px) {
  .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
}

/* Type helpers */
.eyebrow { font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; }
.eyebrow--olive { color: var(--olive); }
.eyebrow--mustard { color: var(--mustard); }
.fine { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--olive); }
.link-line { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 6px; }
.hand { font-family: var(--font-hand); color: var(--brown); line-height: 1.85; }
.italic { font-family: var(--font-display-italic); font-style: italic; }

/* Logo */
.logo { display: block; color: inherit; }
.logo img, .logo svg { width: 100%; height: auto; }
.logo--mustard { color: var(--mustard); }

/* Pill button */
.pill {
  display: inline-block;
  font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
  background: var(--mustard); color: var(--ink); border: 1px solid var(--mustard); border-radius: 999px;
  padding: 14px 26px 13px; cursor: pointer;
}
.pill:hover { opacity: 0.85; }

/* Bordered button */
.btn {
  display: inline-block; font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
  background: var(--mustard); color: var(--ink); border: 1px solid var(--ink); padding: 16px 28px 15px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.btn:hover { opacity: 1; transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* Social links */
.social { display: inline-flex; align-items: center; gap: 10px; }
.social svg { width: 18px; height: 18px; flex: none; }

/* Email form (shared) */
.email-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.email-form__row { display: flex; align-items: flex-end; gap: 20px; border-bottom: 2px solid var(--mustard); }
.email-form input[type="email"] {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font-family: var(--font-body); font-weight: 300; font-size: 17px; padding: 10px 0; color: inherit; outline: 0;
}
.email-form input::placeholder { color: inherit; opacity: 0.55; }
.email-form button {
  display: inline-flex; align-items: center; gap: 12px; border: 0; background: transparent; cursor: pointer; color: inherit;
  font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; padding: 12px 0;
}
.email-form--dark .email-form__row { border-bottom-width: 1px; }
.honeypot { position: absolute; left: -9999px; }

/* ---------- Site header (non-hero pages) ---------- */
.site-header { padding-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.site-header .logo { width: 260px; }
.nav { display: flex; gap: 40px; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }

/* ---------- Hero: the Collage ---------- */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero__stage {
  position: relative; max-width: 1440px; margin: 0 auto;
  aspect-ratio: 1440 / 900; container-type: inline-size;
}
.hero__header { position: absolute; top: 4%; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.hero__header .logo { width: 22%; }

/* Corner ornaments, lifted from the tearsheet cover */
.hero__corner { position: absolute; top: 3%; width: 11cqw; aspect-ratio: 1; pointer-events: none; z-index: 3; background: url(../assets/logo/corner.svg) no-repeat 0 0 / contain; }
.hero__corner--l { left: 1.9%; }
.hero__corner--r { right: 1.9%; transform: scaleX(-1); }

.hero__title {
  position: absolute; left: 5%; top: 23%; z-index: 2;
  font-size: 8cqw; line-height: 0.88; letter-spacing: -0.02em;
  display: block; white-space: nowrap;
}
.hero__title span:first-child { display: block; margin-bottom: 1.1cqw; }
.hero__title span + span { font-family: var(--font-display-italic); font-style: italic; }
.hero__lead { display: contents; }
.hero__dek { position: absolute; left: 5.3%; top: 54%; width: 31%; font-size: max(14px, 1.25cqw); line-height: 1.5; }
.hero__cta { position: absolute; left: 5.3%; top: 67%; font-size: 14.4px; padding: 19px 34px 18px; }

.frame { position: absolute; overflow: hidden; background: var(--sage); box-shadow: 0 1.2cqw 2.6cqw rgba(52, 51, 47, 0.18); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--a { left: 43.5%; top: 17%; width: 31%; height: 70%; }
.frame--c { left: 70%; top: 11%; width: 26%; height: 43%; z-index: 1; }
.frame--b { left: 64%; top: 47%; width: 29%; height: 43%; border: 0.7cqw solid var(--mustard); z-index: 2; }

.hero__note {
  position: absolute; left: 33.5%; top: 68%; width: 19%; z-index: 3;
  transform: rotate(-5deg); font-size: max(13px, 1.3cqw);
  background: var(--cream); padding: 1.3cqw 1.5cqw 1.1cqw; box-shadow: 0 0.6cqw 1.6cqw rgba(52, 51, 47, 0.22);
}

/* Ticker */
.ticker {
  position: absolute; left: 0; right: 0; bottom: 0; height: 60px;
  border-top: 1px solid var(--ink); overflow: hidden; display: flex; align-items: center; background: var(--cream); z-index: 4;
  font-size: 16px; font-weight: 400; letter-spacing: 0.28em; text-transform: uppercase; white-space: nowrap;
}
.ticker__track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker__track span { padding: 0 36px; }
.ticker__track span::after { content: "·"; margin-left: 72px; color: var(--brown); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* Hero at phone width: the mobile collage */
@media (max-width: 700px) {
  .hero__stage { aspect-ratio: 390 / 844; }
  .hero__header { top: 3.4%; }
  .hero__header .logo { width: 50%; }
  .hero__corner { top: 1.4%; width: 20cqw; }
  .hero__corner--l { left: 3%; } .hero__corner--r { right: 3%; }
  .hero__title { left: 5.6%; top: 12%; font-size: 17.6cqw; display: block; white-space: nowrap; }
  .hero__title span:first-child { margin-bottom: 3.2cqw; }
  .hero__lead { position: absolute; left: 6.2%; top: 32.6%; bottom: 42.58%; width: 87.6%; display: flex; flex-direction: column; align-items: center; }
  .hero__dek { position: static; width: 100%; font-size: 18.75px; line-height: 1.42; }
  .hero__cta { position: static; margin-block: auto; white-space: nowrap; font-size: 13.75px; padding: 17.5px 27.5px 16.5px; }
  .frame--a { left: 38%; top: 57.42%; width: 57%; height: 33.08%; }
  .frame--b { left: 5%; top: 68%; width: 46%; height: 22.5%; border-width: 8px; }
  .frame--c { display: none; }
  .hero__note { left: 7%; top: 58.9%; width: 43%; font-size: 12.5px; line-height: 1.75; padding: 12px 12px 9px; }
  .ticker { height: 56px; font-size: 16.25px; letter-spacing: 0.24em; }
  .ticker__track span { padding: 0 20px; }
  .ticker__track span::after { margin-left: 40px; }
}

/* Photography: pull phone-bright photos toward the site's warm, muted palette */
.frame img, .card__img img, .band img { filter: saturate(0.84) contrast(0.97) sepia(0.07); }
.frame--a img { object-position: 50% 78%; }
.card__img img.pos-low { object-position: 50% 92%; }
.frame--b img { object-position: 50% 45%; }
.band { height: clamp(240px, 36vw, 520px); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
@media (max-width: 700px) { .section { padding-block: 56px; } }

/* The Key (home) */
.key-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: center; }
.key-copy { display: flex; flex-direction: column; gap: 22px; }
.key-copy h2 { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.05; }
.key-copy p { max-width: 460px; }
@media (max-width: 900px) { .key-grid { grid-template-columns: 1fr; gap: 40px; } }

/* The Key photo: the tearsheet's cover photograph */
.key-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--sage); }
.key-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }

/* No secrets here */
.begin { background: var(--ink); color: var(--cream); }
.begin__head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 56px; }
.begin__head h2 { font-size: clamp(36px, 3.6vw, 52px); line-height: 1; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.card { display: flex; flex-direction: column; gap: 18px; }
.card__img { position: relative; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; background: #5a5048; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__label {
  position: absolute; top: 16px; right: 20px; background: var(--mustard); color: var(--ink);
  border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; padding: 11px 16px 10px;
}
.card p { font-size: 17px; line-height: 1.5; }
.card p strong { display: block; margin-bottom: 6px; color: var(--mustard); font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } .begin__head { margin-bottom: 40px; } .card__img { aspect-ratio: 4 / 3; } }

/* Editor's note */
.note-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: center; }
.note-grid { align-items: start; }
.note-aside { display: flex; flex-direction: column; gap: 18px; }
.note-grid .hand { font-size: 26px; line-height: 1.5; }
.note-aside p:not(.hand) { max-width: 440px; line-height: 1.65; }
.note-copy { display: flex; flex-direction: column; gap: 20px; }
.note-copy h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.1; }
.note-copy p { max-width: 620px; line-height: 1.65; }
@media (max-width: 900px) { .note-grid { grid-template-columns: 1fr; gap: 28px; } .note-grid .hand { font-size: 21px; } }

/* Since 2007 */
.since { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.since .wrap { padding-block: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.since .italic { font-size: 22px; }
@media (max-width: 700px) { .since .wrap { flex-direction: column; text-align: center; gap: 12px; padding-block: 36px; } .since .italic { font-size: 18px; line-height: 1.4; } }

/* Footer */
.footer { background: var(--ink); color: var(--cream); }
.footer__grid { padding-block: 72px 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; align-items: start; }
.footer .logo { width: 220px; }
.footer__tag { margin-top: 18px; max-width: 300px; font-size: 15px; line-height: 1.5; color: var(--cream-75); }
.footer__nav { display: flex; flex-direction: column; gap: 14px; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; }
.footer__form { display: flex; flex-direction: column; gap: 12px; }
.footer__form .email-form__row { border-bottom: 1px solid var(--mustard); }
.footer__form input::placeholder { color: var(--cream-60); }
.footer__legal { padding-bottom: 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-60); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr; gap: 28px; padding-block: 56px 32px; } .footer .logo { width: 180px; } .footer__legal { flex-direction: column; gap: 6px; } }

/* ---------- The Key page ---------- */
.key-header { padding-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.key-header .logo { width: 260px; }
.key-header .fine { width: 120px; }
.key-header .fine--right { text-align: right; color: inherit; }
@media (max-width: 700px) {
  .key-header { flex-direction: column; gap: 16px; padding-top: 22px; }
  .key-header .fine { width: 100%; display: flex; justify-content: space-between; }
  .key-header .logo { width: 200px; }
}
.key-hero { padding-block: 80px 96px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: center; }
.key-hero .key-copy h1 { font-size: clamp(42px, 5.3vw, 76px); line-height: 1; }
.key-hero .email-form button.pill { margin-bottom: 8px; }
@media (max-width: 900px) {
  .key-hero { grid-template-columns: 1fr; gap: 40px; padding-block: 44px 48px; }
  .key-hero .email-form__row { flex-direction: column; align-items: stretch; gap: 0; }
  .key-hero .email-form button.pill { width: 100%; margin: 14px 0 0; text-align: center; }
}
.avas { border-top: 1px solid var(--ink); }
.avas .wrap { padding-block: 72px 80px; display: flex; flex-direction: column; gap: 28px; }
.avas__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.avas__head h2 { font-size: clamp(32px, 3vw, 44px); line-height: 1; }
.pills { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.pills span { border: 1px solid var(--ink); border-radius: 999px; padding: 12px 20px 11px; }
.pills span.is-filled { background: var(--mustard); border-color: var(--mustard); }
.avas .hand { font-size: 19px; max-width: 520px; margin-top: 10px; }
.strip { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.strip .wrap { padding-block: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer--compact .wrap { padding-block: 56px 40px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer--compact .logo { width: 180px; }
.footer--compact .nav { gap: 32px; }
@media (max-width: 700px) { .strip .wrap { flex-direction: column; text-align: center; gap: 10px; } .footer--compact .wrap { flex-direction: column; align-items: flex-start; } }

/* Thank-you page */
.thanks { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 96px; }
.thanks__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 560px; }
.thanks h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.note-copy .link-line { align-self: flex-start; }
.email-form button.pill { background: var(--mustard); border: 1px solid var(--mustard); padding: 14px 26px 13px; justify-content: center; }

/* ---------- Email capture: the dark card ---------- */
.cap { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.cap__field { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid #fff; padding: 0 16px; }
.cap__field svg { width: 20px; height: 20px; flex: none; color: var(--moss); }
.cap__field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-family: var(--font-body); font-weight: 400; font-size: 17px; color: var(--ink); padding: 17px 0 16px; }
.cap__field input::placeholder { color: var(--ink); opacity: 0.5; }
.cap__field:focus-within { outline: 2px solid var(--mustard); outline-offset: 2px; }
.cap__btn { font-family: var(--font-body); font-size: 13px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; background: var(--mustard); color: var(--ink); border: 1.5px solid var(--mustard); padding: 18px 20px 17px; cursor: pointer; width: 100%; }
.cap__btn:hover { opacity: 0.85; }
.cap__label { font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; }
.cap--box { gap: 12px; margin-top: 6px; }
.cap--box .cap__field { border-color: var(--ink); }
.cap--box .cap__btn { border: 1px solid var(--ink); width: calc(100% - 4px); letter-spacing: 0.3em; box-shadow: 4px 4px 0 var(--ink); margin-bottom: 4px; transition: transform .15s, box-shadow .15s; }
.cap--box .cap__btn:hover { opacity: 1; transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.cap--box .cap__field { width: calc(100% - 4px); border-width: 1px; }
.note-solo .note-aside, .note-solo .note-copy { max-width: 720px; }
.note-solo .note-aside p:not(.hand) { max-width: 640px; }
#note { padding-top: 0; }
.note-solo .hand { font-size: 26px; line-height: 1.5; }
@media (max-width: 900px) { .note-solo .hand { font-size: 21px; } }
/* Friend block: beside the note on desktop, its own section at the bottom on phones */
@media (max-width: 900px) { .only-wide { display: none; } }
@media (min-width: 901px) { .only-narrow { display: none; } }
@media (min-width: 901px) { #note .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#note .note-aside p:not(.hand), #note .note-copy p { max-width: 540px; }
@media (min-width: 901px) { #note .note-copy h2 { white-space: nowrap; font-size: calc((min(100vw, 1440px) - 224px) / 2 / 15.8); } }
/* Editor's note as a paper note, like the hero's */
#note .note-aside {
  background: var(--cream); padding: 30px 32px 28px; max-width: 520px; justify-self: start;
  transform: rotate(-2deg); box-shadow: 0 8px 22px rgba(52, 51, 47, 0.22);
}
#note .note-grid { align-items: center; }
#note { padding-top: 16px; }
@media (max-width: 900px) { #note .note-aside { padding: 24px 22px 22px; transform: rotate(-1.5deg); } }
#signup { scroll-margin-top: 30vh; }
.cap__note { font-size: 14px; line-height: 1.5; color: var(--brown); }
.cap__note a { text-decoration: underline; }
.footer .cap__note { color: var(--mustard); }
