:root {
  /* Palette - Modern Dark Theme */
  --cream: #050505;
  --ivory: #0a0a0d;
  --stone: #1a1917;
  --border: #2c2a2b;
  --warm-mid: #88827c;
  --slate: #a0a0a0;
  --graphite: #121214;
  --ink: #e0e0e0;

  /* Product colours */
  --iphone: #0071e3;
  --iphone-d: rgb(0 113 227 / 0.12);
  --ipad: #30d158;
  --ipad-d: rgb(48 209 88 / 0.12);
  --mac: #ff9f0a;
  --mac-d: rgb(255 159 10 / 0.12);
  --wear: #bf5af2;
  --wear-d: rgb(191 90 242 / 0.12);
  --svc: #00c7be;
  --svc-d: rgb(0 199 190 / 0.12);
  --danger: #ff3b30;
  --danger-d: rgb(255 59 48 / 0.1);
  --font-disp: "Cormorant Garamond", georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.07), 0 1px 4px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.1), 0 2px 8px rgb(0 0 0 / 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.72;
  overflow-x: hidden;
}

/* ── PROGRESS ── */
#prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--iphone),
    var(--ipad),
    var(--mac),
    var(--wear),
    var(--svc)
  );
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ── NAV (COMMENTED OUT TO USE GLOBAL SITE NAV) ──
nav{
  position:fixed;top:0;left:0;right:0;z-index:900;
  height:56px;display:flex;align-items:center;justify-content:space-between;
  padding:0 2rem;
  background:rgba(250,249,247,.92);
  backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border);
}
.nav-brand{
  font-family:var(--font-mono);font-size:.72rem;
  letter-spacing:.12em;color:var(--iphone);text-decoration:none;
  display:flex;align-items:center;gap:.5rem;
}
.nav-brand::before{content:'◆';font-size:.6rem;}
.nav-links{display:flex;gap:1.5rem;list-style:none;}
.nav-links a{
  font-family:var(--font-mono);font-size:.68rem;
  letter-spacing:.06em;text-transform:uppercase;
  color:var(--warm-mid);text-decoration:none;transition:color .2s;
}
.nav-links a:hover{color:var(--ink);}
@media(max-width:640px){.nav-links{display:none;}}
*/

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 2rem 80px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    circle at 1px 1px,
    var(--border) 1px,
    transparent 0
  );
  background-size: 36px 36px;
  opacity: 0.6;
}

.hero-blob {
  position: absolute;
  pointer-events: none;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(0 113 227 / 0.06) 0%,
    transparent 70%
  );
  top: -100px;
  right: -150px;
}

.hero-blob-2 {
  position: absolute;
  pointer-events: none;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(255 159 10 / 0.07) 0%,
    transparent 70%
  );
  bottom: -100px;
  left: -100px;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--iphone);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fu 0.6s 0.1s forwards;
}

.hero-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--iphone);
}

.hero h1 {
  font-family: var(--font-disp);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fu 0.75s 0.25s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--iphone);
}

.hero h1 strong {
  font-weight: 600;
}

.hero-deck {
  font-family: var(--font-disp);
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 300;
  font-style: italic;
  color: var(--slate);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fu 0.75s 0.4s forwards;
}

.hero-lede {
  font-size: 0.95rem;
  color: var(--slate);
  max-width: 560px;
  border-left: 2px solid var(--iphone);
  padding-left: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  opacity: 0;
  animation: fu 0.75s 0.55s forwards;
}

/* Product badges row */
.product-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fu 0.75s 0.7s forwards;
}

.prod-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 1px solid;
  background: var(--ivory);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: default;
}

.prod-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pb-iphone {
  border-color: rgb(0 113 227 / 0.3);
}

.pb-ipad {
  border-color: rgb(48 209 88 / 0.3);
}

.pb-mac {
  border-color: rgb(255 159 10 / 0.3);
}

.pb-wear {
  border-color: rgb(191 90 242 / 0.3);
}

.pb-svc {
  border-color: rgb(0 199 190 / 0.3);
}

.pb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pb-iphone .pb-dot {
  background: var(--iphone);
}

.pb-ipad .pb-dot {
  background: var(--ipad);
}

.pb-mac .pb-dot {
  background: var(--mac);
}

.pb-wear .pb-dot {
  background: var(--wear);
}

.pb-svc .pb-dot {
  background: var(--svc);
}

.pb-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--graphite);
}

.pb-desc {
  font-size: 0.75rem;
  color: var(--warm-mid);
}

/* hero stats */
.hero-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 700px;
  opacity: 0;
  animation: fu 0.75s 0.85s forwards;
}

.hk-cell {
  background: var(--ivory);
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.hk-val {
  font-family: var(--font-disp);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hk-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-mid);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: bounce 2.2s infinite;
}

.hs-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--border), transparent);
}

.hs-lbl {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--warm-mid);
}

@keyframes fu {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ── SECTIONS ── */
section {
  padding: 5rem 2rem;
}

.si {
  max-width: 1120px;
  margin: 0 auto;
}

.sec-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--iphone);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sec-label::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--iphone);
}

h2.sec-title {
  font-family: var(--font-disp);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1rem;
}

h2.sec-title em {
  font-style: italic;
  color: var(--iphone);
}

h2.sec-title strong {
  font-weight: 600;
}

.sec-lead {
  font-size: 0.97rem;
  color: var(--slate);
  max-width: 660px;
  margin-bottom: 3rem;
  line-height: 1.82;
}

.sec-bg-ivory {
  background: var(--ivory);
}

.sec-bg-stone {
  background: var(--stone);
}

.sec-bg-graphite {
  background: var(--graphite);
  color: #e8e4dd;
}

.sec-bg-graphite h2.sec-title {
  color: #f3f1ec;
}

.sec-bg-graphite .sec-lead {
  color: var(--warm-mid);
}

.sec-bg-graphite .sec-label {
  color: #60a5fa;
}

.sec-bg-graphite .sec-label::after {
  background: #60a5fa;
}

.divider {
  height: 1px;
  background: var(--border);
  max-width: 1120px;
  margin: 0 auto;
}

/* ── REVEAL ── */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.rv.vis {
  opacity: 1;
  transform: none;
}

.rv.d1 {
  transition-delay: 0.1s;
}

.rv.d2 {
  transition-delay: 0.2s;
}

.rv.d3 {
  transition-delay: 0.3s;
}

.rv.d4 {
  transition-delay: 0.4s;
}

/* ── GOALS TABLE ── */
.goals-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.goals-table thead {
  background: var(--graphite);
  color: #e8e4dd;
}

.goals-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.feat-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
  background: var(--graphite);
  vertical-align: top;
}

.goals-table tr:hover td {
  background: rgb(255 255 255 / 0.02);
}

.gt-goal {
  font-weight: 600;
  color: white;
}

.gt-impl {
  color: var(--slate);
}

.gt-impl code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgb(255 255 255 / 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  color: var(--iphone);
}

/* ── DATA PIPELINE ── */
.pipeline-h {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.pipe-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  flex: 1 1 100px;
  min-width: 90px;
  background: var(--graphite);
  border: 1px solid var(--border);
  position: relative;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.pipe-node:hover {
  border-color: var(--iphone);
  box-shadow: var(--shadow-md);
}

.pipe-node:first-child {
  border-radius: 10px 0 0 10px;
}

.pipe-node:last-child {
  border-radius: 0 10px 10px 0;
}

.pipe-node + .pipe-node {
  border-left: none;
}

.pipe-node::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--iphone);
  font-size: 1rem;
  z-index: 2;
  background: white;
  padding: 0 2px;
}

.pipe-node:last-child::after {
  display: none;
}

.pn-icon {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.pn-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--iphone);
  margin-bottom: 0.25rem;
}

.pn-desc {
  font-size: 0.75rem;
  color: var(--slate);
  line-height: 1.4;
}

/* quality cards */
.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.qc {
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: var(--graphite);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.qc:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.qc-icon {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.qc-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.qc-desc {
  font-size: 0.82rem;
  color: var(--slate);
  line-height: 1.65;
}

.qc-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin-top: 0.5rem;
}

.qc-tag.real {
  background: var(--ipad-d);
  color: #22a644;
}

.qc-tag.sim {
  background: var(--mac-d);
  color: #c07009;
}

/* ── ARCH LAYERS ── */
.arch-layers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (width <=680px) {
  .arch-layers {
    grid-template-columns: 1fr;
  }
}

.al-card {
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid;
  box-shadow: var(--shadow-sm);
}

.al-card.app {
  border-color: rgb(0 113 227 / 0.2);
  background: rgb(0 113 227 / 0.04);
}

.al-card.src {
  border-color: rgb(0 199 190 / 0.2);
  background: rgb(0 199 190 / 0.04);
}

.al-layer-name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.al-card.app .al-layer-name {
  color: var(--iphone);
}

.al-card.src .al-layer-name {
  color: var(--svc);
}

.al-title {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.al-files {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.al-files li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.al-files li::before {
  content: "├";
  color: var(--warm-mid);
  flex-shrink: 0;
}

.al-files li:last-child::before {
  content: "└";
}

/* ── MODULE TABS ── */
.module-tabs {
  margin-bottom: 3rem;
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.tab-btn:hover {
  border-color: var(--iphone);
  color: var(--iphone);
}

.tab-btn.active {
  background: var(--iphone);
  border-color: var(--iphone);
  color: white;
}

.tab-panes {
  position: relative;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.module-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--graphite);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (width <=700px) {
  .module-card {
    grid-template-columns: 1fr;
  }
}

.mc-left {
  padding: 2rem;
}

.mc-num {
  font-family: var(--font-disp);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--stone);
  margin-bottom: 0.75rem;
  letter-spacing: -0.04em;
}

.mc-title {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.mc-desc {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.mc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mc-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--ivory);
  color: var(--slate);
  border: 1px solid var(--border);
}

.mc-right {
  background: var(--graphite);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 220px;
}

.mc-visual {
  width: 100%;
  max-width: 300px;
}

/* ── ANALYTICS STACK ── */
.analytics-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (width <=700px) {
  .analytics-trio {
    grid-template-columns: 1fr;
  }
}

.at-card {
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--graphite);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.at-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.at-colour-bar {
  height: 3px;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.at-icon {
  font-size: 1.75rem;
  margin-bottom: 0.6rem;
}

.at-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.at-desc {
  font-size: 0.83rem;
  color: var(--slate);
  line-height: 1.7;
}

.at-methods {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.at-method {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: var(--ivory);
  color: var(--slate);
  border: 1px solid var(--border);
}

/* ── FEATURE TABLE ── */
.feat-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.feat-table thead {
  background: var(--graphite);
  color: #e8e4dd;
}

.feat-table th {
  padding: 0.9rem 1.25rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feat-table tr:last-child td {
  border-bottom: none;
}

.feat-table tr:hover td {
  background: var(--ivory);
}

.ft-area {
  font-weight: 600;
  color: var(--ink);
}

.ft-beh {
  color: var(--slate);
}

.ft-beh code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--ivory);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  color: var(--iphone);
}

/* ── TECH STACK GRID ── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.tech-card {
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: var(--graphite);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.tech-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tc-pkg {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.tc-role {
  font-size: 0.78rem;
  color: var(--slate);
}

.tc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 auto 0.6rem;
}

/* ── PRODUCT REVENUE CHART ── */
.rev-chart {
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.rev-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-mid);
  margin-bottom: 1.5rem;
}

.rev-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rb-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  align-items: center;
  gap: 1rem;
}

@media (width <=460px) {
  .rb-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

.rb-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--graphite);
  text-align: right;
}

@media (width <=460px) {
  .rb-label {
    text-align: left;
  }
}

.rb-track {
  height: 28px;
  background: var(--ivory);
  border-radius: 6px;
  overflow: hidden;
}

.rb-fill {
  height: 100%;
  border-radius: 6px;
  width: 0;
  transition: width 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.6rem;
}

.rb-fill-lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.rb-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
}

/* ── SEGMENTATION VISUAL ── */
.seg-wrap {
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.seg-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-mid);
  margin-bottom: 1.5rem;
}

.seg-clusters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.seg-cluster {
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid;
  flex: 1 1 180px;
}

.sc-c1 {
  border-color: rgb(0 113 227 / 0.25);
  background: rgb(0 113 227 / 0.05);
}

.sc-c2 {
  border-color: rgb(48 209 88 / 0.25);
  background: rgb(48 209 88 / 0.05);
}

.sc-c3 {
  border-color: rgb(255 159 10 / 0.25);
  background: rgb(255 159 10 / 0.05);
}

.sc-c4 {
  border-color: rgb(191 90 242 / 0.25);
  background: rgb(191 90 242 / 0.05);
}

.sc-num {
  font-family: var(--font-disp);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.sc-c1 .sc-num {
  color: var(--iphone);
}

.sc-c2 .sc-num {
  color: var(--ipad);
}

.sc-c3 .sc-num {
  color: var(--mac);
}

.sc-c4 .sc-num {
  color: var(--wear);
}

.sc-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.sc-desc {
  font-size: 0.8rem;
  color: var(--slate);
  line-height: 1.6;
}

.sc-algo {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--warm-mid);
  margin-top: 0.5rem;
}

/* ── OPTIMIZATION BOX ── */
.opt-box {
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid rgb(0 199 190 / 0.25);
  background: rgb(0 199 190 / 0.04);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.ob-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--svc);
  margin-bottom: 0.5rem;
}

.ob-title {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.ob-formula {
  background: var(--graphite);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #b8e0ff;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.ob-formula .kw {
  color: #ffd60a;
}

.ob-formula .fn {
  color: #62d256;
}

.ob-formula .co {
  color: #6b7280;
}

.ob-desc {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.75;
}

/* ── LIMITATIONS ── */
.limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.lim-card {
  border-radius: 10px;
  padding: 1.25rem;
  border-left: 3px solid;
  background: var(--graphite);
  box-shadow: var(--shadow-sm);
}

.lim-card.l1 {
  border-color: var(--mac);
}

.lim-card.l2 {
  border-color: var(--danger);
}

.lim-card.l3 {
  border-color: var(--wear);
}

.lim-card.l4 {
  border-color: var(--warm-mid);
}

.lc-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.lim-card.l1 .lc-num {
  color: var(--mac);
}

.lim-card.l2 .lc-num {
  color: var(--danger);
}

.lim-card.l3 .lc-num {
  color: var(--wear);
}

.lim-card.l4 .lc-num {
  color: var(--warm-mid);
}

.lc-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.lc-desc {
  font-size: 0.82rem;
  color: var(--slate);
  line-height: 1.65;
}

/* ── CONCLUSION STAT ROW ── */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.stat-cell {
  flex: 1 1 140px;
  background: var(--graphite);
  padding: 1.5rem;
  text-align: center;
}

.stat-val {
  font-family: var(--font-disp);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-mid);
}

/* ── REPO TREE ── */
.repo-tree {
  background: var(--graphite);
  border-radius: 12px;
  padding: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 2;
  color: #b8b2a8;
  box-shadow: var(--shadow-md);
  white-space: pre;
  overflow-x: auto;
}

.rt-dir {
  color: #60a5fa;
}

.rt-file {
  color: #b8e0ff;
}

.rt-comment {
  color: #4b5065;
}

/* ── WORKFLOW STEPPER ── */
.workflow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wf-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--graphite);
  transition: background 0.2s;
}

.wf-step:first-child {
  border-radius: 12px 12px 0 0;
}

.wf-step:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
}

.wf-step:hover {
  background: var(--ivory);
}

.wf-num {
  font-family: var(--font-disp);
  font-size: 2rem;
  font-weight: 700;
  color: var(--stone);
  text-align: center;
  line-height: 1;
  padding-top: 0.25rem;
}

.wf-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.wf-desc {
  font-size: 0.85rem;
  color: var(--slate);
  line-height: 1.7;
}

.wf-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin-top: 0.4rem;
  display: inline-block;
}

.wf-b-iphone {
  background: var(--iphone-d);
  color: var(--iphone);
}

.wf-b-ipad {
  background: var(--ipad-d);
  color: #22a644;
}

.wf-b-svc {
  background: var(--svc-d);
  color: #008c85;
}

.wf-b-mac {
  background: var(--mac-d);
  color: #c07009;
}

.wf-b-wear {
  background: var(--wear-d);
  color: #9535d6;
}

/* ── FOOTER (COMMENTED OUT TO USE GLOBAL SITE FOOTER) ──
footer{
  background:var(--ink);color:#b8b2a8;
  border-top:1px solid rgba(255,255,255,.08);
  padding:3rem 2rem;text-align:center;
}
footer h3{font-family:var(--font-disp);font-size:1.6rem;font-weight:400;color:white;margin-bottom:.4rem;}
footer h3 em{font-style:italic;color:#60a5fa;}
.ft-sub{font-family:var(--font-mono);font-size:.75rem;letter-spacing:.08em;margin-bottom:1.5rem;color:#4b5065;}
.ft-links{display:flex;flex-wrap:wrap;justify-content:center;gap:1.5rem;margin-bottom:2rem;}
.ft-links a{font-family:var(--font-mono);font-size:.75rem;color:#60a5fa;text-decoration:none;letter-spacing:.05em;transition:color .2s;}
.ft-links a:hover{color:white;}
.ft-disc{
  font-size:.78rem;background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);border-radius:8px;
  padding:.75rem 1.25rem;max-width:560px;margin:0 auto 1.5rem;
  line-height:1.6;color:#6b7280;font-family:var(--font-mono);
}
.ft-copy{font-family:var(--font-mono);font-size:.7rem;color:#374151;}
*/
