/* ============================================================
   Gestalt Security: one-page marketing site
   Direction: colour chapters (full-bleed flat fields, one colour
   per section). Idea: the vulnerability findings report becomes
   the page: severity colours are the palette, the three tiers
   read as an audit trail (assess, fix, monitor).
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --paper: #F1F3F2;
  --surface: #E3E7E5;
  --ink: #181B1F;
  --muted: #4E545B;

  --navy: #12212E;
  --navy-ink: #F1F3F2;
  --navy-muted: #AEB8C1;

  --green: #1E3A2A;
  --green-ink: #F1F3F2;

  --amber: #C9A24B;
  --amber-ink: #181B1F;

  --accent: #9E3628;
  --accent-ink: #F1F3F2;

  --font: "Helvetica Neue", "Segoe UI", "Inter", system-ui, -apple-system, Arial, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);   /* 14px */
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);     /* 17-19px */
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);       /* 20-26px */
  --step-head: clamp(1.75rem, 1.2rem + 3vw, 3.75rem);          /* 28-60px */
  --step-display: clamp(3rem, 1rem + 9vw, 8.5rem);             /* 48-136px */

  --gutter: clamp(1rem, 3vw, 2rem);
  --radius: 0;               /* square corners everywhere */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 0.07em; text-underline-offset: 0.18em; }

h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.95;
  text-wrap: balance;
  hyphens: none;
}

p { text-wrap: pretty; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- navigation ---------- */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.5rem var(--gutter);
  color: var(--ink);
}

.wordmark {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: var(--step-body);
  text-decoration: none;
  margin-right: auto;
}

.nav-links { display: flex; gap: clamp(1rem, 2vw, 1.75rem); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 600;
  line-height: 1.1;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}
.btn:hover { background: #852B20; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ---------- hero: waterline (headline split across two fields) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.hero-copy .line {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.hero-copy .l1 {
  background: var(--paper);
  color: var(--ink);
  align-items: flex-end;
  padding-bottom: 0.35rem;
}
.hero-copy .l2 {
  background: var(--navy);
  color: var(--navy-ink);
  align-items: flex-start;
  padding-top: 0.35rem;
}

.hero-copy .line > span {
  display: block;
  font-size: var(--step-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.hero-support {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 2.5rem;
  max-width: 30ch;
  color: var(--navy-ink);
  font-size: var(--step-lead);
  line-height: 1.35;
}

/* ---------- masked-line reveal (signature move) ---------- */
.hero-copy .line > span {
  animation: maskline 0.9s var(--ease) both;
}
.hero-copy .l2 > span { animation-delay: 0.11s; }

@keyframes maskline {
  from { transform: translateY(112%); }
  to   { transform: translateY(0); }
}

/* ---------- chapters ---------- */
.chapter {
  padding: clamp(4rem, 10vh, 8rem) var(--gutter);
}

.chapter-paper { background: var(--paper); color: var(--ink); }
.chapter-navy  { background: var(--navy); color: var(--navy-ink); }

.section-head { font-size: var(--step-head); max-width: 14ch; }

.lead {
  font-size: var(--step-lead);
  line-height: 1.35;
  max-width: 40ch;
  margin-top: 1rem;
}

/* ---------- who it's for: statement ---------- */
.statement {
  font-size: var(--step-lead);
  line-height: 1.35;
  max-width: 44ch;
}

mark.hl {
  background: transparent;
  color: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.12em;
}

.hl-amber { background: var(--amber); color: var(--amber-ink); }
.hl-navy  { background: var(--navy); color: var(--navy-ink); }
.hl-green { background: var(--green); color: var(--green-ink); }

a.hl-final {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.12em;
  margin-top: 0.9em;
  text-decoration: none;
}
a.hl-final:hover { text-decoration: underline; }

/* ---------- chooser (the live thing) ---------- */
.chooser { margin-top: clamp(3rem, 6vh, 4.5rem); }

.chooser-q {
  font-size: var(--step-lead);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chooser-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chooser-options button {
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.chooser-options button:hover { transform: translateY(-1px); }
.chooser-options button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.chooser-result {
  margin-top: 1.25rem;
  font-size: var(--step-lead);
  line-height: 1.35;
  max-width: 46ch;
  min-height: 3em;
}

.chooser-static {
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
  font-size: var(--step-body);
  max-width: 62ch;
}
.chooser-static li + li { margin-top: 0.5em; }

/* ---------- three-tier menu ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  align-items: end;
  margin-top: clamp(2rem, 5vh, 3.5rem);
}

.tier {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border-radius: var(--radius);
}
.tier-monitoring { background: var(--navy);  color: var(--navy-ink);  min-height: 460px; }
.tier-checkup    { background: var(--amber); color: var(--amber-ink); min-height: 560px; }
.tier-hardening  { background: var(--green); color: var(--green-ink); min-height: 660px; }

.tier-body { flex: 1; }

.tier-name {
  font-size: var(--step-lead);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tier-for {
  margin-top: 0.75rem;
  font-size: var(--step-body);
  line-height: 1.4;
  max-width: 24ch;
}

.tier-includes {
  margin-top: 1.25rem;
  font-size: var(--step-body);
  line-height: 1.5;
  max-width: 30ch;
}

.tier-foot { margin-top: 1.5rem; }

.price {
  display: block;
  font-size: var(--step-head);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.period {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--step-small);
  opacity: 0.85;
}

.btn-tier {
  margin-top: 1.25rem;
  background: transparent;
  border: 2px solid currentColor;
  color: inherit;
}
.btn-tier:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tier-hardening .btn-tier:hover,
.tier-monitoring .btn-tier:hover { background: var(--green-ink); color: var(--navy); border-color: var(--green-ink); }

/* ---------- trust: board of tiles ---------- */
.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 0.5rem;
  margin-top: clamp(2rem, 5vh, 3rem);
}

.tile {
  border-radius: var(--radius);
  overflow: hidden;
}

.tile-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.tile-name {
  background: #1B2E3E; /* one tone step from navy */
  color: var(--navy-ink);
  font-weight: 600;
  font-size: var(--step-body);
  padding: 1.25rem 1.5rem;
  align-content: start;
}

.tile-photo { background: #1B2E3E; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- contact: the action tile ---------- */
.chapter-cta { padding-top: clamp(3rem, 8vh, 5rem); padding-bottom: clamp(3rem, 8vh, 5rem); }

.cta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  gap: clamp(0.5rem, 1vw, 0.875rem);
  min-height: 360px;
}

.cta-tile {
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius);
}

.cta-head { font-size: var(--step-head); max-width: 12ch; }

.cta-lines {
  margin-top: 1rem;
  font-size: var(--step-body);
  line-height: 1.5;
  max-width: 40ch;
}

.cta-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.75rem;
  max-width: 480px;
}

.cta-form input {
  flex: 1;
  min-width: 0;
  font-family: var(--font);
  font-size: var(--step-body);
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.cta-form input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.btn-cta {
  background: var(--ink);
  color: var(--paper);
  flex-shrink: 0;
}
.btn-cta:hover { background: #000; }

.cta-alt {
  margin-top: 1.25rem;
  font-size: var(--step-small);
  line-height: 1.5;
  opacity: 0.92;
}
.cta-alt a { color: var(--accent-ink); }

.cta-flank { border-radius: var(--radius); overflow: hidden; }
.cta-flank-photo img { width: 100%; height: 100%; object-fit: cover; }
.cta-flank-colour { background: var(--navy); }

/* ---------- footer ---------- */
.footer {
  background: var(--navy);
  color: var(--navy-ink);
  padding: clamp(3rem, 8vh, 5rem) var(--gutter);
}

.footer-name {
  font-size: var(--step-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.footer-line {
  margin-top: 1.25rem;
  font-size: var(--step-lead);
  color: var(--navy-ink);
}

.footer-credits {
  margin-top: 3rem;
  font-size: var(--step-small);
  line-height: 1.6;
  color: var(--navy-muted);
  max-width: 62ch;
}

.footer-meta {
  margin-top: 1.5rem;
  font-size: var(--step-small);
  color: var(--navy-muted);
}

/* ---------- scroll reveals (JS adds .reveal; no-JS = visible) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- moving picture ---------- */
.cta-flank-photo img,
.tile-photo img {
  animation: drift 24s var(--ease) infinite alternate;
}
@keyframes drift {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy .line > span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cta-flank-photo img,
  .tile-photo img { animation: none; }
  .btn { transition: none; }
}

/* ---------- process: four steps ---------- */
.process {
  list-style: none;
  margin: clamp(2rem, 5vh, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-num {
  font-size: var(--step-small);
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.step-name {
  font-size: var(--step-lead);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-body {
  font-size: var(--step-body);
  line-height: 1.5;
  max-width: 28ch;
}

/* ---------- faq ---------- */
.faq {
  margin-top: clamp(2rem, 5vh, 3rem);
  max-width: 760px;
}

.faq-item {
  border-top: 1px solid var(--ink);
}
.faq-item:last-child { border-bottom: 1px solid var(--ink); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--step-lead);
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 1.25rem 2.5rem 1.25rem 0;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }

.faq-item p {
  font-size: var(--step-body);
  line-height: 1.5;
  max-width: 58ch;
  padding: 0 2.5rem 1.5rem 0;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .board { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .tile-head { grid-column: span 2; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .cta-row { grid-template-columns: 1fr; }
  .cta-flank { min-height: 180px; }
  .cta-flank-colour { min-height: 120px; }
}

@media (max-width: 640px) {
  .hero-support {
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    font-size: var(--step-body);
  }
  .nav-links { display: none; }
  .nav { padding: 1rem 1rem; }
  .tiers { grid-template-columns: 1fr; }
  .tier-checkup, .tier-hardening, .tier-monitoring { min-height: 0; }
  .board { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .process { grid-template-columns: 1fr; }
  .cta-form { flex-direction: column; }
  .btn-cta { width: 100%; }
}
