/* ==========================================================================
   Octatech — OCTATECH SOLUTIONS LLC
   Single stylesheet. No build step, no external requests.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  --ink:        #0E1116;
  --slate:      #171C24;
  --paper:      #F6F6F4;
  --surface:    #FFFFFF;
  --graphite:   #535B69;
  --ultra:      #1E3AE6;
  --jade:       #0F6B52;
  --line:       #DEDEDA;
  --line-soft:  #EAEAE6;

  --bg:         var(--paper);
  --bg-raised:  var(--surface);
  --fg:         var(--ink);
  --fg-muted:   var(--graphite);
  --accent:     var(--ultra);
  --speaker-a:  var(--graphite);
  --speaker-b:  var(--ultra);
  --speaker-c:  var(--jade);
  --rule:       var(--line);
  --rule-soft:  var(--line-soft);
  --focus:      var(--ultra);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "Courier New", monospace;

  --step--1: clamp(0.8125rem, 0.79rem + 0.11vw, 0.875rem);
  --step-0:  clamp(1rem, 0.96rem + 0.19vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-2:  clamp(1.375rem, 1.22rem + 0.7vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.45rem + 1.4vw, 2.5rem);
  --step-4:  clamp(2.25rem, 1.62rem + 2.9vw, 4rem);

  --rail:    9rem;
  --gutter:  clamp(1.25rem, 5vw, 3.5rem);
  --measure: 34rem;
  --wrap:    72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        var(--ink);
    --bg-raised: var(--slate);
    --fg:        #E8EAEE;
    --fg-muted:  #98A1B0;
    --accent:    #8AA0FF;
    --speaker-a: #98A1B0;
    --speaker-b: #8AA0FF;
    --speaker-c: #4FD1A8;
    --rule:      #262D38;
    --rule-soft: #1E242D;
    --focus:     #8AA0FF;
  }
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -0.022em; line-height: 1.12; text-wrap: balance; }
p, ul, ol, dl { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: from-font; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--accent); color: var(--bg); }

/* --- Skip link ------------------------------------------------------------ */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--fg); color: var(--bg);
  padding: 0.6rem 1rem; font: 600 var(--step--1)/1 var(--font-sans);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* --- Shell ---------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The rail: a persistent left gutter that names who is speaking. */
.rail { display: grid; grid-template-columns: 1fr; gap: 0.75rem 0; }
@media (min-width: 60rem) {
  .rail { grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: 3rem; }
}
.rail__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-top: 0.45em;
  font-variant-numeric: tabular-nums;
}
.rail__body > * + * { margin-top: 1.15rem; }

/* --- Header --------------------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.4) blur(10px);
}
@supports not (backdrop-filter: blur(2px)) { .masthead { background: var(--bg); } }

.masthead__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--fg); text-decoration: none;
  font-weight: 680; font-size: 1.0625rem; letter-spacing: -0.03em;
  margin-inline-end: auto;
}
.brand__mark { width: 1.375rem; height: 1.375rem; flex: none; color: var(--accent); }
.brand:hover { text-decoration: none; }

.nav { display: none; }
@media (min-width: 60rem) {
  .nav { display: flex; gap: 1.75rem; align-items: center; }
  .nav a {
    color: var(--fg-muted); text-decoration: none;
    font-size: var(--step--1); font-weight: 500;
  }
  .nav a:hover { color: var(--fg); }
}

/* Language switcher */
.lang {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--rule); border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono); font-size: 0.6875rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.lang a, .lang span {
  padding: 0.4rem 0.7rem; text-decoration: none; line-height: 1.2;
  display: inline-flex; align-items: center;
}
.lang a { color: var(--fg-muted); }
.lang a:hover { color: var(--fg); background: var(--rule-soft); }
.lang [aria-current="true"] { background: var(--fg); color: var(--bg); font-weight: 600; }

/* --- Sections ------------------------------------------------------------- */
.section { padding-block: clamp(3.25rem, 7vw, 6rem); border-top: 1px solid var(--rule); }
.section--flush { border-top: 0; }
.section__title { font-size: var(--step-3); max-width: 22ch; }
.section__lede {
  font-size: var(--step-1); color: var(--fg-muted);
  max-width: var(--measure); line-height: 1.5; letter-spacing: -0.012em;
}
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1rem; }

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-block: clamp(2.75rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero__eyebrow {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--fg-muted);
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.hero__eyebrow::before {
  content: ""; width: 0.5rem; height: 0.5rem; flex: none;
  background: var(--speaker-c);
  clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%);
}
.hero__title {
  font-size: var(--step-4);
  letter-spacing: -0.038em;
  font-weight: 660;
  max-width: 19ch;
  margin-top: 1.1rem;
}
.hero__sub {
  font-size: var(--step-1); color: var(--fg-muted); line-height: 1.5;
  max-width: 42ch; margin-top: 1.25rem; letter-spacing: -0.012em;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.72rem 1.15rem; border-radius: 0.5rem;
  font-size: var(--step--1); font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: #fff; text-decoration: none; }
@media (prefers-color-scheme: dark) { .btn--primary:hover { color: var(--ink); } }
.btn--ghost { border-color: var(--rule); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg); text-decoration: none; }

/* --- Signature: the transcript -------------------------------------------- */
.thread {
  border: 1px solid var(--rule);
  border-radius: 0.875rem;
  background: var(--bg-raised);
  padding: clamp(1.1rem, 3vw, 1.75rem);
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}
.thread__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono); font-size: 0.6875rem;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-muted);
}
.turn { display: grid; grid-template-columns: 1fr; gap: 0.2rem; }
.turn + .turn { margin-top: 1.15rem; }
@media (min-width: 44rem) {
  .turn { grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 1.5rem; gap: 0; }
}
.turn__who {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding-top: 0.35em;
}
.turn--consumer  .turn__who { color: var(--speaker-a); }
.turn--assistant .turn__who { color: var(--speaker-b); }
.turn--human     .turn__who { color: var(--speaker-c); }
.turn__text { max-width: 46ch; letter-spacing: -0.008em; }
.turn--assistant .turn__text,
.turn--human .turn__text { color: var(--fg); }
.turn--consumer .turn__text { color: var(--fg-muted); }

/* The handoff: a rule that breaks across the rail. */
.handoff {
  display: flex; align-items: center; gap: 0.85rem;
  margin-block: 1.4rem;
  font-family: var(--font-mono); font-size: 0.625rem;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--speaker-c);
}
.handoff::before, .handoff::after {
  content: ""; height: 1px; background: var(--rule); flex: 1 1 auto;
}
.handoff::before { flex-grow: 0; flex-basis: 1.25rem; }

.thread__note {
  margin-top: 1.4rem; padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
  font-size: var(--step--1); color: var(--fg-muted); max-width: 60ch;
}

/* Staggered reveal — one orchestrated page-load moment, nothing else. */
@media (prefers-reduced-motion: no-preference) {
  .thread .turn, .thread .handoff { animation: turn-in 520ms cubic-bezier(0.22,0.7,0.3,1) both; }
  .thread > .turn:nth-of-type(1) { animation-delay: 180ms; }
  .thread .handoff { animation-delay: 620ms; }
  .thread > .turn:nth-of-type(2) { animation-delay: 300ms; }
  .thread > .turn:nth-of-type(3) { animation-delay: 420ms; }
  .thread > .turn:nth-of-type(4) { animation-delay: 540ms; }
  .thread > .turn:nth-of-type(5) { animation-delay: 740ms; }
}
@keyframes turn-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: none; }
}

/* --- Steps (a real sequence, so it is numbered) --------------------------- */
.steps { list-style: none; padding: 0; margin: clamp(2rem, 5vw, 3rem) 0 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 1fr; gap: 0.5rem; padding-block: clamp(1.5rem, 3vw, 2rem); border-top: 1px solid var(--rule-soft); }
.step:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 60rem) {
  .step { grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: 3rem; gap: 0; }
}
.step__n {
  counter-increment: step;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.1em; color: var(--accent); padding-top: 0.5em;
  font-variant-numeric: tabular-nums;
}
.step__n::before { content: counter(step, decimal-leading-zero); }
.step__title { font-size: var(--step-2); max-width: 26ch; }
.step__text { color: var(--fg-muted); max-width: var(--measure); margin-top: 0.6rem; }

/* --- Definition list (capabilities) --------------------------------------- */
.defs { margin-top: clamp(2rem, 5vw, 2.75rem); }
.def { padding-block: 1.4rem; border-top: 1px solid var(--rule-soft); display: grid; gap: 0.35rem; }
.def:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 48rem) {
  .def { grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); column-gap: 2.5rem; gap: 0; align-items: start; }
}
@media (min-width: 60rem) {
  .def { grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: 3rem; }
}
.def__term { font-weight: 620; letter-spacing: -0.018em; }
.def__desc { color: var(--fg-muted); max-width: 52ch; }

/* --- Commitments (the data section) --------------------------------------- */
.commitments { list-style: none; padding: 0; margin: clamp(2rem, 5vw, 2.75rem) 0 0; }
.commitment {
  padding-block: clamp(1.25rem, 3vw, 1.6rem);
  border-top: 1px solid var(--rule);
  display: grid; gap: 0.4rem;
}
@media (min-width: 48rem) {
  .commitment { grid-template-columns: 2rem minmax(0, 1fr); column-gap: 1.25rem; gap: 0; align-items: start; }
}
@media (min-width: 60rem) {
  .commitment { grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: 3rem; }
  .commitment__mark { justify-self: start; }
}
.commitment__mark { color: var(--speaker-c); width: 1.125rem; height: 1.125rem; margin-top: 0.45em; }
.commitment__text { font-size: var(--step-1); letter-spacing: -0.018em; max-width: 46ch; line-height: 1.4; font-weight: 520; }
.commitment__note { color: var(--fg-muted); font-size: var(--step--1); margin-top: 0.4rem; max-width: 62ch; line-height: 1.55; }

/* --- Contact -------------------------------------------------------------- */
.contact-grid { display: grid; gap: 2rem; margin-top: clamp(1.75rem, 4vw, 2.5rem); }
@media (min-width: 48rem) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; } }
@media (min-width: 72rem) { .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.75fr) minmax(0, 1.4fr); } }
.contact-item__label {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted);
  margin-bottom: 0.5rem;
}
.contact-item__value { font-size: var(--step-1); letter-spacing: -0.018em; font-style: normal; line-height: 1.4; }
.contact-item__value a { color: var(--fg); text-decoration-color: var(--accent); }

/* --- Footer --------------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.foot__grid { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .foot__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 3rem; } }
.foot__legal { font-style: normal; color: var(--fg-muted); font-size: var(--step--1); line-height: 1.7; max-width: 34ch; }
.foot__legal strong { color: var(--fg); font-weight: 620; display: block; letter-spacing: -0.01em; }
.foot__legal a { color: var(--fg-muted); }
.foot__nav h2 {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted);
  margin-bottom: 0.75rem;
}
.foot__list { list-style: none; padding: 0; display: grid; gap: 0.45rem; font-size: var(--step--1); }
.foot__list a { color: var(--fg); text-decoration: none; }
.foot__list a:hover { text-decoration: underline; }
.foot__base {
  margin-top: clamp(2rem, 4vw, 2.75rem); padding-top: 1.25rem;
  border-top: 1px solid var(--rule-soft);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.05em;
  color: var(--fg-muted);
}

/* --- Legal documents ------------------------------------------------------ */
.doc-head { padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.25rem); }
.doc-head__title { font-size: var(--step-3); max-width: 24ch; margin-top: 0.9rem; }
.doc-head__meta {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--fg-muted); margin-top: 1.1rem;
}
.doc-head__lede { font-size: var(--step-1); color: var(--fg-muted); max-width: var(--measure); margin-top: 1.25rem; line-height: 1.5; letter-spacing: -0.012em; }

.doc { padding-bottom: clamp(3rem, 7vw, 5rem); }
.doc__section { padding-block: clamp(1.75rem, 4vw, 2.5rem); border-top: 1px solid var(--rule); }
.doc__n {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.1em; color: var(--accent); padding-top: 0.55em;
  font-variant-numeric: tabular-nums;
}
.doc__body { max-width: 40rem; }
.doc__body h2 { font-size: var(--step-2); letter-spacing: -0.026em; }
.doc__body h3 { font-size: var(--step-0); font-weight: 640; margin-top: 1.5rem; letter-spacing: -0.012em; }
.doc__body > * + * { margin-top: 1rem; }
.doc__body p { color: var(--fg); }
.doc__body ul, .doc__body ol { padding-left: 1.25rem; display: grid; gap: 0.55rem; }
.doc__body li { padding-left: 0.2rem; }
.doc__body li::marker { color: var(--fg-muted); }
.doc__body strong { font-weight: 640; }

.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--bg-raised);
  padding: clamp(1rem, 2.5vw, 1.35rem);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 0.75rem; }
.callout__label {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted);
  display: block; margin-bottom: 0.5rem;
}

/* Ordered request checklist on the deletion page */
.checklist { list-style: none; padding: 0; display: block; margin-top: 0.5rem; }
/* Not a grid: these <li> mix <strong>, <span> and bare text, which grid would
   split into separate items. Absolute marker keeps the run of text intact. */
.checklist li {
  display: block; position: relative; padding-left: 1.6rem;
  padding-block: 0.7rem; border-top: 1px solid var(--rule-soft);
}
.checklist li:first-child { border-top: 0; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 1.35em;
  width: 0.5rem; height: 0.5rem;
  background: var(--accent);
  clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%);
}

.mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: -0.01em; }

/* --- Utilities ------------------------------------------------------------ */
.section__lede--spaced { margin-top: 2rem; }
@media (min-width: 60rem) {
  .indent-rail { margin-left: calc(var(--rail) + 3rem); }
}
.callout__address { font-size: var(--step-2); letter-spacing: -0.025em; line-height: 1.3; }

/* --- 404 ------------------------------------------------------------------ */
.notfound { padding-block: clamp(4rem, 12vw, 8rem); }
.notfound__code {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-muted);
}
.notfound__title { font-size: var(--step-3); margin-top: 1rem; max-width: 20ch; }
.notfound__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
