/* CoreStrategy site styles
   Palette: Forest · Champagne Rose (see docs/BRAND.md). Flattened 2026-10-06 from the
   stacked revision layers in the original single-file draft; values are the final cascade.
   Tokenised 2026-10-06: every colour below the :root block is a var(). Rules carry no literals. */

/* ── Tokens ─────────────────────────────────────────────────────────────────
   Named by role, not hue, so a palette swap is this block only. To try a palette
   without touching the rules, add an override block (template at the end of this
   section) and load the page with ?theme=<name>, or set data-theme on <html>. */
:root {
  /* Surfaces */
  --surface: #F7F2E9;              /* ivory: page, light sections, nav sheet */
  --surface-alt: #EFE6DC;          /* team block */
  --surface-contact: #ECE3D6;      /* contact section */
  --surface-card: #FBF8F1;         /* form card */
  --surface-dark: #24483D;         /* forest: hero, how-we-work, buttons */
  --surface-nav: rgba(247,242,233,.96);
  --surface-image: #999b87;        /* behind the hero photo while it loads */

  /* Text on light surfaces */
  --ink: #24483D;                  /* forest */
  --ink-muted: #55675D;            /* body copy, labels, footer */
  --ink-hover: #7F6640;            /* nav link hover: dark champagne, passes contrast on ivory */
  --ink-placeholder: #77837c;
  --ink-error: #984b32;

  /* Text on dark surfaces */
  --on-dark: #F7F2E9;
  --on-dark-heading: #FBF7EF;
  --on-dark-body: #DDE3DA;

  /* Accents */
  --accent: #B89C74;               /* champagne: borders, dots, focus rings */
  --accent-soft: #D8B9AD;          /* rose: eyebrow, step numbers, primary CTA */
  --accent-soft-hover: #E6CFC5;
  --accent-support: #66796D;       /* lichen: button hover */

  /* Lines and shadows (alpha variants kept exact from the draft; consolidate in a design pass) */
  --line: #e2ddcf;
  --line-2: #dcd7cb;
  --line-input: #A6B0A8;
  --line-ink-9: #142c3617;
  --line-ink-12: rgba(20,44,54,0.12);
  --line-ink-15: #24483D26;
  --line-on-dark-12: #ffffff1f;
  --line-on-dark-15: #ffffff26;
  --shadow-card: #142c3609;

  /* Logo mark (inline SVG gradients in index.html read these) */
  --mark-circle: #24483D;  --mark-circle-hi: #3E6A5B;  --mark-circle-lo: #15302A;
  --mark-s: #B89C74;       --mark-s-hi: #D9C4A2;       --mark-s-lo: #8E7452;

  /* Layout and type */
  --pad: clamp(1.5rem, 6vw, 6rem);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

/* Palette override template. Copy, rename, fill in only the tokens that change.
html[data-theme="candidate"] {
  --surface: ...; --surface-dark: ...; --ink: ...; --accent: ...; --accent-soft: ...;
  --mark-circle: ...; --mark-s: ...;
}
*/

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.nowrap { white-space: nowrap; }

/* ── Logo mark (inline SVG symbol #cs-mark; colours come from the --mark-* tokens) ── */
.mark { display: block; aspect-ratio: 579 / 798; overflow: visible; }
.original-logo { width: 29px; height: 40px; object-fit: contain; background: none; border-radius: 0; mix-blend-mode: normal; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad);
  color: var(--ink); background: var(--surface-nav);
  border-bottom: 1px solid var(--line-ink-9);
  transition: background 0.3s, padding 0.3s;
}
nav.scrolled { background: var(--surface-nav); color: var(--ink); backdrop-filter: blur(16px); padding-top: 0.85rem; padding-bottom: 0.85rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-family: var(--sans); font-size: 1.2rem; font-weight: 500; letter-spacing: -0.045em; }
.nav-links { display: flex; align-items: center; gap: 2.5rem; background: transparent; }
.nav-links a { text-decoration: none; font-size: 0.92rem; font-weight: 400; color: var(--ink); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink-hover); }
.nav-links .nav-talk { color: var(--ink); padding: 9px 16px; border: 1px solid var(--accent); border-radius: 6px; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 1.5px; background: var(--ink); position: relative; transition: transform 0.25s, background 0.25s; }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
nav.open .nav-toggle span { background: transparent; }
nav.open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
nav.open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 850px; min-height: 100svh;
  background: var(--surface-dark); color: var(--on-dark);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; column-gap: 5vw;
  padding: 8rem var(--pad) 2rem;
}
.hero-copy { position: relative; z-index: 1; align-self: center; max-width: none; padding: 2rem 0; }
.eyebrow { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent-soft); margin-bottom: 2rem; font-weight: 500; }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.2rem, 4.6vw, 5.5rem);
  line-height: 1.07; letter-spacing: -0.045em;
  max-width: 11em; color: var(--on-dark-heading);
  animation: rise 1.1s 0.25s cubic-bezier(.2,.7,.1,1) both;
}
.hero-sub { margin-top: 1.5rem; max-width: 27rem; font-size: 1.05rem; line-height: 1.8; color: var(--on-dark-body); animation: rise 1.1s 0.45s cubic-bezier(.2,.7,.1,1) both; }
.hero-actions { margin-top: 2rem; display: flex; align-items: center; gap: 1.6rem; animation: rise 1.1s 0.6s cubic-bezier(.2,.7,.1,1) both; }

.orb {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 15px 25px; border-radius: 6px;
  background: var(--surface-dark); color: var(--on-dark-heading);
  font-family: var(--sans); font-size: 0.92rem; font-weight: 500;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.orb:hover { background: var(--accent-support); color: var(--on-dark-heading); transform: translateY(-2px); }
.hero-actions .orb { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 16px 25px; font-weight: 500; }
.hero-actions .orb:after { content: '↗'; margin-left: 1.5rem; font-size: 1.2rem; }
.hero-actions .orb:hover { background: var(--accent-soft-hover); color: var(--ink); }
.quiet-link { text-decoration: none; font-size: 0.9rem; color: var(--on-dark); border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.quiet-link:hover { color: var(--accent-soft); border-color: var(--accent-soft); }

.coastal-image { position: relative; align-self: stretch; margin-right: calc(-1 * var(--pad)); margin-top: -2rem; overflow: hidden; min-height: 560px; background: var(--surface-image); }
.coastal-image img { width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: center; animation: coastal-drift 24s ease-in-out infinite alternate; will-change: transform; }

.hero-points {
  position: relative; z-index: 1; grid-column: 1 / -1; list-style: none;
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
  font-size: 0.8rem; color: var(--on-dark-body);
  margin-top: 0; padding-top: 1.8rem; padding-bottom: 1.5rem;
  border-top: 1px solid var(--line-on-dark-12); border-bottom: 0;
  animation: rise 1.1s 0.8s cubic-bezier(.2,.7,.1,1) both;
}
.hero-points strong { color: var(--accent-soft); font-weight: 500; margin-right: 0.4rem; }

/* ── Shared ─────────────────────────────────────────────────────────────── */
section { padding: clamp(4rem, 7vw, 7rem) var(--pad); }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 3.5vw, 4rem); line-height: 1.15; letter-spacing: -0.035em; }
.lead { font-size: 1.1rem; line-height: 1.7; color: var(--ink-muted); max-width: 34rem; }

/* ── What we do ─────────────────────────────────────────────────────────── */
#what { position: relative; background: var(--surface); color: var(--ink); border-top: 1px solid var(--line); }
.what-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; }
.what-head .display { grid-column: 1 / span 9; }
.what-body { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; margin-top: clamp(3rem, 6vw, 5rem); }
.what-body .lead { grid-column: 1 / span 5; }
.origin { grid-column: 7 / span 5; background: transparent; padding: 0 0 0 2rem; border-left: 2px solid var(--accent); }
.origin h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.7rem; line-height: 1.3; margin-bottom: 0.9rem; color: var(--ink); }
.origin p { color: var(--ink-muted); }
.founding-signature { margin-top: 1.2rem; font-size: 0.85rem; }

.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 6rem; margin-top: 5rem; max-width: 68rem; }
.pillar { border-top: 1px solid var(--line-2); padding-top: 1.5rem; }
.pillar h3 { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 0.9rem; display: flex; align-items: baseline; gap: 0.9rem; }
.pillar h3::before { content: ''; flex: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); transform: translateY(-0.05em); }
.pillar p { color: var(--ink-muted); max-width: 28rem; padding-left: 1.7rem; font-size: 0.95rem; }

/* ── How we work ────────────────────────────────────────────────────────── */
.how { background: var(--surface-dark); color: var(--on-dark); position: relative; overflow: hidden; }
.how-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(3rem, 8vw, 8rem); align-items: start; }
.how-intro { position: sticky; top: 7rem; }
.how-intro p { margin-top: 1.75rem; color: var(--on-dark-body); font-size: 1rem; max-width: 26rem; }
.steps { list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: clamp(3rem, 8vw, 4.5rem) 1fr; gap: 1.5rem; padding: 2rem 0; }
.steps li + li { border-top: 1px solid var(--line-on-dark-15); }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--serif); font-style: italic; font-size: 2rem; line-height: 1; color: var(--accent-soft); }
.steps h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.6rem; }
.steps p { color: var(--on-dark-body); font-size: 1rem; max-width: 32rem; }
.model { position: relative; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line-on-dark-15); display: grid; grid-template-columns: 5fr 7fr; gap: clamp(3rem, 8vw, 8rem); }
.model h3 { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1.1; letter-spacing: -0.02em; }
.model p { color: var(--on-dark-body); font-size: 1rem; line-height: 1.75; max-width: 36rem; padding-top: 0.4rem; }
.how-ring { display: none; }

/* ── Who we serve ───────────────────────────────────────────────────────── */
.who { padding: 0 0 0 var(--pad); display: grid; grid-template-columns: 6fr 5fr; gap: clamp(3rem, 7vw, 7rem); align-items: stretch; background: var(--surface); color: var(--ink); }
.who-text { max-width: 40rem; padding: 5rem 0; }
.who-text .display { margin-bottom: 2.25rem; }
.who-text > p { color: var(--ink-muted); margin-bottom: 1.25rem; }
.criteria { list-style: none; margin-top: 2.5rem; }
.criteria li { display: flex; gap: 1rem; align-items: baseline; padding: 0.55rem 0; font-size: 1.02rem; }
.criteria li::before { content: ''; flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 1.5px solid var(--accent); transform: translateY(0.05em); }
.team { background: var(--surface-alt); color: var(--ink); padding: clamp(2.5rem, 5vw, 4.5rem) var(--pad) clamp(2.5rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4.5rem); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.team h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.9rem; line-height: 1.15; margin-bottom: 1.25rem; }
.team > p { color: var(--ink-muted); margin-bottom: 2rem; font-size: 1.02rem; }
.team ul { list-style: none; }
.team li { padding: 0.95rem 0; border-top: 1px solid var(--line-ink-12); font-size: 0.9rem; }

/* ── Contact ────────────────────────────────────────────────────────────── */
.contact { background: var(--surface-contact); color: var(--ink); position: relative; overflow: hidden; padding-bottom: 0; }
.contact-grid { position: relative; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(3rem, 8vw, 8rem); }
.contact-grid .display { font-size: clamp(2.4rem, 4vw, 4rem); }
.contact-grid .sub { margin-top: 1.75rem; color: var(--ink-muted); max-width: 24rem; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem; background: var(--surface-card); border-radius: 0; box-shadow: 0 15px 35px var(--shadow-card); }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.8rem; color: var(--ink-muted); }
input, textarea {
  background: transparent; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line-input); border-radius: 0;
  padding: 0.7rem 0.8rem 0.7rem 0;
  font: 400 1rem var(--sans); outline: none;
  transition: border-color 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--ink-placeholder); }
input:focus, textarea:focus { border-color: var(--accent); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { resize: vertical; min-height: 6.5rem; }
.form-end { grid-column: 1 / -1; display: flex; align-items: center; gap: 2rem; margin-top: 0.5rem; }
.orb:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form-status { display: none; font-size: 1rem; max-width: 26rem; }
.form-status.success, .form-status.error { display: block; }
.form-status.success { color: var(--ink); }
.form-status.error { color: var(--ink-error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { grid-column: 1 / -1; font-size: 0.8rem; color: var(--ink-muted); margin-top: -0.25rem; }

/* ── Footer (index: inside .contact; legal pages: inside .subpage-footer) ── */
footer { position: relative; margin-top: 4rem; padding: 2rem 0; border-top: 1px solid var(--line-ink-15); display: flex; flex-direction: column; gap: 1rem; font-size: 0.85rem; color: var(--ink-muted); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
footer .brand { font-size: 1.05rem; color: var(--ink); }
footer .original-logo { height: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a { text-decoration: none; color: var(--ink); transition: color 0.2s; }
.footer-links a:hover { color: var(--ink-hover); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* Visible placeholder for a value we still need (grep TODO( before launch). */
.todo { background: var(--accent-soft); color: var(--ink); font: 500 0.72rem/1.6 var(--sans); letter-spacing: 0.04em; padding: 0.1em 0.5em; border-radius: 4px; white-space: nowrap; }

/* ── Legal pages (privacy, terms, accessibility) ── */
.legal { padding: clamp(7rem, 12vw, 9rem) var(--pad) clamp(4rem, 7vw, 6rem); }
.legal article { max-width: 44rem; }
.legal .eyebrow { color: var(--ink-hover); margin-bottom: 1rem; }
.legal h1 { font-size: clamp(2.3rem, 3.5vw, 3.4rem); margin-bottom: 1.5rem; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; letter-spacing: -0.02em; margin: 2.5rem 0 0.75rem; }
.legal p, .legal li { color: var(--ink-muted); }
.legal p { margin-bottom: 1rem; }
.legal ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.legal a:hover { color: var(--ink-hover); }
.subpage-footer { background: var(--surface-contact); padding: 0 var(--pad); }
.subpage-footer footer { margin-top: 0; }

/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes coastal-drift { from { transform: scale(1.04) translateX(-0.5%); } to { transform: scale(1.13) translateX(1%); } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.7,.1,1); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .coastal-image img { animation: none; }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (min-width: 1600px) {
  .hero, section, nav, .legal, .subpage-footer { padding-left: max(6rem, calc((100vw - 1440px) / 2)); padding-right: max(6rem, calc((100vw - 1440px) / 2)); }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--surface); padding: 0.5rem var(--pad) 2rem; }
  nav.open { background: var(--surface); }
  nav.open .nav-links { display: flex; }
  .nav-links a { font-size: 1.4rem; font-family: var(--serif); padding: 0.6rem 0; color: var(--ink); }
  .nav-links .nav-talk { color: var(--ink); }

  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 7rem; }
  .hero-copy { max-width: 40rem; padding-top: 1rem; }
  .hero h1 { font-size: clamp(3rem, 7vw, 4.5rem); max-width: 13em; }
  .coastal-image { height: 480px; min-height: 0; margin-top: 1.5rem; margin-left: calc(-1 * var(--pad)); }
  .hero-points { margin-top: 0; padding-top: 1.5rem; }

  .what-head .display, .what-body .lead, .origin { grid-column: 1 / -1; }
  .origin { padding-left: 1.5rem; }
  .pillars, .how-grid, .model, .contact-grid { grid-template-columns: 1fr; }
  .how-intro { position: static; }
  .who { grid-template-columns: 1fr; padding: 0 var(--pad); }
  .who-text { padding: 4rem 0 5rem; }
  .team { margin: 0 calc(-1 * var(--pad)); padding: 3rem var(--pad); }
  form { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand { font-size: 1.1rem; }
  .hero h1 { font-size: 2.9rem; }
  .hero h1 .nowrap { white-space: normal; }
  .hero-copy { padding-bottom: 1rem; }
  .eyebrow { margin-bottom: 1.3rem; }
  .coastal-image { height: 370px; }
  .hero-points { flex-direction: column; gap: 0.6rem; }
  form { padding: 1.3rem; }
  .form-end { gap: 1rem; }
}

/* Hidden <svg> holding shared defs (clip, gradients, filter) for the logo mark. A class, not a style attribute, so the Content-Security-Policy can stay strict (infra/dev/site.tf). */
.svg-defs { position: absolute; }
