/* =============================================================================
   It's a travel planner! — Amber Editorial concept
   All tokens, type sizes and structural rules trace to _brief-design.pdf v1.0,
   which is the authoritative source of truth for the live page.
   ============================================================================= */

/* --------------------------- Fonts (self-hosted) -------------------------- */
/* Variable woff2 files in assets/fonts — no Google CDN call, so no visitor IP
   is sent to Google for fonts. font-weight ranges let one file cover all weights. */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/playfair.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/playfair-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/montserrat.woff2") format("woff2");
}

/* ----------------------------- Design tokens (§2) ------------------------- */
:root {
  --brand-bg:      #F6ECE0; /* page background — warm cream */
  --brand-surface: #FBF4EA; /* cards, hero side panel, input, 2nd section band */
  --brand-muted:   #736251; /* body copy, eyebrows, footer micro-text — AA on cream (5.0:1) */
  --brand-amber:   #E9B56B; /* primary CTA fill, bullet dots, selection */
  --brand-deep:    #915F18; /* italic accent words, links, amber CTA hover — AA on cream (4.7:1) */
  --brand-espresso:#33271B; /* all primary text — warm espresso */

  --font-display: "Playfair Display", Georgia, serif;
  --font-body:    "Montserrat", system-ui, sans-serif;

  --container: 80rem;        /* max-w-7xl */
  --gutter: 2rem;
  --ease-editorial: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-espresso);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* safety net: tilted postcard/stamp must never cause sideways scroll */
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

/* Selection uses amber at 30% opacity (§2 rules) */
::selection { background: rgba(233, 181, 107, 0.3); }

/* Keyboard focus (§8): espresso ring on light sections (12.4:1), cream ring on
   the dark footer (12.4:1) — amber (brief default) only hit 1.6:1 on cream. */
:focus-visible {
  outline: 2px solid var(--brand-espresso);
  outline-offset: 2px;
}
.footer :focus-visible { outline-color: var(--brand-bg); }

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

/* -------------------------------- Layout (§4) ----------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------- Typography (§3) -------------------------- */
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}
.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-deep);
}
.section-title--center { text-align: center; }

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 600;
  color: var(--brand-muted);
  margin: 0 0 1.25rem;
}
.eyebrow--deep { color: var(--brand-deep); }

.body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--brand-espresso);
  max-width: 60ch;
}

/* --------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: color 150ms, background-color 150ms, border-color 150ms;
}

.btn--amber {
  background: var(--brand-amber);
  color: var(--brand-espresso);
  padding: 1.25rem 2.5rem; /* §4: 2.5rem × 1.25rem */
  font-size: 0.95rem;
}
.btn--amber:hover { background: var(--brand-deep); color: #fff; }

.btn--ink {
  background: var(--brand-espresso);
  color: var(--brand-bg);
  padding: 1.15rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
}
.btn--ink:hover { background: var(--brand-deep); }

.btn--outline {
  border: 1px solid rgba(31, 26, 20, 0.2);
  color: var(--brand-espresso);
  padding: 0.65rem 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
}
.btn--outline:hover { background: var(--brand-espresso); color: var(--brand-bg); }

.btn--block { width: 100%; }

/* ----------------------------------- Nav (§5.1) --------------------------- */
.nav { padding-block: 2.5rem; } /* py-10 */
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* ---------------------------------- Hero (§5.2) --------------------------- */
.hero { padding-block: 8rem; } /* py-32 */
.hero__grid {
  display: grid;
  grid-template-columns: 7fr 5fr; /* 7/5 split */
  gap: 4rem;
  align-items: center;
}

.hero__eyebrow { margin-bottom: 1rem; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.75rem, 6vw, 6rem);
  line-height: 1.1;
  margin: 0 0 1.75rem;
  color: var(--brand-espresso); /* warmer/softer than near-black ink */
  overflow-wrap: break-word;    /* "recommendations" must never overflow narrow screens */
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-deep);
}

.hero__subhead {
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--brand-muted);
  max-width: 32ch;
  margin: 0 0 2.5rem;
}

/* Restrained fade-in on load (§6) */
.hero__subhead,
.hero__media { animation: fade-up 800ms var(--ease-editorial) both; }
.hero__media { animation-delay: 120ms; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__subhead, .hero__media { animation: none; }
}

.hero__media { position: relative; }

/* Serrated "stamp/postcard" edge: black mask with semicircular bites repeated
   along each of the four edges, intersected so all edges are notched. Each
   element sets its own --r (bite radius) and --d (spacing). */
.postcard, .stamp__paper {
  -webkit-mask:
    radial-gradient(circle var(--r) at 50% 0,    #0000 96%, #000) 0 0    / var(--d) 100% repeat-x,
    radial-gradient(circle var(--r) at 50% 100%, #0000 96%, #000) 0 100% / var(--d) 100% repeat-x,
    radial-gradient(circle var(--r) at 0 50%,    #0000 96%, #000) 0 0    / 100% var(--d) repeat-y,
    radial-gradient(circle var(--r) at 100% 50%, #0000 96%, #000) 100% 0 / 100% var(--d) repeat-y;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}

/* Big image → old postcard: warm-white deckle frame, aged tone, slight tilt. */
.postcard {
  --r: 9px; --d: 18px;
  margin: 0;
  padding: 16px 16px 22px;            /* deeper bottom edge, like a print */
  background: #FFFFFF;                 /* bright white so the frame reads against the cream page */
  transform: rotate(-1.6deg);
  filter: drop-shadow(0 22px 38px rgba(31, 26, 20, 0.26));
}
.hero__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: linear-gradient(160deg, var(--brand-surface), var(--brand-amber));
  filter: sepia(0.22) saturate(0.88) contrast(0.96) brightness(1.03);
}

/* Small image → oversized postage stamp with perforated edge + postmark. */
.stamp {
  position: absolute;
  left: -1.75rem;
  bottom: -2rem;
  width: 9.5rem;
  margin: 0;
  transform: rotate(-4deg);
}
.stamp__paper {
  --r: 5px; --d: 10px;       /* tighter perforations */
  display: block;
  padding: 8px;
  background: #FFFDF8;
  filter: drop-shadow(0 12px 20px rgba(31, 26, 20, 0.22));
}
.stamp img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: linear-gradient(160deg, var(--brand-amber), var(--brand-surface));
}

/* Postmark: inked rings + curved text, stamped over the top-right of the stamp. */
.postmark {
  position: absolute;
  top: -0.7rem;
  right: 0.3rem;
  width: 6rem;
  height: 6rem;
  transform: rotate(-13deg);
  color: var(--brand-espresso);
  opacity: 0.7;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.pm-ring { fill: none; stroke: currentColor; stroke-width: 2.4; }
.pm-ring--inner { stroke-width: 1.4; }
.pm-arc, .pm-date {
  fill: currentColor;
  font-family: var(--font-body);
  font-weight: 600;
  text-anchor: middle;
}
.pm-arc { font-size: 9.5px; letter-spacing: 0.5px; }
.pm-date { font-size: 11px; letter-spacing: 1px; }

/* --------------------- Social proof / testimonial quote ------------------- */
/* Amber band (the CTA's resting fill) to break the page rhythm between the
   cream sections — an editorial pull-quote with dark ink text. */
.quote {
  background: var(--brand-amber);
  color: var(--brand-espresso);
  padding-block: 8rem;
}
.quote__inner {
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
}
.quote__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.35;
  margin: 0;
}
.quote__cite {
  margin: 2rem 0 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 600;
  color: var(--brand-espresso);
}

/* --------------------------------- Waitlist (§5.4) ------------------------ */
.waitlist { padding-block: 8rem; }
.waitlist__inner {
  max-width: 36rem; /* max-w-xl */
  margin-inline: auto;
  text-align: center;
}
.waitlist__lead {
  color: var(--brand-muted);
  margin: 0 auto 2.5rem;
}
.waitlist__form { display: grid; gap: 0.75rem; text-align: left; }
.waitlist__input {
  width: 100%;
  background: var(--brand-surface);
  border: 0;
  border-radius: 0;
  padding: 1.15rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--brand-espresso);
  min-height: 44px;
}
.waitlist__input::placeholder { color: var(--brand-muted); }

.trust-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
}
.trust-pills li {
  position: relative;
  padding: 0.5rem 1rem 0.5rem 1.75rem;
  border: 1px solid rgba(31, 26, 20, 0.1);
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--brand-muted);
}
.trust-pills li::before {
  content: "";
  position: absolute;
  left: 0.85rem; top: 50%;
  transform: translateY(-50%);
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: var(--brand-amber);
}

.waitlist__confirm {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--brand-deep);
  padding: 1.15rem 0;
}

.waitlist__consent {
  margin: 0.25rem 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--brand-muted);
  text-align: center;
}
.waitlist__consent a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.waitlist__consent a:hover { color: var(--brand-espresso); }

/* ------------------------ Legal pages (privacy notice) -------------------- */
.legal { padding-block: 6rem; }
.legal__inner { max-width: 44rem; margin-inline: auto; }
.legal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
}
.legal__meta {
  margin: 0 0 2.5rem;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand-muted);
}
.legal__h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
}
.legal .body { margin: 0; }
.legal a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal a:hover { color: var(--brand-espresso); }
.legal__back { margin-top: 3.5rem; }
.legal__back a { font-weight: 600; text-decoration: none; }

/* ---------------------------------- Footer (§5.5) ------------------------- */
.footer {
  background: var(--brand-espresso);
  color: rgba(246, 236, 224, 0.6); /* cream at 60% */
  padding-block: 5rem; /* py-20 */
}
.wordmark--light { color: var(--brand-bg); }

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer__tagline {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

/* Outline button on the dark footer band: cream border (§2 rules) */
.btn--outline-light {
  border-color: rgba(246, 236, 224, 0.3);
  color: var(--brand-bg);
}
.btn--outline-light:hover {
  background: var(--brand-bg);
  color: var(--brand-espresso);
}

.footer__legal a:hover { color: var(--brand-amber); }

.footer__rule {
  border: 0;
  border-top: 1px solid rgba(246, 236, 224, 0.1);
  margin: 3rem 0 1.5rem;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.footer__bottom p { margin: 0; }
.footer__legal { display: flex; gap: 1.5rem; }

/* ------------------------- Responsive behaviour (§9) ---------------------- */
@media (max-width: 1024px) { /* below lg: hero stacks to one column */
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero__media {
    max-width: 26rem;
    margin-inline: auto;       /* centre the postcard once it's full-width */
    margin-bottom: 2.5rem;     /* room for the stamp that hangs below */
  }
}

@media (max-width: 768px) { /* below md: tablet/phone */
  .container { padding-inline: 1.5rem; }

  .hero { padding-block: 4rem 5rem; }
  .quote { padding-block: 5rem; }
  .waitlist { padding-block: 5rem; }

  /* Headline must fit the viewport — the long word would otherwise widen the page */
  .hero__title { font-size: clamp(2.25rem, 9vw, 3.75rem); }
  .hero__subhead { font-size: 1.125rem; }
  .section-title { font-size: 1.85rem; }

  .nav { padding-block: 1.75rem; }
  .wordmark { font-size: 20px; }

  .footer__top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) { /* small phones — keep the long word "recommendations" inside the screen */
  .container { padding-inline: 1.25rem; }
  .hero__title { font-size: clamp(1.8rem, 8.4vw, 2.35rem); }
  .hero__subhead { font-size: 1.0625rem; }
  .nav__inner { gap: 1rem; }
  .wordmark { font-size: 17px; }
  .btn--outline { padding: 0.6rem 0.9rem; letter-spacing: 0.12em; }
  .hero__media { max-width: 21rem; }
}
