/* hexagon-ts.com - industrial dark theme.
   Locked dark. One accent. Fixed type scale. 4px spacing grid. */

:root {
  --font-sans: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Geist Mono", "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Type scale (fixed). */
  /* font-passport: allowed=14,16,20,24,32,48; floor=14; contrast=4.5 */
  --fs-xs: 14px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: 20px;
  --fs-xl: 32px;
  --fs-display: clamp(32px, 7vw, 48px);

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  /* Spacing - 4px grid. */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Steel palette. Off-black, bone, one molten accent. */
  --bg: #0a0c0d;
  --bg-deep: #060708;
  --surface: #121517;
  --text: #e8e6e1;
  --muted: #8d9297;
  --line: #23282c;
  --accent: #c2552a;

  --r: 2px;
  --focus: 0 0 0 2px rgba(194, 85, 42, 0.6);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r); }

/* ---------- Shell ---------- */

.stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--sp-6) var(--sp-4);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 42%, #12171a 0%, var(--bg) 46%, var(--bg-deep) 100%);
}

@media (min-width: 768px) {
  .stage { padding: var(--sp-8) var(--sp-8); }
}

.masthead,
.footline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.masthead .meta,
.footline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footline { padding-top: var(--sp-6); }

/* Bare holding page: one centred lockup, nothing else. */
.stage-bare { grid-template-rows: 1fr; place-items: center; }

/* WebGL centrepiece sits behind everything and fills the viewport. */
.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  display: block;
  z-index: 0;
  background: var(--bg);
}

/* Once the scene is live the SVG mark steps aside, the wordmark stays. */
body.gl-on .stage { background: none; }
body.gl-on .mark { display: none; }

/* Wordmark and its one-line positioning, held together in the middle of the
   hexagon. The stack is what floats; the wordmark sits in normal flow inside it,
   so the subline always hangs directly under it at any width. */
.lockup-stack {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: var(--sp-4);
  width: min(92vw, 720px);
  text-align: center;
  pointer-events: none;
}

/* Wordmark sits in the middle of the hexagon. */
.lockup {
  margin: 0;
  font-family: var(--font-mono);
  /* Passport sizes only: 32px floor on a phone, 48px ceiling on desktop. The
     hexagon mark carries the scale of the page, the wordmark no longer has to. */
  font-size: clamp(32px, 8.4vw, 48px);
  font-weight: var(--fw-medium);
  letter-spacing: 0.14em;
  line-height: 1;
  text-indent: 0.14em;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  /* keeps the wordmark legible where it crosses the lit metal */
  text-shadow: 0 2px 24px rgba(6, 7, 8, 0.85), 0 0 2px rgba(6, 7, 8, 0.9);
}

/* The one line under the wordmark: what this company is, in mono caps so it reads
   as a plate stamp rather than a marketing strapline. Same claim as the OG card. */
.subline {
  margin: 0;
  max-width: 42ch;
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-shadow: 0 2px 18px rgba(6, 7, 8, 0.9);
}

/* ---------- Centerpiece ---------- */

.core {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--sp-6);
  text-align: center;
  padding: var(--sp-8) 0;
}

.mark {
  position: relative;
  container-type: inline-size;
  width: min(78vw, 46vh, 460px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.mark svg { width: 100%; height: 100%; display: block; overflow: visible; }

.ring-outer,
.ring-mid,
.ring-inner,
.spokes { fill: none; stroke-linejoin: miter; vector-effect: non-scaling-stroke; }

.ring-outer { stroke: var(--line); stroke-width: 1; }
.ring-mid   { stroke: #3a4147; stroke-width: 1; }
.ring-inner { stroke: var(--accent); stroke-width: 1.5; }
.spokes     { stroke: #2c3237; stroke-width: 1; }

.core-fill { fill: rgba(194, 85, 42, 0.06); stroke: none; }

.tick { fill: #4a5157; }
.tick-live { fill: var(--accent); }

.mark-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Copy ---------- */

.headline {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: var(--fw-medium);
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.standfirst {
  margin: 0;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
}

@media (min-width: 1024px) {
  .standfirst { font-size: var(--fs-lg); }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rotor {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: rotor 64s linear infinite;
  }
  .pulse {
    animation: pulse 5.5s var(--ease) infinite;
  }
  .rise {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 900ms var(--ease) forwards;
  }
  .rise-1 { animation-delay: 120ms; }
  .rise-2 { animation-delay: 240ms; }
  .rise-3 { animation-delay: 360ms; }
}

@keyframes rotor { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Utilities ---------- */

/* Available to assistive tech and crawlers, invisible on screen. Only ever holds
   copy that is also stated in the page metadata, never a hidden extra claim. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Document page ----------

   A page that is read rather than looked at: the privacy notice, and anything
   like it later. Same tokens as the rest of the site, no new colour, size or
   spacing step; the measure is capped because a line of text past about
   seventy characters is read twice. */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-6) var(--sp-16);
}

.doc-back {
  display: inline-block;
  margin-bottom: var(--sp-8);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc h1 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  line-height: 1.2;
}

.doc .doc-date {
  margin: 0 0 var(--sp-12);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.doc h2 {
  margin: var(--sp-12) 0 var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  line-height: 1.3;
}

.doc p, .doc li { margin: 0 0 var(--sp-4); }
.doc ul { margin: 0 0 var(--sp-4); padding-left: var(--sp-6); }
.doc a { color: var(--accent); }
.doc a:hover { color: var(--text); }

.doc-foot {
  margin-top: var(--sp-16);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- Scrollbar ----------

   The moment a page here scrolls, its bar is ours. Same shape as the panel's
   declaration, in this site's own palette: the steel line for the thumb, the
   accent when a hand is on it, and nothing painted on the track. */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-track { background: transparent; }
body::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover { background: var(--accent); }
