/* The Third Key — site styles
   Layout concept: a dark operations-room ground; content set on a quiet 12-col measure,
   with the hexagon key mark as the one recurring motif. Brand: black, cyan, Urbanist. */

@font-face { font-family: "Urbanist"; font-weight: 300; font-display: swap; src: url("../fonts/urbanist-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 400; font-display: swap; src: url("../fonts/urbanist-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 500; font-display: swap; src: url("../fonts/urbanist-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 600; font-display: swap; src: url("../fonts/urbanist-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 700; font-display: swap; src: url("../fonts/urbanist-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 800; font-display: swap; src: url("../fonts/urbanist-latin-800-normal.woff2") format("woff2"); }

:root {
  /* colour: brand is dark-first by design (matches deck and logo) */
  --ground: #050709;
  --panel: #0c1116;
  --panel-2: #111920;
  --line: #1d2a33;
  --ink: #f2f4f5;
  --muted: #a7b0b8;
  --dim: #6f7a84;
  --cyan: #00e5ff;
  --cyan-deep: #0b2a30;
  --cyan-line: #145561;
  --amber: #f5b13d;
  --red: #ff6b6b;
  --teal: #35c4b5;
  /* type */
  --font: "Urbanist", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.4rem, 5.2vw, 3.9rem);
  /* layout */
  --measure: 68ch;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #7ff2ff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--cyan); color: var(--ground); padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 20; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.eyebrow { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 60ch; font-weight: 400; }
.muted { color: var(--muted); }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1rem; }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(5, 7, 9, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 210px; height: auto; display: block; }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.98rem; padding: 10px 12px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a.btn { color: var(--ground); margin-left: 0.5rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 46px; height: 46px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .brand img { width: 170px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--ground); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin: 12px 0 0; text-align: center; border-radius: 10px; border-bottom: 0; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 46px; padding: 0 22px; border-radius: 10px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary, .nav a.btn { background: var(--cyan); color: var(--ground); }
.btn-primary:hover, .nav a.btn:hover { background: #7ff2ff; color: var(--ground); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--cyan-line); color: var(--ink); background: var(--panel); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }

/* hero */
.hero { padding-block: clamp(48px, 8vw, 96px) clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 .hl { color: var(--cyan); }
.hero .lead { margin-top: 1.25rem; }
.hero .actions { margin-top: 2rem; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; display: block; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 0.86rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend .k { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.k-you { background: var(--cyan); }
.k-v { background: var(--cyan-deep); border: 2px solid var(--cyan); }
.k-v2 { background: var(--panel); border: 1.5px solid var(--dim); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-art { max-width: 420px; } }
.page-hero { padding-block: clamp(44px, 7vw, 80px) clamp(28px, 4vw, 48px); }
.page-hero .lead { margin-top: 1rem; }

/* cards and grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.card p { color: var(--muted); }
.card .tag { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan); }
.card ul { margin: 0.25rem 0 0; padding-left: 1.1rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.4rem; }
.card .more { margin-top: auto; padding-top: 0.5rem; font-weight: 700; text-decoration: none; }
.card .more::after { content: " \2192"; }
.icon { width: 48px; height: 48px; border-radius: 50%; background: var(--cyan-deep); border: 1px solid var(--cyan-line); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon svg { width: 22px; height: 22px; stroke: var(--cyan); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* principles rows */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.principle { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 0.6rem; background: var(--panel); min-width: 0; }
.principle + .principle { border-left: 1px solid var(--line); }
.principle .word { font-size: var(--step-2); font-weight: 800; }
.principle p { color: var(--muted); }
@media (max-width: 860px) { .principles { grid-template-columns: minmax(0, 1fr); } .principle + .principle { border-left: 0; border-top: 1px solid var(--line); } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { border: 1px solid var(--cyan-line); background: var(--cyan-deep); color: var(--cyan); font-weight: 600; font-size: 0.86rem; padding: 6px 12px; border-radius: 999px; }

/* service detail */
.service { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.service + .service { margin-top: clamp(48px, 7vw, 88px); padding-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.service .stack p { color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; }
.checklist li::before { content: ""; width: 14px; height: 14px; margin-top: 6px; border: 2px solid var(--cyan); border-radius: 3px; transform: rotate(45deg); }
.checklist strong { color: var(--ink); }
.checklist span { color: var(--muted); }
@media (max-width: 860px) { .service { grid-template-columns: minmax(0, 1fr); } }

/* lifecycle / phases */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .steps-5, .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps-5, .steps-4 { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.steps li::before { content: counter(step); width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--cyan); color: var(--cyan); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--muted); font-size: 0.95rem; }
.steps .pillar { margin-top: auto; padding-top: 6px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.2em; color: var(--cyan); }
.steps .out { font-size: 0.88rem; color: var(--ink); border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }

/* score bands */
.bands { display: flex; flex-direction: column; gap: 10px; }
.band { display: grid; grid-template-columns: 14px 92px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.band .dot { width: 12px; height: 12px; border-radius: 50%; }
.band .range { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.band .what strong { display: block; }
.band .what span { color: var(--muted); font-size: 0.92rem; }
.dot-cyan { background: var(--cyan); } .dot-teal { background: var(--teal); } .dot-amber { background: var(--amber); } .dot-red { background: var(--red); }
.service .stack .bigstat, .bigstat { font-size: clamp(3.5rem, 9vw, 5.5rem); font-weight: 800; color: var(--cyan); line-height: 1; font-variant-numeric: tabular-nums; }

/* pillars */
.pillar-card .num { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.2em; color: var(--dim); }
.pillar-card h3 { font-size: 1.45rem; letter-spacing: 0.04em; }
.pillar-card .sub { color: var(--cyan); font-weight: 700; font-size: 0.95rem; }

/* callout band */
.callout { background: linear-gradient(0deg, var(--panel), var(--panel)); border: 1px solid var(--cyan-line); border-radius: calc(var(--radius) + 4px); padding: clamp(28px, 5vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.callout p { color: var(--muted); margin-top: 0.6rem; max-width: 60ch; }
@media (max-width: 760px) { .callout { grid-template-columns: minmax(0, 1fr); } }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
label { font-weight: 600; font-size: 0.95rem; }
label .opt { color: var(--dim); font-weight: 400; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { font-size: 0.88rem; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.status { font-weight: 600; min-height: 1.6em; }
.status.ok { color: var(--teal); } .status.err { color: var(--red); }
.aside-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 1rem; }
.aside-card .label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }

/* legal pages */
.legal { max-width: 760px; }
.legal h2 { font-size: var(--step-1); margin-top: 2.2rem; margin-bottom: 0.6rem; }
.legal p, .legal li { color: #d3d8dc; }
.legal p + p { margin-top: 0.8rem; }
.legal ul, .legal ol { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; margin: 0.6rem 0; }
.legal .updated { color: var(--dim); font-size: 0.92rem; margin-top: 0.5rem; }
.table-wrap { overflow-x: auto; margin: 0.8rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.05em; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 44px 36px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.6fr)); gap: 28px; }
.footer-grid img { width: 200px; }
.footer-grid p { color: var(--muted); font-size: 0.95rem; margin-top: 0.8rem; max-width: 38ch; }
.footer-grid h2 { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.8rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); }
.legalline { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--dim); font-size: 0.86rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* 404 */
.notfound { min-height: 50vh; display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
