/* ==========================================================================
   Radzle — radzle.cloud
   Design tokens, self-hosted type and the page shell. One stylesheet; the
   per-element layout still lives inline in index.html, matching the source
   design so a section can be moved without hunting for its rules.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Type — Archivo (variable 100..900, stretch 62%..125%) and Fragment Mono.
   Self-hosted so the site has no third-party runtime dependency.
   -------------------------------------------------------------------------- */

/* vietnamese */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-var-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-var-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-var-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Fragment Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fragment-mono-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* latin-ext */
@font-face {
  font-family: 'Fragment Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fragment-mono-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fragment Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fragment-mono-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Tokens — tonal ramps generated in OKLCH on one shared lightness scale, so
   the same step of any role matches the others in visual value.
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-accent-2: #e15b47;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);

  --color-neutral-100: #f8f4f4;
  --color-neutral-200: #eae7e7;
  --color-neutral-300: #d7d3d3;
  --color-neutral-400: #bab6b6;
  --color-neutral-500: #9b9797;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-neutral-900: #2d2b2b;

  --color-accent-100: #fff2ef;
  --color-accent-200: #ffe0d9;
  --color-accent-300: #ffc4b8;
  --color-accent-400: #ff9783;
  --color-accent-500: #ff563c;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;
  --color-accent-900: #4d170e;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-heading-weight: 800;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Surfaces the page draws on top of the dark ground. */
  --line-1: rgba(243, 242, 242, 0.1);
  --line-2: rgba(243, 242, 242, 0.14);
  --line-3: rgba(243, 242, 242, 0.22);
  --dim-1: rgba(243, 242, 242, 0.45);
  --dim-2: rgba(243, 242, 242, 0.6);
  --dim-3: rgba(243, 242, 242, 0.75);
}

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

a { color: var(--color-bg); text-decoration: none; }
a:hover { color: var(--color-accent-400); }
img, canvas, svg { display: block; max-width: 100%; }

::selection { background: var(--color-accent); color: #201e1d; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.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 link — visible only once focused. */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 400;
  transform: translateY(-200%);
  background: var(--color-accent); color: #201e1d;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  padding: 12px 18px; transition: transform 0.2s;
}
.skip-link:focus-visible { transform: translateY(0); color: #201e1d; }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
@keyframes rzRise  { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes rzBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes rzDash  { to { stroke-dashoffset: -24; } }
@keyframes rzPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes rzScanY { from { top: 0%; } to { top: 100%; } }

/* --------------------------------------------------------------------------
   Repeated element classes — the design uses these verbatim in many places,
   so they earn a class rather than another copy of the same inline style.
   -------------------------------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* Section eyebrow: "LAYER 01 / COMPUTE & CLOUD ACCESS" */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim-1);
  margin-bottom: 40px;
}

/* Capability chip */
.chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-3);
  padding: 7px 11px;
  color: rgba(243, 242, 242, 0.8);
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--color-accent); color: var(--color-bg); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Verb strip — a bordered run of segments with hairline dividers.
   `fit-content` keeps the frame tight to the segments instead of trailing
   an empty cell out to the column edge. */
.verbs {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(243, 242, 242, 0.18);
}
.verbs > span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 12px 18px;
  border-right: 1px solid rgba(243, 242, 242, 0.18);
  color: rgba(243, 242, 242, 0.85);
  transition: background 0.2s;
}
.verbs > span:last-child { border-right: 0; }
.verbs > span:hover { background: rgba(236, 48, 19, 0.12); }
.verbs.verbs-sm > span { font-size: 10px; letter-spacing: 0.1em; padding: 11px 14px; }

/* Two-column split used by most sections */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 64px;
  align-items: start;
}

/* Disclosure rows (AI + Security). The whole row toggles, but the control
   is a real button inside a heading so the service names stay in the
   document outline. */
.acc-item {
  border-bottom: 1px solid var(--line-1);
  cursor: pointer;
  transition: background 0.2s;
}
.acc-item:hover { background: rgba(243, 242, 242, 0.04); }
.acc-h { margin: 0; }
.acc-btn {
  display: flex;
  align-items: baseline;
  gap: 18px;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.acc-n { font-family: var(--font-mono); font-size: 11px; color: var(--color-accent); }
.acc-t {
  flex: 1;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.acc-mark { font-family: var(--font-mono); font-size: 15px; color: rgba(243, 242, 242, 0.5); }
.acc-panel { display: none; }
.acc-item[data-open="true"] .acc-panel { display: flex; }

/* Terminal command button */
.term-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  background: none;
  border: 1px solid rgba(243, 242, 242, 0.25);
  color: var(--color-bg);
  padding: 9px 13px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, color 0.2s;
}
.term-btn:hover { border-color: var(--color-accent); color: var(--color-accent-400); }

/* "I need" picker */
.need {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  background: none;
  color: var(--color-bg);
  border: 1px solid rgba(243, 242, 242, 0.3);
  padding: 11px 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.need[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #201e1d;
  font-weight: 700;
}

/* Primary and ghost calls to action */
.cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  background: var(--color-accent);
  color: #201e1d;
  font-weight: 700;
  padding: 14px 20px;
  display: inline-flex;
  gap: 16px;
}
.cta:hover { color: #201e1d; }
.cta-ghost {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  border: 1px solid rgba(243, 242, 242, 0.3);
  padding: 14px 20px;
  display: inline-flex;
  gap: 16px;
  transition: border-color 0.2s;
}
.cta-ghost:hover { border-color: var(--color-accent); }

/* Nav CTA — sized here, not inline, so the small-screen rule can shrink it. */
.cta-nav {
  background: var(--color-accent);
  color: #201e1d;
  padding: 10px 16px;
  display: inline-flex;
  gap: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.cta-nav:hover { color: #201e1d; }

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 14vh 6vw 12vh;
  width: min(860px, 94vw);
}

/* Live status dot */
.dot-live {
  width: 6px; height: 6px;
  background: var(--color-accent);
  animation: rzPulse 2s infinite;
  flex: none;
}

/* Chapter rail, nav status pill and hero diagram keep their `display` in the
   stylesheet — an inline `display` would outrank the responsive rules that
   hide them on small screens. */
#rz-rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.6;
  white-space: nowrap;
}

.hero-diagram {
  position: absolute;
  right: clamp(8px, 4vw, 72px);
  top: max(104px, 10vh);
  bottom: 4vh;
  width: min(40vw, 520px);
  display: flex;
  flex-direction: column;
  will-change: transform, opacity;
}

/* Instrument header above a diagram panel: label left, live status right. */
.panel-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}

/* Section rules */
.rule-top { border-top: 2px solid var(--line-2); }

/* Jumping to a section must not park its heading under the fixed nav. */
section[id] { scroll-margin-top: 72px; }

/* --------------------------------------------------------------------------
   Responsive + accessibility
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav-status { display: none; }
}

@media (max-width: 960px) {
  #rz-rail { display: none; }
  .nav-links a:not(.cta-nav) { display: none; }
}

@media (max-width: 760px) {
  .hero-diagram { display: none; }
  .hero-copy { width: 100%; padding: 16vh 6vw 14vh; }
  .split { gap: 40px; }
  /* Keep the nav CTA on one line instead of letting it wrap and overflow. */
  .cta-nav { padding: 9px 12px; font-size: 10px; gap: 8px; }
  .verbs { width: 100%; }
}

@media (max-width: 440px) {
  /* Narrow phones: the wordmark plus a full-length CTA will not both fit. */
  .cta-nav { padding: 8px 10px; font-size: 9px; letter-spacing: 0.06em; }
  .cta-nav span { display: none; }
}

@media (pointer: coarse) {
  #rz-dot, #rz-ring { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* No-JS fallback: the loader must never trap the page. */
.no-js #rz-loader { display: none; }
