/* =====================================================================
   Memory Marketing & Media — Design System
   Plain CSS. Tokens + components per Memory-Design-Brief.md
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Color palette (brand-locked) */
  --white:    #ffffff;
  --rose:     #d4c2c2;  /* heading text on dark bands */
  --sand:     #bcb393;  /* primary CTA fill */
  --sand-dk:  #a99f78;  /* CTA hover */
  --charcoal: #404143;  /* dark section bands */
  --black:    #000000;  /* logo, nav, pill */

  /* Working text tones (black at reduced opacity, per brief) */
  --ink:       #1c1b19;  /* near-black body/heading ink */
  --body-text: #3a3936;  /* paragraph copy */
  --muted:     #6b6b6b;  /* sub-heads, captions, labels */
  --on-dark:   #c9c7c2;  /* subtitle text on charcoal */

  /* Lines / surfaces */
  --hairline: #ededeb;   /* nav / footer rules */
  --rule:     #d8d6d1;   /* quote-box border */
  --ph-bg:    #dcdad4;   /* image placeholder surface */

  /* Type families */
  --font-display: 'Judson', serif;
  --font-body:    'IBM Plex Serif', serif;
  --font-script:  'Kapakana', cursive;

  /* Layout */
  --container:   1120px;
  --container-w: 1200px;  /* nav + footer */
  --gutter:      44px;

  /* Signature band-overlap pattern (identical in all 3 instances) */
  --band-pad-bottom: 150px;
  --overlap:         110px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
p  { margin: 0; }
ul { margin: 0; }

a { color: var(--black); text-decoration: none; }
a:hover { color: #6b6b6b; }
::placeholder { color: #a4a199; opacity: 1; }

/* ---------- Layout helpers ---------- */
.container       { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--wide { max-width: var(--container-w); }
.container--1000 { max-width: 1000px; }
.container--820  { max-width: 820px; }

.section { padding: 104px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background .2s, opacity .2s;
}
.btn--sand {
  background: var(--sand);
  color: var(--white);
  padding: 14px 34px;
}
.btn--sand:hover { background: var(--sand-dk); color: var(--white); }

/* Contact nav pill */
.pill {
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
  transition: opacity .2s;
}
.pill:hover { opacity: 0.8; color: var(--white); }

/* =====================================================================
   NAV  (identical markup on every page; body class controls logo/active)
   ===================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Brand / logo -------------------------------------------------------- */
.brand { display: flex; align-items: center; line-height: 1; }

/* (2) Homepage hero lockup — MEMORY wide-tracked + spaced subtitle */
.brand-lockup { display: none; flex-direction: column; align-items: center; line-height: 1; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.15em;
  padding-left: 0.15em;   /* balance the trailing tracking */
  color: var(--black);
}
.brand-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.35em;
  padding-left: 0.35em;
  margin-top: 7px;
  color: var(--black);
}

/* (1) Condensed wordmark — tight, stacked, editorial.
   Brief canonical spec: font-size:48px; letter-spacing:-6.24px (= -0.13em).
   Rendered here at nav scale using the same -0.13em ratio. */
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.13em;   /* = -6.24px at the 48px canonical size */
  color: var(--black);
}

/* Logo visibility: lockup on Home, wordmark on inner pages.
   On Home, wordmark takes over once the page is scrolled. */
body.home .brand-lockup   { display: flex; }
body.home .brand-wordmark { display: none; }
body.home.scrolled .brand-lockup   { display: none; }
body.home.scrolled .brand-wordmark { display: block; }

/* Nav links ----------------------------------------------------------- */
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link {
  position: relative;
  padding-bottom: 5px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  transition: color .2s;
}
.nav-link:hover { color: #6b6b6b; }
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--black);
  opacity: 0;
}
/* Active underline driven by page body class */
body.home     .nav-link[data-page="home"]::after,
body.about    .nav-link[data-page="about"]::after,
body.services .nav-link[data-page="services"]::after { opacity: 1; }

.nav-toggle { display: none; }

/* =====================================================================
   HERO  (full-bleed image + overlay + centered content)
   ===================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 560px;
  overflow: hidden;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: rgba(28, 27, 25, 0.5);
  pointer-events: none;
}
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 30px; padding: 0 24px; text-align: center;
  pointer-events: none;
}
.hero__content .btn { pointer-events: auto; }
.hero__title {
  max-width: 820px;
  color: var(--rose);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.08;
  text-wrap: balance;
}

/* Full-bleed standalone image band */
.fullbleed { position: relative; width: 100%; overflow: hidden; }
.fullbleed--560 { height: 560px; }
.fullbleed--420 { height: 420px; }

/* =====================================================================
   PAGE HEADERS (text-only intros on inner pages)
   ===================================================================== */
.page-head { padding: 88px 0 56px; }
.page-head h1 { line-height: 1.05; }
.page-head .lead { margin-top: 22px; max-width: 560px; color: var(--muted); font-size: 16px; line-height: 1.7; }

.h1--about    { font-size: clamp(36px, 5.5vw, 58px); }
.h1--services { font-size: clamp(32px, 5vw, 52px); }
.h1--contact  { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }

/* =====================================================================
   TWO-COLUMN SPLIT (50/50 image + text, alternating)
   ===================================================================== */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.split--start { align-items: start; }
.split--gap72 { gap: 72px; }

.col-title  { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.col-title--h3 { font-size: clamp(24px, 2.8vw, 30px); }
.col-body   { margin-top: 20px; color: var(--body-text); font-size: 17px; line-height: 1.75; }
.col-body + .col-body { margin-top: 18px; }
.col-cta    { margin-top: 34px; }

/* Services "What We Can Help With" list */
.help-label { margin-top: 24px; margin-bottom: 10px; font-size: 15px; letter-spacing: 0.04em; color: var(--ink); }
.help-list  { padding-left: 20px; font-size: 16px; line-height: 1.85; color: var(--body-text); }

/* =====================================================================
   IMAGE PLACEHOLDERS  (swap each .media for <img> when real photo exists)
   ===================================================================== */
.media { position: relative; width: 100%; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; }

.media--440 { height: 440px; }
.media--520 { height: 520px; }
.media--560 { height: 560px; }
.media--230 { height: 230px; }

/* Placeholder surface + label */
.ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.015) 0 12px, rgba(0,0,0,0) 12px 24px),
    var(--ph-bg);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.03em;
  line-height: 1.5;
}
.ph::before {
  content: "IMAGE";
  position: absolute; top: 12px; left: 14px;
  font-size: 10px; letter-spacing: 0.22em; color: #a7a49c;
}
.hero .ph, .fullbleed .ph { position: absolute; }

/* Overlap-into-band positioning (signature pattern) */
.overlap-up { margin-top: calc(-1 * var(--overlap)); }
.pad-top-72 { padding-top: 72px; }

/* =====================================================================
   QUOTE / VISION BOX
   ===================================================================== */
.quote-box {
  border: 1px solid var(--rule);
  padding: 64px 40px;
  text-align: center;
}
.quote-box--about { padding: 56px 40px; }
.quote-box__label  { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 30px); }
.quote-box__script { margin: 14px 0 16px; font-family: var(--font-script); font-weight: 400; line-height: 1; color: var(--ink); }
.quote-box__caption{ font-size: 14px; letter-spacing: 0.02em; color: var(--muted); }

.script-lg { font-size: clamp(42px, 6.5vw, 62px); }
.script-md { font-size: clamp(38px, 6vw, 56px); }

/* =====================================================================
   DARK SECTION BAND
   ===================================================================== */
.band {
  background: var(--charcoal);
  padding: 70px 0 var(--band-pad-bottom);
}
.band__title { color: var(--rose); font-size: clamp(28px, 4vw, 38px); letter-spacing: 0.005em; }
.band__sub   { margin-top: 12px; font-size: 15px; letter-spacing: 0.02em; color: var(--on-dark); }

/* Wrapper that lets the following content overlap up into the band */
.band-overlap { position: relative; }

/* Dark CTA block (centered) */
.cta-band {
  background: var(--charcoal);
  padding: 96px 0;
  text-align: center;
}
.cta-band__inner {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.cta-band__title {
  color: var(--rose);
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.12;
  max-width: 760px;
  text-wrap: balance;
}

/* =====================================================================
   SERVICE CARDS (home 2×2, top row overlaps up into band)
   ===================================================================== */
.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px 48px;
}
.card__media { margin-bottom: 20px; }
.card h3 { font-size: 23px; margin-bottom: 10px; }
.card p  { font-size: 16px; line-height: 1.65; color: var(--body-text); }

/* =====================================================================
   MEMORY METHOD (vertical stacked — identical on Home + About)
   ===================================================================== */
.method { text-align: center; }
.method__title  { font-size: clamp(28px, 3.6vw, 38px); }
.method__stack  {
  margin: 22px 0 18px;
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.15;
  color: #2c2b29;
  font-size: clamp(40px, 6.5vw, 60px);
}
.method__caption { font-size: 14px; letter-spacing: 0.02em; color: var(--muted); }
.method__cta { margin-top: 34px; }

/* Generic centered heading blocks */
.center { text-align: center; }
.prose-narrow p { color: var(--body-text); line-height: 1.72; }
.prose-narrow .muted { color: var(--muted); }

/* =====================================================================
   CONTACT FORM (centered over full-bleed B&W image)
   ===================================================================== */
.contact-stage {
  position: relative;
  width: 100%;
  min-height: 760px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 24px;
}
.contact-stage__overlay {
  position: absolute; inset: 0;
  background: rgba(28, 27, 25, 0.55);
  pointer-events: none;
}
.contact-card { position: relative; width: 100%; max-width: 640px; }
.contact-card__title {
  margin-bottom: 34px; text-align: center;
  color: var(--rose);
  font-size: clamp(34px, 5vw, 44px);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }
.field { margin-bottom: 18px; }
.field--message { margin-bottom: 24px; }
.field label {
  display: block; margin-bottom: 8px;
  font-size: 14px; color: var(--white);
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: none;
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 140px; }

/* Validation states */
.field input.invalid,
.field textarea.invalid { box-shadow: 0 0 0 2px #b4483f; }
.field-error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: #ffd9d4;
}
.field.has-error .field-error { display: block; }

.btn-submit {
  width: 100%;
  background: var(--sand);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: 0.02em;
  padding: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, opacity .2s;
}
.btn-submit:hover { background: var(--sand-dk); }
.btn-submit:disabled { opacity: 0.7; cursor: default; }

/* Success + error banners */
.form-success {
  display: none;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  padding: 48px 36px;
  text-align: center;
}
.form-success h2 { font-size: 26px; color: var(--ink); }
.form-success p  { margin-top: 10px; font-size: 16px; color: var(--muted); }

.form-alert {
  display: none;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(180, 72, 63, 0.92);
  color: var(--white);
  font-size: 14px;
  text-align: center;
}

.is-visible { display: block; }

/* =====================================================================
   FOOTER  (identical on every page)
   ===================================================================== */
.footer {
  border-top: 1px solid var(--hairline);
  background: var(--white);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 34px; padding-bottom: 34px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.13em;   /* condensed wordmark, footer scale */
  color: var(--black);
}
.footer-social { display: flex; align-items: center; gap: 22px; }
.footer-social a { color: var(--black); display: inline-flex; }
.footer-social a:hover { color: #6b6b6b; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  :root { --gutter: 24px; --overlap: 0px; }

  .section { padding: 64px 0; }

  /* Stack every two-column layout */
  .split,
  .cards { grid-template-columns: 1fr; gap: 40px; }

  /* Kill overlaps / column padding when stacked */
  .overlap-up { margin-top: 0; }
  .pad-top-72 { padding-top: 0; }

  /* Tame the tall bands so stacked content sits close beneath the heading */
  .band { padding: 56px 0 64px; }

  .hero { height: 460px; }
  .fullbleed--560 { height: 420px; }
  .fullbleed--420 { height: 320px; }
  .media--560 { height: 420px; }
  .media--520 { height: 400px; }
  .media--440 { height: 360px; }

  .page-head { padding: 64px 0 40px; }

  /* Mobile nav */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 38px; padding: 0;
    background: none; border: none; cursor: pointer;
  }
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    content: ""; display: block; position: relative;
    width: 24px; height: 2px; background: var(--black);
  }
  .nav-toggle span::before { position: absolute; top: -7px; }
  .nav-toggle span::after  { position: absolute; top: 7px; }

  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--hairline);
    padding: 12px var(--gutter) 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 18px; padding: 8px 0; }
  .nav-link::after { display: none; }
  .pill { margin-top: 8px; }

  .brand-word { font-size: 30px; }
  .brand-wordmark { font-size: 30px; }
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
  .form-row .field { margin-bottom: 18px; }
  .footer-inner { flex-direction: column; gap: 20px; align-items: flex-start; }
}
