/* ============================================
   Atronics Labs / Jessie — Design Tokens
   ============================================ */

:root {
  /* Surfaces — cream base with pure white cards */
  --bg: #FBF8EE;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-inset: #F3EFE1;

  /* Ink — pure near-black to match logo */
  --ink-1: #0A0A0A;
  --ink-2: #1F1F1F;
  --ink-3: #4A4A52;
  --ink-4: #7A7A82;
  --ink-5: #B8B8BE;

  /* Hairlines — stronger, more visible outline aesthetic */
  --line-1: rgba(10, 10, 10, 0.14);
  --line-2: rgba(10, 10, 10, 0.28);
  --line-3: rgba(10, 10, 10, 0.48);
  --line-strong: #0A0A0A;

  /* Accent (tweakable) — Atronics Lime brand.
     Two tokens:
       --accent       = the pure lime fill/graphic color (#D4FF3A). Use for
                        chip fills, dots on dark bg, large graphic elements,
                        button backgrounds. NEVER use as text color on cream.
       --accent-fg    = the foreground-safe accent used as TEXT color. On
                        light slides this is a deep olive-lime (legible on
                        cream). On dark slides it flips to pure lime. Set
                        by scope below. */
  --accent: #D4FF3A;
  --accent-on-light: #3D5200;    /* deep olive-lime for text on cream */
  --accent-on-dark:  #D4FF3A;    /* pure lime for text on near-black */
  --accent-ink:      #0A0A0A;    /* on lime chip fills use black text */
  --accent-tint:     rgba(212, 255, 58, 0.22);
  --accent-tint-2:   rgba(212, 255, 58, 0.35);
  /* Default foreground accent for the light context (root). */
  --accent-fg: var(--accent-on-light);

  /* Signal colors — muted, clinical */
  --sig-red: #B42318;
  --sig-red-tint: rgba(180, 35, 24, 0.08);
  --sig-amber: #B54708;
  --sig-amber-tint: rgba(181, 71, 8, 0.08);
  --sig-green: #067647;
  --sig-green-tint: rgba(6, 118, 71, 0.08);

  /* Type */
  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 28px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "cv11", "tnum" 0;
  min-width: 1440px;
}

/* Serif utility */
.serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Tabular numerals for deltas */
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================
   Layout Shell
   ============================================ */

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-elevated);
  border-right: 1px solid var(--line-1);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.side-nav__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-1);
}

.side-nav__wordmark {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}

.side-nav__sub {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 500;
}

.side-nav__section-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 20px 12px 8px;
  font-weight: 600;
}

.side-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: background 120ms ease, color 120ms ease;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.side-nav__item:hover { background: var(--bg-inset); color: var(--ink-1); }
.side-nav__item.is-active {
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.side-nav__item.is-active .side-nav__num { color: var(--accent); }

.side-nav__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  width: 20px;
  letter-spacing: 0.02em;
}

.side-nav__foot {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line-1);
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.5;
}

/* ============================================
   Main
   ============================================ */

.main {
  min-width: 0;
}

.section {
  padding: 80px 72px;
  border-bottom: 1px solid var(--line-1);
  scroll-margin-top: 0;
}
.section--dark {
  background: #0A0A0A;
  color: #E9E7DF;
  border-bottom-color: rgba(255,255,255,0.06);
  /* Dark section: pure lime for accent text */
  --accent-fg: var(--accent-on-dark);
}
.section--warm {
  background: var(--bg-elevated);
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 20px;
}
.section--dark .section__eyebrow { color: rgba(255,255,255,0.55); }

.section__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.section__title {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 22ch;
  text-wrap: pretty;
}

.section__lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 60ch;
  margin: 0 0 48px;
}
.section--dark .section__lede { color: rgba(255,255,255,0.65); }

/* ============================================
   Delta — the core visual language
   ============================================ */

.delta {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.delta__from {
  color: var(--ink-4);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-5);
}

.delta__arrow {
  color: var(--accent-fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7em;
  transform: translateY(-0.08em);
}

.delta__to {
  color: var(--ink-1);
  font-weight: 500;
}

.delta--xl { font-size: 128px; line-height: 1; }
.delta--lg { font-size: 72px; line-height: 1; }
.delta--md { font-size: 40px; line-height: 1; }
.delta--sm { font-size: 22px; line-height: 1; }

.chip-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink-1);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ============================================
   Phone frame (bare screen, no bezel)
   ============================================ */

.phone {
  width: 340px;
  height: 720px;
  background: var(--bg-card);
  border-radius: 40px;
  box-shadow:
    0 1px 2px rgba(14,17,22,0.04),
    0 24px 60px -20px rgba(14,17,22,0.18),
    0 8px 20px -8px rgba(14,17,22,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone__status {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.phone__status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone__screen {
  flex: 1;
  padding: 12px 24px 28px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.phone__caption {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
}

/* ============================================
   Tablet frame
   ============================================ */

.tablet {
  width: 100%;
  max-width: 1180px;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border-radius: 28px;
  box-shadow:
    0 1px 2px rgba(14,17,22,0.04),
    0 30px 80px -24px rgba(14,17,22,0.22),
    0 10px 24px -10px rgba(14,17,22,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-1);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--ink-1);
  color: var(--bg-elevated);
}
.btn--primary:hover { background: #000; }

.btn--accent {
  background: var(--accent);
  color: white;
}

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.btn--ghost:hover { background: var(--bg-inset); }

.btn--full { width: 100%; }
.btn--lg { padding: 18px 24px; font-size: 16px; }

/* ============================================
   Status pills
   ============================================ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}
.pill--red { background: var(--sig-red-tint); color: var(--sig-red); }
.pill--red .pill__dot { background: var(--sig-red); }
.pill--amber { background: var(--sig-amber-tint); color: var(--sig-amber); }
.pill--amber .pill__dot { background: var(--sig-amber); }
.pill--green { background: var(--sig-green-tint); color: var(--sig-green); }
.pill--green .pill__dot { background: var(--sig-green); }
.pill--neutral { background: var(--bg-inset); color: var(--ink-3); }
.pill--neutral .pill__dot { background: var(--ink-4); }

/* ============================================
   Timeline (shared)
   ============================================ */

.tl {
  position: relative;
  padding-left: 32px;
}
.tl::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  border-left: 1.5px dashed var(--line-3);
}
.tl__row {
  position: relative;
  padding-bottom: 28px;
}
.tl__row:last-child { padding-bottom: 0; }
.tl__dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--line-3);
}
.tl__dot--accent {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}
.tl__dot--sig {
  background: var(--sig-red);
  border-color: var(--sig-red);
  box-shadow: 0 0 0 4px var(--sig-red-tint);
}
.tl__time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.tl__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  margin-bottom: 6px;
}
.tl__body {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* ============================================
   Card
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1.5px solid var(--ink-1);
  border-radius: var(--r-lg);
  padding: 24px;
}

/* Utility */
.stack { display: flex; flex-direction: column; }
.row { display: flex; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.mono { font-family: var(--mono); }
.text-ink-3 { color: var(--ink-3); }
.text-ink-4 { color: var(--ink-4); }
.text-accent { color: var(--accent); }
.uc { text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; font-weight: 600; }

/* Hide scrollbar utility */
.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { scrollbar-width: none; }

/* ============================================
   Continuity motif — the dotted horizontal thread
   ============================================ */

.continuity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.continuity__line {
  flex: 1;
  border-top: 1.5px dashed var(--line-3);
}

/* SVG stroke helper */
.stroke-accent { stroke: var(--accent); }
