/* =========================================================================
   Pallas Media — styles.css
   Design direction: Modernist. Fixed Pallas palette (black / gold / neutral).
   ========================================================================= */

:root {
  /* Brand palette (light) */
  --plane: #f4f1ea;      /* paper */
  --surface: #fbfaf6;    /* raised surface */
  --surface-2: #ffffff;
  --ink: #17150f;        /* primary text */
  --ink-2: #4a463c;      /* secondary text */
  --muted: #6f6d67;      /* tertiary */
  --grid: #e3ddd0;       /* hairline rules */
  --gold: #b8935a;       /* antique gold — accents/large display only */
  --gold-deep: #856627;  /* text-safe bronze on light (WCAG AA on paper 4.74:1) */
  --data: #1f6feb;       /* analytics accent, used sparingly */

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 4px;         /* modernist: minimal rounding */

  --serif: Georgia, "Times New Roman", Times, serif;   /* echoes the wordmark */
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  --step-shadow: 0 1px 2px rgba(23, 21, 15, .06), 0 8px 24px rgba(23, 21, 15, .06);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--plane);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: 0 0 .5em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; letter-spacing: 0; }
p { margin: 0 0 1rem; }

.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto;
  z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--plane) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--grid);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; }
.logoframe {
  display: inline-flex; background: #fff; border: 1px solid var(--grid);
  border-radius: var(--radius); padding: 6px 10px; line-height: 0;
}
.brand-logo { height: 40px; width: auto; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); margin: 0; padding: 0; }
.nav-menu a { color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav-menu a:hover, .nav-menu a:focus-visible { color: var(--ink); }
.nav-cta {
  border: 1px solid var(--ink); color: var(--ink) !important; padding: 8px 16px; border-radius: var(--radius);
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--ink); color: #fff !important; }

.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: var(--radius); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--grid); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.cta-row--center { justify-content: center; }

/* ---------- streamlined hero ---------- */
.hero-narrow { max-width: 900px; }
.hero-narrow .lede { margin-top: 4px; }
/* each sentence on its own single line; size scales so it never wraps */
.hero-h1 { font-size: clamp(1.05rem, 5.2vw, 3rem); max-width: none; }
.hero-h1 .line { display: block; white-space: nowrap; }
.hero-h1 .line + .line { margin-top: .06em; }

/* ---------- product blocks ---------- */
.prod { border-top: 2px solid var(--gold); padding-top: 20px; }
.prod-tag { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin: 0 0 6px; }
.prod h3 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 10px; }
.prod p { color: var(--ink-2); margin: 0; max-width: 46ch; }

/* ---------- contact form ---------- */
.contact-form { display: grid; gap: 18px; margin-top: 32px; text-align: left; }
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; color: #efe9dc; }
.field-hint { font-weight: 400; color: #b6ae9c; font-size: .82rem; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--grid);
  border-radius: var(--radius); padding: 12px 14px; width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.contact-form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 4px 0 0; min-height: 1.2em; font-size: .95rem; }
.form-status.is-ok { color: #d8b877; }
.form-status.is-err { color: #f0b7a8; }
.fineprint { margin-top: 26px; text-align: center; color: #cfc7b6; font-size: .9rem; }

/* ---------- shared typography helpers ---------- */
.eyebrow, .kicker {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-deep); margin: 0 0 14px;
}
.lede, .section-lede, .body-lg { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 62ch; }
/* justified body copy — no hyphenation (never break words across rows) */
.lede, .prod p, .body-lg { text-align: justify; text-justify: inter-word; hyphens: none; -webkit-hyphens: none; }
.section-lede { margin-inline: 0; }
.note { color: var(--muted); font-size: .98rem; max-width: 60ch; }
.section-head { margin-bottom: clamp(30px, 4vw, 52px); max-width: 780px; }

/* phase line: Measure · Understand · Identify */
.phase-line { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; font-family: var(--serif); }
.phase-line span { position: relative; color: var(--ink); font-size: 1.05rem; padding-left: 20px; }
.phase-line span::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 9px;
  transform: translateY(-50%); background: var(--gold); border-radius: 50%;
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 104px); border-bottom: 1px solid var(--grid); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy h1 { max-width: 16ch; }

.hero-visual { display: grid; gap: 14px; }
.flow-card { background: var(--surface); border: 1px solid var(--grid); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--step-shadow); }
.flow-card--accent { border-color: color-mix(in srgb, var(--gold) 55%, var(--grid)); border-left: 3px solid var(--gold); }
.flow-tag { display: inline-block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold-deep); }
.flow-title { font-family: var(--serif); font-size: 1.2rem; margin: 4px 0 12px; }
.flow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--ink-2); font-size: .95rem; }
.flow-list li { padding-left: 16px; position: relative; }
.flow-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--muted); }
.flow-arrow { color: var(--muted); display: flex; justify-content: center; }
.flow-arrow svg { transform: rotate(90deg); }

/* ---------- section variants ---------- */
.section--measure { background: var(--surface); border-block: 1px solid var(--grid); }
.section--how { background: var(--ink); color: #efe9dc; }
.section--how h2, .section--how h3 { color: #fff; }
.section--how .section-lede { color: #cfc7b6; }
.section--how .kicker { color: var(--gold); }
.section--why { background: var(--surface); border-block: 1px solid var(--grid); }
.section--trust { background: var(--plane); }

/* ---------- product 1 split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.ticks { list-style: none; margin: .5rem 0 1.4rem; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .1em; width: 18px; height: 18px;
  background:
    linear-gradient(var(--gold-deep),var(--gold-deep)) center/9px 2px no-repeat,
    linear-gradient(var(--gold-deep),var(--gold-deep)) center/2px 9px no-repeat;
  border: 1.5px solid var(--gold); border-radius: 50%;
  /* render a plus/check-like accent using two bars */
}
.ticks--sm li { padding-left: 24px; font-size: .96rem; }
.ticks--sm li::before { width: 14px; height: 14px; background-size: 7px 2px, 2px 7px; }

/* illustrative dashboard */
.dash { margin: 0; background: var(--surface-2); border: 1px solid var(--grid); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--step-shadow); }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dash-title { font-family: var(--serif); font-size: 1.05rem; }
.chip { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.chip--illus { background: color-mix(in srgb, var(--gold) 18%, #fff); color: var(--gold-deep); border: 1px solid color-mix(in srgb, var(--gold) 40%, #fff); }
.dash-rows { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.dash-rows li { display: grid; grid-template-columns: 1fr; gap: 6px; }
.dash-label { font-size: .9rem; color: var(--ink-2); font-weight: 500; }
.meter { display: block; height: 8px; background: var(--grid); border-radius: 999px; overflow: hidden; }
.meter-fill { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--gold), var(--gold-deep)); border-radius: 999px; transform-origin: left; }
.dash-cap { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- cards (product 2 / generic) ---------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.card { background: var(--surface-2); border: 1px solid var(--grid); border-radius: var(--radius); padding: 26px 24px; }
.callout {
  margin-top: 32px; padding: 22px 26px; border-left: 3px solid var(--gold);
  background: var(--surface); border-radius: var(--radius); color: var(--ink-2); max-width: 74ch;
}

/* ---------- how it works steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; }
.step { padding: 8px clamp(14px, 2vw, 24px) 8px 0; border-top: 1px solid rgba(255,255,255,.16); position: relative; }
.step + .step { border-left: 1px solid rgba(255,255,255,.16); padding-left: clamp(14px, 2vw, 24px); }
.step-num { font-family: var(--serif); font-size: 2rem; color: var(--gold); display: block; margin: 14px 0 10px; }
.step h3 { margin-bottom: 6px; }
.step p { color: #cfc7b6; font-size: .95rem; margin: 0; }

/* ---------- products pair ---------- */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.pair-item { border-top: 2px solid var(--gold); padding-top: 16px; }
.pair-tag { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin: 0 0 4px; }
.pair-name { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 8px; }
.pair-item p:last-child { color: var(--ink-2); margin: 0; }

/* ---------- why pallas ---------- */
.why-item { padding: 24px; background: var(--surface-2); border: 1px solid var(--grid); border-radius: var(--radius); }
.why-item p { color: var(--ink-2); margin: 0; }

/* ---------- responsible measurement ---------- */
.principles { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.principles li { position: relative; padding-left: 26px; color: var(--ink-2); }
.principles li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 2px; background: var(--gold); }
.principles strong { color: var(--ink); font-weight: 600; }

/* ---------- final cta ---------- */
.cta-final { background: var(--ink); color: #efe9dc; text-align: center; }
.cta-final h2 { color: #fff; }
.cta-final .body-lg { color: #cfc7b6; margin-inline: auto; }
.cta-final .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
/* primary button must stay visible on the dark section (gold, not ink-on-ink) */
.cta-final .btn-primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.cta-final .btn-primary:hover { background: #c9a469; border-color: #c9a469; }
.contact-line { color: #cfc7b6; margin-top: 18px; }
.contact-line a { color: var(--gold); }

/* ---------- footer ---------- */
.site-footer { background: var(--plane); border-top: 1px solid var(--grid); padding-block: 48px; }
.footer-inner { display: grid; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logoframe--sm .brand-logo, .logoframe--sm img { height: 34px; width: auto; }
.footer-tag { margin: 0; color: var(--ink-2); }
.footer-note { color: var(--muted); font-size: .9rem; max-width: 68ch; margin: 0; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--ink); text-decoration: underline; }
.footer-legal { color: var(--muted); font-size: .85rem; margin: 0; }

/* ---------- legal pages (privacy / terms) ---------- */
.legal-hero { padding-block: clamp(40px, 6vw, 72px) 8px; border-bottom: 1px solid var(--grid); }
.legal-note {
  margin: 18px 0 0; padding: 14px 18px; border-left: 3px solid var(--gold);
  background: var(--surface); border-radius: var(--radius); color: var(--ink-2); font-size: .92rem; max-width: 74ch;
}
.legal-body { padding-block: clamp(32px, 5vw, 56px); }
.legal-body h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin-top: 2em; }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal-body p, .legal-body li { color: var(--ink-2); max-width: 72ch; }
.legal-body ul { padding-left: 1.2em; display: grid; gap: 8px; }
.legal-body a { color: var(--gold-deep); }
.legal-meta { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.legal-toc { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 6px; }
.legal-toc a { color: var(--gold-deep); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

/* ---------- reveal animation (progressive enhancement) ----------
   Content is visible by default. Only when JS is present (html.js) do we
   hide-then-reveal, so a JS failure never hides content. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .meter-fill { transition: none; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }

  /* steps become a vertical sequence */
  .steps { grid-template-columns: 1fr; }
  .step { border-top: 1px solid rgba(255,255,255,.16); padding: 18px 0; }
  .step + .step { border-left: 0; padding-left: 0; }
  .step-num { margin-top: 0; }
}

@media (max-width: 720px) {
  /* mobile nav */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: transparent; border: 1px solid var(--grid);
    border-radius: var(--radius); position: relative;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: absolute; transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bar { left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--surface); border-bottom: 1px solid var(--grid);
    padding: 8px var(--gut) 18px; box-shadow: var(--step-shadow);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-top: 1px solid var(--grid); }
  .nav-menu a { display: block; padding: 14px 2px; font-size: 1.05rem; }
  .nav-cta { text-align: center; margin-top: 12px; border-width: 1px; }
  .nav-menu li:first-child { border-top: 0; }

  body { font-size: 16px; }
  .cta-row .btn { width: 100%; text-align: center; }
}

/* =========================================================================
   Dark mode (optional, honors system preference; brand stays intact)
   ========================================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --plane: #14130f; --surface: #1e1c16; --surface-2: #232016;
    --ink: #f7f4ec; --ink-2: #d8d1c1; --muted: #9a9384;
    --grid: #383327; --gold: #cda766; --gold-deep: #d8b877;
  }
  .logoframe { background: #fff; } /* logo has a white bg; keep the chip white */
  .section--how { background: #0f0e0b; }
  .cta-final { background: #0f0e0b; }
  .chip--illus { background: color-mix(in srgb, var(--gold) 22%, #000); color: var(--gold-deep); border-color: color-mix(in srgb, var(--gold) 45%, #000); }
  .site-header { background: color-mix(in srgb, var(--plane) 85%, transparent); }
}
