/* =========================================================================
   Forge Insight — shared site styles
   Palette: navy + copper + bone (do not add accent colours without asking)
   Fonts: Fraunces (headings) + Inter (body)
   Phone first: most owners see this on a phone before anything else.
   ========================================================================= */

:root {
  --navy:        #0A1826;
  --navy-900:    #060F18;
  --navy-800:    #142234;
  --navy-700:    #1C2F44;
  --copper:      #C89052;
  --copper-light:#D9A876;
  --copper-dark: #A8743E;
  --copper-deep: #875A2E;   /* copper for small text on bone: passes contrast */
  --bone:        #F5F1EA;
  --paper:       #FBF9F5;   /* lighter bone, for alternating light sections */
  --line:        rgba(10,24,38,0.1);
  --ink:         #0A1826;
  --ink-muted:   rgba(10,24,38,0.74);
  --on-navy:       #F5F1EA;
  --on-navy-muted: rgba(245,241,234,0.76);
  --serif:       'Fraunces', Georgia, serif;
  --sans:        'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max-w:       1120px;
  --gutter:      1rem;      /* 16px each side on a phone */
  --radius:      6px;
  --ease:        cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h:    64px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  background: var(--navy-900);   /* below a short page, and iOS overscroll, match the footer */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-size: 1.0625rem;      /* 17px: easy reading on a phone */
  line-height: 1.65;
  background: var(--bone);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.35rem, 7.5vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.85rem, 5.2vw, 3rem); }
h3 { font-size: 1.4rem; line-height: 1.2; }
em { font-style: italic; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left:  max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.narrow > * { max-width: 44rem; }   /* keeps the left edge in line with wider sections */

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--copper); color: var(--navy);
  padding: 0.75rem 1rem; z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;          /* comfortable thumb target */
  padding: 0.85rem 1.6rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-primary { background: var(--copper); color: var(--navy); }
.btn-primary:hover { background: var(--copper-light); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(200,144,82,0.25); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: none; }
.btn-lg { min-height: 54px; padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { min-height: 40px; padding: 0.55rem 1.1rem; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,24,38,0.94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(200,144,82,0.14);
  color: var(--on-navy);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--on-navy);
  white-space: nowrap;
}
.brand img { width: 36px; height: 36px; }
.brand em { color: var(--copper); }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) {
  color: var(--on-navy-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { color: var(--copper); }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 0; color: var(--on-navy);
  cursor: pointer;
  margin-right: -10px;
}
.menu-btn svg { width: 24px; height: 24px; }

@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-800);
    border-bottom: 1px solid var(--navy-700);
    padding: 0.5rem max(var(--gutter), env(safe-area-inset-right)) 1.25rem max(var(--gutter), env(safe-area-inset-left));
  }
  .site-header.open .site-nav { display: flex; }
  .site-nav a:not(.btn) { padding: 0.85rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--navy-700); }
  .site-nav .btn { margin-top: 1rem; min-height: 48px; font-size: 1rem; }
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-bone  { background: var(--bone); }
.section-paper { background: var(--paper); }
.section-navy  { background: var(--navy); color: var(--on-navy); }
.section-navy-deep { background: var(--navy-900); color: var(--on-navy); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 1rem;
}
.section-navy .eyebrow, .section-navy-deep .eyebrow { color: var(--copper); }

.section h2 { margin-bottom: 1.25rem; max-width: 22ch; }
.section p + p { margin-top: 1rem; }
.lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 40rem; }
.section-navy .lead, .section-navy-deep .lead { color: var(--on-navy-muted); }

.btn-row { margin-top: 2rem; }

@media (min-width: 761px) {
  body { font-size: 1.125rem; }
  .section { padding: 6.5rem 0; }
  :root { --gutter: 1.5rem; }
}

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
  padding: 4rem 0 4.5rem;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(200,144,82,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,144,82,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 30% 40%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 100% 80% at 30% 40%, #000 0%, transparent 80%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 2.5rem; align-items: center; }
.hero .eyebrow { color: var(--copper); }
.hero h1 { max-width: 15ch; margin-bottom: 1.5rem; }
.hero h1 em { color: var(--copper); }
.hero .lead { font-size: 1.15rem; color: var(--on-navy-muted); max-width: 36rem; margin-bottom: 2rem; }
.hero-mark { display: none; }

@media (min-width: 861px) {
  .hero { padding: 7rem 0 7.5rem; }
  .hero-inner { grid-template-columns: 1.7fr 1fr; }
  .hero h1 { max-width: 18ch; }
  .hero .lead { font-size: 1.3rem; }
  .hero-mark {
    display: block;
    justify-self: end;
    width: min(100%, 360px);
    aspect-ratio: 1;
    background: url('assets/forge-insight-mark.webp') center / contain no-repeat;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55)) drop-shadow(0 0 40px rgba(200,144,82,0.08));
  }
}

/* ---------- 2. Sound familiar? ---------- */
.familiar p { font-size: 1.15rem; color: var(--ink-muted); max-width: 40rem; }
.familiar .punch {
  margin-top: 2rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--copper);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.6vw, 1.75rem);
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- 3. What Forge does ---------- */
.feature-cols { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}
.feature-card h3 { margin-bottom: 1.1rem; }
.ticks li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-muted);
}
.ticks li + li { margin-top: 0.8rem; }
.ticks li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.65rem; height: 2px;
  background: var(--copper);
}
.works-with {
  margin-top: 2.5rem;
  font-size: 1.15rem;
}
.works-with strong { font-weight: 600; }
.works-with .dot { color: var(--copper-dark); padding: 0 0.15rem; }
.aside-note { margin-top: 0.5rem; color: var(--ink-muted); }

@media (min-width: 761px) {
  .feature-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .feature-card { padding: 2.25rem 2rem; }
}

/* ---------- Image placeholders ----------
   Same box, same shape as the final image, so nothing moves when it is
   swapped. Replace a .placeholder with an <img> carrying the width and
   height noted inside it — see the product CLAUDE.md, "Swapping images". */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  border: 2px dashed var(--copper);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(-45deg, rgba(200,144,82,0.07) 0 12px, transparent 12px 24px),
    var(--navy-800);
  color: var(--on-navy);
  text-align: center;
  padding: 1rem;
}
.placeholder .ph-title { font-family: var(--serif); font-size: 1.25rem; }
.placeholder .ph-note {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}
.ratio-screen { aspect-ratio: 16 / 10; }   /* 1600 x 1000 */
.ratio-portrait { aspect-ratio: 4 / 5; }   /* 800 x 1000 */
.section-bone .placeholder, .section-paper .placeholder { background-color: var(--navy-800); }

/* ---------- 4. Built in a real store ---------- */
.shots { display: grid; gap: 1.75rem; margin-top: 2.75rem; }
.shot img, .shot .placeholder {
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: left top;   /* if a replacement is off-ratio, keep the headline corner */
  background: #fff;
  border: 1px solid rgba(245,241,234,0.14);
}
.shot figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}
@media (min-width: 761px) {
  .shots { grid-template-columns: 1fr 1fr; gap: 2rem 1.75rem; }
}

/* ---------- 5. The Health Check ---------- */
.steps { counter-reset: step; display: grid; gap: 1rem; margin-top: 2.25rem; }
.steps li {
  counter-increment: step;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.4rem 4.4rem;
  color: var(--ink-muted);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.25rem; top: 1.15rem;
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--copper);
  font-family: var(--serif);
  font-size: 1.15rem;
}
.steps strong { color: var(--ink); font-weight: 600; }
.reassure {
  margin-top: 1.75rem;
  font-weight: 500;
  color: var(--ink);
}
@media (min-width: 861px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .steps li { padding: 4.25rem 1.6rem 1.75rem; }
  .steps li::before { left: 1.6rem; top: 1.5rem; }
}

/* ---------- 7. Who's behind it ---------- */
.about { display: grid; gap: 2.25rem; align-items: center; }
.about-photo { width: 100%; max-width: 240px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about-text p:not(.eyebrow) { color: var(--ink-muted); font-size: 1.15rem; max-width: 36rem; }
@media (min-width: 761px) {
  .about { grid-template-columns: 340px 1fr; gap: 4rem; }
  .about-photo { max-width: 340px; }
}

/* ---------- 8. Close ---------- */
.close { text-align: center; }
.close h2 { margin-left: auto; margin-right: auto; max-width: 20ch; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: var(--on-navy-muted);
  padding: 2.75rem 0 calc(2.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(200,144,82,0.12);
  font-size: 0.95rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.footer-links a { text-decoration: none; padding: 0.35rem 0; }
.footer-links a:hover { color: var(--copper); }
.footer-copy { font-size: 0.85rem; color: rgba(245,241,234,0.5); }
@media (min-width: 761px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- KeyMatrix page ---------- */
.km-hero { padding-bottom: 3.5rem; }
.km-hero h1 { max-width: 16ch; }
.km-body p { color: var(--ink-muted); font-size: 1.15rem; max-width: 40rem; }
.km-body .ticks { margin-top: 1.75rem; font-size: 1.1rem; }
.km-body .km-trust {
  margin-top: 2.5rem;
  padding: 1.5rem 1.5rem 1.5rem 1.4rem;
  border-left: 3px solid var(--copper);
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.4vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 44rem;
}

/* ---------- Health Check form page ---------- */
.hc-layout { display: grid; gap: 2.25rem; }
.hc-intro h1 { font-size: clamp(2.2rem, 7vw, 3.75rem); margin-bottom: 1rem; }
.hc-intro .lead { color: var(--on-navy-muted); }
@media (min-width: 861px) {
  .hc-layout { grid-template-columns: 1fr 1.25fr; gap: 4rem; align-items: start; }
}

.form-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.6rem 1.25rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
@media (min-width: 761px) { .form-card { padding: 2.5rem 2.25rem; } }

.field + .field { margin-top: 1.4rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.field .optional {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-left: 0.35rem;
}
.field input, .field textarea {
  display: block;
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;            /* 16px: stops iOS zooming in on focus */
  line-height: 1.4;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(10,24,38,0.25);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  min-height: 50px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--copper-dark);
  box-shadow: 0 0 0 3px rgba(200,144,82,0.25);
}
.form-actions { margin-top: 1.9rem; }
.form-actions .btn { width: 100%; }
@media (min-width: 761px) { .form-actions .btn { width: auto; min-width: 12rem; } }

/* Honeypot: off-screen for people, still in the form for bots that fill
   every field. A filled honeypot is accepted quietly and never sent. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  display: none;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid #B54A3A;
  background: rgba(181,74,58,0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.form-thanks {
  display: none;
  padding: 0.5rem 0;
}
.form-thanks h2 { font-size: clamp(1.75rem, 5vw, 2.25rem); margin-bottom: 0.75rem; }
.form-thanks p { color: var(--ink-muted); font-size: 1.1rem; }

/* Sent: JS adds .is-sent; without JS the server redirects to #sent. */
.form-card.is-sent form,
.form-card:has(#sent:target) form { display: none; }
.form-card.is-sent .form-thanks,
.form-thanks:target { display: block; }
.form-card.has-error .form-error,
.form-error:target { display: block; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
