/* ============================================================
   THE WARD — editorial agency site
   Identity: Block by Block. Charcoal / Cream / Marigold.
   Display: Clash Display · Body: General Sans (Fontshare)
   ============================================================ */

:root {
  /* Brand palette (PRD §5) */
  --charcoal: #181817;
  --charcoal-raise: #211f1d;
  --charcoal-sink: #121210;
  --cream: #f3e9d6;
  --cream-dim: #b7ad9b;          /* muted cream for secondary text */
  --marigold: #f1aa28;
  --marigold-deep: #d6931a;

  --line: rgba(243, 233, 214, 0.14);
  --line-strong: rgba(243, 233, 214, 0.28);

  --display: "Clash Display", "Archivo", system-ui, sans-serif;
  --body: "General Sans", "Inter", system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 14px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--marigold); color: var(--charcoal); }

:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, 128px); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--marigold); color: var(--charcoal); padding: 12px 18px;
  font-weight: 600; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
  font-size: clamp(44px, 9vw, 124px);
  margin: 0;
}
.h1 { font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.01em; font-size: clamp(38px, 6vw, 76px); margin: 0; }
.h2 { font-family: var(--display); font-weight: 600; text-transform: uppercase; line-height: 1.0; letter-spacing: -0.005em; font-size: clamp(30px, 4.4vw, 56px); margin: 0; }
.h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; line-height: 1.05; font-size: clamp(21px, 2.4vw, 28px); margin: 0; }
.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  color: var(--marigold);
  display: inline-block;
}
.lede { font-size: clamp(18px, 2.3vw, 23px); line-height: 1.5; color: var(--cream); max-width: 60ch; }
.muted { color: var(--cream-dim); }
.measure { max-width: 64ch; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 999px;
  background: var(--marigold); color: var(--charcoal);
  border: 1.5px solid var(--marigold);
  cursor: pointer; transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--marigold-deep); border-color: var(--marigold-deep); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--cream); border-color: var(--line-strong); }
.btn.ghost:hover { background: transparent; border-color: var(--cream); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.18s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 32px; }

.textlink { color: var(--marigold); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.textlink .arrow { transition: transform 0.18s var(--ease); }
.textlink:hover .arrow { transform: translateX(4px); }

/* ---------- Brand mark ---------- */
.w-mark { width: auto; height: 1em; display: block; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand .w-mark { height: 38px; }
.brand .wordmark {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  line-height: 0.82; letter-spacing: 0.01em; font-size: 20px; color: var(--cream);
}

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--charcoal) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 16px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-weight: 500; font-size: 16px; color: var(--cream); position: relative; padding-block: 4px; }
.nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--marigold); transition: right 0.2s var(--ease); }
.nav a:not(.nav-cta):hover::after, .nav a:not(.nav-cta)[aria-current="page"]::after { right: 0; }
.nav a:not(.nav-cta)[aria-current="page"] { color: var(--marigold); }
/* The CTA is a solid button — keep charcoal type even when it's the current page */
.nav a.nav-cta[aria-current="page"] { color: var(--charcoal); }
.nav-tools { display: flex; align-items: center; gap: 18px; }
.menu-btn {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong);
  background: transparent; border-radius: 10px; cursor: pointer; color: var(--cream);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.menu-btn span { width: 20px; height: 2px; background: currentColor; display: block; transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: 4px; background: var(--charcoal-raise); border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter) 28px; transform: translateY(-120%); transition: transform 0.28s var(--ease);
    box-shadow: var(--shadow);
  }
  .masthead.nav-open .nav { transform: translateY(0); }
  .nav a { font-family: var(--display); text-transform: uppercase; font-size: 28px; font-weight: 600; padding-block: 10px; }
  .nav .nav-cta { margin-top: 10px; }
  .masthead.nav-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .masthead.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
  .masthead.nav-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 7vw, 80px); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.hero__copy { max-width: 18ch; }
.hero .display { margin-bottom: 0; }
.hero__lede { margin-top: 28px; }
.hero__media { align-self: stretch; }
@media (max-width: 920px) { .hero__grid { grid-template-columns: 1fr; } .hero__copy { max-width: 22ch; } }
/* Full-bleed community street scene behind the top of the homepage.
   Grayscale image (already B&W) under a charcoal wash that deepens toward the
   bottom so the hero reads clearly and dissolves into the charcoal page below. */
.hero-band {
  background:
    linear-gradient(rgba(24,24,23,0.80) 0%, rgba(24,24,23,0.88) 55%, rgba(24,24,23,0.98) 100%),
    url("../img/community-street.jpg") center 35% / cover no-repeat;
}

/* ---------- Media placeholders (honest: approved photos go here) ---------- */
.media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(243,233,214,0.05), rgba(243,233,214,0)) ,
    var(--charcoal-raise);
  border: 1px solid var(--line);
  filter: grayscale(1) contrast(1.05);
  aspect-ratio: 4 / 5;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 16 / 10; }
.media--banner { aspect-ratio: 21 / 9; }
.media__ph {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center;
  color: var(--cream-dim); padding: 24px;
}
.media__ph .w-mark { height: 48px; margin-inline: auto; opacity: 0.9; }
.media__ph small { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
/* marigold block motif drawn from the mark */
.media__block { position: absolute; background: var(--marigold); }
.media__block--br { right: 0; bottom: 0; width: 34%; height: 18%; }
.media__block--tr { right: 10%; top: 0; width: 12%; height: 46%; }

/* ---------- Section heads ---------- */
.sec-head { max-width: 72ch; margin-bottom: clamp(28px, 4vw, 52px); }
.sec-head .h2 { margin-top: 14px; }
.sec-head .sec-lead { margin-top: 18px; color: var(--cream-dim); font-size: clamp(17px, 1.8vw, 20px); }

/* ---------- Status pill ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--marigold); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--marigold); }
.tag { display: inline-block; font-size: 13px; color: var(--cream-dim); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Featured project ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 56px); align-items: center; }
.feature__body .h2 { margin-block: 14px 18px; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } }

/* ---------- Service cards ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 30px;
  background: var(--charcoal-raise); display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.svc-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.svc-card .need { color: var(--cream); font-style: italic; }
.svc-card .outputs { color: var(--cream-dim); font-size: 15px; }
.svc-card .num { font-family: var(--display); font-weight: 600; color: var(--marigold); font-size: 15px; letter-spacing: 0.1em; }
.svc-card .textlink { margin-top: auto; }
@media (max-width: 860px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- Approach steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { border-top: 2px solid var(--marigold); padding-top: 20px; }
.step .n { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.12em; color: var(--marigold); }
.step h3 { margin: 10px 0 10px; }
.step p { color: var(--cream-dim); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Work list ---------- */
.work-list { display: grid; gap: 2px; border-top: 1px solid var(--line); }
.work-row {
  display: grid; grid-template-columns: 160px 1fr auto; gap: 24px; align-items: center;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease); 
}
.work-row:hover { background: rgba(243,233,214,0.03); }
.work-row .thumb { border-radius: 10px; aspect-ratio: 16/11; }
.work-row .wr-title { font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); }
.work-row .wr-problem { color: var(--cream-dim); margin-top: 6px; }
.work-row .wr-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; }
@media (max-width: 760px) {
  .work-row { grid-template-columns: 1fr; gap: 14px; }
  .work-row .wr-meta { align-items: flex-start; text-align: left; }
}

/* ---------- Generic rich content ---------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 36px; }
.prose p, .prose li { color: var(--cream); }
.prose .muted, .prose p.muted { color: var(--cream-dim); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 48px); }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

.deliver { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.deliver li { padding-left: 26px; position: relative; color: var(--cream-dim); }
.deliver li::before { content: ""; position: absolute; left: 0; top: 10px; width: 12px; height: 12px; background: var(--marigold); }

/* ---------- Case study ---------- */
.case-hero .status { margin-bottom: 18px; }
.case-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-block: 1px solid var(--line); padding-block: 26px; margin-block: 40px; }
.case-facts .k { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--marigold); }
.case-facts .v { margin-top: 6px; }
@media (max-width: 680px) { .case-facts { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Big contact band ---------- */
.band { background: var(--marigold); color: var(--charcoal); }
.band .wrap { padding-block: clamp(56px, 8vw, 104px); }
.band .big { font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 0.95; font-size: clamp(36px, 6vw, 80px); max-width: 16ch; }
.band p { margin-top: 20px; max-width: 46ch; color: color-mix(in srgb, var(--charcoal) 78%, transparent); font-size: 18px; }
.band .btn { background: var(--charcoal); color: var(--cream); border-color: var(--charcoal); }
.band .btn:hover { background: var(--charcoal-sink); border-color: var(--charcoal-sink); }
.band .mail { color: var(--charcoal); font-weight: 600; border-bottom: 2px solid rgba(24,24,23,0.4); }
/* Community photo behind the band: grayscale street scene under a marigold wash
   so the charcoal type stays legible while the "place" texture reads through. */
.band--photo { position: relative; isolation: isolate; }
.band--photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(241,170,40,0.86), rgba(241,170,40,0.97)),
    url("../img/community-street.jpg") center / cover no-repeat;
}
.band--photo .wrap { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { padding-block: 56px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot .brand { margin-bottom: 18px; }
.foot h4 { font-family: var(--body); text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; color: var(--cream-dim); margin: 0 0 14px; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a:hover { color: var(--marigold); }
.foot .fine { color: var(--cream-dim); font-size: 14px; max-width: 44ch; }
.foot-bottom { border-top: 1px solid var(--line); }
.foot-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; color: var(--cream-dim); font-size: 14px; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Forms (intake) ---------- */
.form-wrap { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 15px; }
.field .req { color: var(--marigold); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 16px; color: var(--cream);
  background: var(--charcoal-raise); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 13px 15px; width: 100%; transition: border-color 0.18s var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--cream-dim) 80%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--marigold); outline: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #e2663f; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b7ad9b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.err-msg { color: #e2663f; font-size: 13px; min-height: 1em; }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; color: var(--cream-dim); font-size: 15px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--marigold); flex: 0 0 auto; }
.form-note { grid-column: 1 / -1; color: var(--cream-dim); font-size: 14px; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.error-summary { grid-column: 1 / -1; display: none; border: 1px solid #e2663f; border-radius: 10px; padding: 16px 18px; background: rgba(226,102,63,0.08); }
.error-summary.show { display: block; }
.error-summary ul { margin: 10px 0 0; padding-left: 18px; }
.error-summary a { color: var(--cream); text-decoration: underline; }
.form-success { border: 1px solid var(--marigold); border-radius: var(--radius); padding: 32px; background: var(--charcoal-raise); }
.form-success .h2 { margin-bottom: 12px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.notfound { min-height: 64vh; display: grid; place-content: center; text-align: center; gap: 22px; }
.notfound .display { font-size: clamp(80px, 22vw, 240px); line-height: 0.85; }

/* ============================================================
   MICRO-INTERACTIONS & MOTION
   All reveal/parallax is gated behind the .anim-ready class,
   which is only added when the visitor hasn't asked for reduced motion.
   ============================================================ */

/* Logo: the marigold center blade lifts on hover */
.brand .w-mark { transition: transform 0.45s var(--ease); }
.w-mark polygon { transition: transform 0.45s var(--ease); }
.w-blade { transform-box: fill-box; transform-origin: center bottom; }
.brand:hover .w-blade { transform: translateY(-12%); }
.brand:hover .w-mark { transform: rotate(-1.5deg); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--marigold); z-index: 200; pointer-events: none;
  transition: width 0.08s linear;
}

/* Interactive media frames */
a.media { transition: border-color 0.25s var(--ease), transform 0.25s var(--ease); }
a.media:hover { border-color: var(--marigold); transform: translateY(-3px); }
.media__ph { transition: transform 0.4s var(--ease); }

/* Buttons get a soft shadow lift */
.btn { box-shadow: 0 0 0 rgba(241,170,40,0); }
.btn:hover { box-shadow: 0 14px 30px -14px rgba(241,170,40,0.55); }

/* Service cards: marigold corner accent grows in on hover */
.svc-card { position: relative; overflow: hidden; }
.svc-card::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 80px; height: 80px;
  background: var(--marigold); opacity: 0; transform: scale(0.4) rotate(12deg);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease); border-radius: 6px;
}
.svc-card:hover::after { opacity: 0.16; transform: scale(1) rotate(12deg); }

/* Work rows: title nudges, meta arrow slides */
.work-row .wr-title { transition: transform 0.25s var(--ease), color 0.25s var(--ease); }
.work-row:hover .wr-title { transform: translateX(6px); color: var(--marigold); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; }
.marquee__track { display: flex; align-items: center; gap: 0; width: max-content; white-space: nowrap; animation: marquee 30s linear infinite; }
.marquee__track span { font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: clamp(26px, 4.5vw, 54px); color: var(--cream); padding-inline: 22px; }
.marquee__track .dot { color: var(--marigold); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll reveal (only when enabled) ---------- */
.anim-ready .sec-head,
.anim-ready .svc-card,
.anim-ready .step,
.anim-ready .feature__body,
.anim-ready .feature > .media,
.anim-ready .work-row,
.anim-ready .case-facts > div,
.anim-ready .prose > *,
.anim-ready .hero__copy > *,
.anim-ready .hero__media,
.anim-ready .hero > .eyebrow,
.anim-ready .hero > .status,
.anim-ready .hero > .display,
.anim-ready .hero > .lede,
.anim-ready .section > .grid-2 > *,
.anim-ready .media--banner,
.anim-ready .band > .wrap > *,
.anim-ready .deliver li {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.anim-ready .is-in { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .brand:hover .w-blade, .brand:hover .w-mark { transform: none; }
}
