/* ============================================================
   Ergono3D — design system
   Palette derived from logo:
     --ink       deep navy    oklch(24% 0.07 240)   ≈ #1A3A5C
     --paper     white        #fff
     --rule      cool hairline oklch(90% 0.01 240)
     --muted     navy-grey    oklch(54% 0.05 240)
     --accent    cyan         oklch(66% 0.15 215)   ≈ #29ABE2
     --accent-2  logo red     oklch(54% 0.22 25)    ≈ #E84040
   Type: IBM Plex Sans + IBM Plex Mono
   ============================================================ */

:root {
  /* brand colours */
  --ink:          #0f2420;
  --ink-2:        #1e3a38;
  --paper:        #ffffff;
  --paper-2:      #f0f7ff;
  --rule:         #d1e0f0;
  --rule-2:       #e6eef8;
  --muted:        #4a6472;
  --accent:       #2563eb;
  --accent-teal:  #0d9488;
  --accent-grad:  linear-gradient(135deg, #60a5fa 0%, #2dd4bf 100%);
  --accent-grad-hover: linear-gradient(135deg, #3b82f6 0%, #14b8a6 100%);
  --accent-ink:   #1d4ed8;
  --accent-2:     #E84040;
  --bg:           #f8fafc;
  /* layout */
  --max:          1240px;
  --gutter:       clamp(20px, 4vw, 40px);
  /* fonts */
  --mono:         "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 450; }
h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.25; font-weight: 500; }
h4 { font-size: 16px; line-height: 1.3; font-weight: 500; }
p  { margin: 0; text-wrap: pretty; }
a  { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a.accent { color: var(--accent); }
a.accent:hover { color: var(--accent-teal); }

.mono, code, kbd {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-feature-settings: "ss01", "ss02";
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--accent { color: var(--accent); }
.dot,
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-grad); vertical-align: middle; margin-right: 8px;
  margin-bottom: 2px;
}

.lede { font-size: clamp(18px, 1.5vw, 22px); color: var(--ink-2); line-height: 1.45; max-width: 58ch; }

/* ---------- layout primitives ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container.wide { max-width: 1400px; }
.section { padding: clamp(36px, 5vw, 70px) 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 64px; }
@media (min-width: 880px) {
  .section-head { grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: end; }
}

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; letter-spacing: -0.01em;
}
.logo-mark {
  width: 26px; height: 26px; border-radius: 5px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 600;
  position: relative; overflow: hidden;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in oklch, var(--paper) 20%, transparent) 3px 4px);
  opacity: .5;
}
.nav-links { display: none; gap: 28px; font-size: 14px; color: var(--ink-2); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a { position: relative; }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent-grad);
}
.nav-cta { display: flex; align-items: center; gap: 10px; }
@media (min-width: 760px) { .nav-links { display: flex; } }

/* ---------- mobile nav toggle button ---------- */
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
  background: none; border: 1px solid var(--rule); border-radius: 6px;
  cursor: pointer; flex-shrink: 0;
}
.nav-toggle span {
  display: block; height: 1.5px; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
@media (min-width: 760px) { .nav-toggle { display: none; } }

/* nav-open: full-width dropdown below the sticky bar */
.nav-open .nav-links {
  display: flex !important; flex-direction: column; gap: 0;
  position: absolute; top: 64px; left: 0; right: 0;
  background: color-mix(in oklch, var(--paper) 96%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  padding: 4px 0; z-index: 49;
}
.nav-open .nav-links a {
  padding: 14px var(--gutter); font-size: 15px;
  border-bottom: 1px solid var(--rule-2); display: block;
}
.nav-open .nav-links a:last-child { border-bottom: 0; }

/* hamburger → X animation */
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- mobile support notice ---------- */
.mobile-support-notice {
  display: none;
}

@media (max-width: 820px) {
  .mobile-support-notice {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 120;
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--rule));
    border-radius: 18px;
    background: color-mix(in oklch, var(--paper) 94%, transparent);
    color: var(--ink);
    box-shadow: 0 18px 50px rgba(15, 36, 32, .16);
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
  }
  .mobile-support-notice strong {
    font-size: 14px;
    line-height: 1.25;
  }
  .mobile-support-notice span {
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
  }
}

/* ---------- buttons ---------- */
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  white-space: nowrap;
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); color: var(--paper); background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.secondary:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
.btn.accent { background: var(--accent-grad); border-color: transparent; color: #ffffff; }
.btn.accent:hover { background: var(--accent-grad-hover); border-color: transparent; color: #ffffff; transform: translateY(-1px); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.nav-dashboard { min-width: 154px; justify-content: center; padding-inline: 28px; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- hairline / rules ---------- */
.hr { height: 1px; background: var(--rule); border: 0; }
.tick-rule {
  height: 14px;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px);
  background-size: 8px 100%;
  opacity: .7;
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(60px, 9vw, 110px) 0 clamp(100px, 14vw, 180px);
  position: relative; overflow: hidden;
}
.hero-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
.hero-grid > * { min-width: 0; }
.hero h1 { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; } }
.hl, .hero h1 span.hl {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.hero h1 span.hl { font-style: italic; font-weight: 400; }
.hero .lede { margin-top: 24px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.hero-meta .kv { display: flex; flex-direction: column; gap: 2px; }
.hero-meta .kv .k { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-meta .kv .v { font-size: 14px; }

/* ---------- placeholder art / renders ---------- */
.render {
  position: relative; border: 1px solid var(--rule); border-radius: 14px;
  background: var(--paper-2); overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
}
.render .stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg,
    transparent 0 10px,
    color-mix(in oklch, var(--rule) 60%, transparent) 10px 11px);
}
.render .label {
  position: relative; z-index: 2;
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  color: var(--muted); background: var(--paper);
  padding: 4px 10px; border: 1px solid var(--rule); border-radius: 4px;
}
.render .caption-tl, .render .caption-tr, .render .caption-bl, .render .caption-br {
  position: absolute; font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: .05em; color: var(--muted);
  background: color-mix(in oklch, var(--paper) 80%, transparent);
  padding: 3px 6px; border-radius: 3px;
}
.render .caption-tl { top: 10px; left: 10px; }
.render .caption-tr { top: 10px; right: 10px; }
.render .caption-bl { bottom: 10px; left: 10px; }
.render .caption-br { bottom: 10px; right: 10px; }

/* real image inside a .render card — image replaces stripes+label */
.render.photo { background: var(--paper); }
.render.photo .stripes { display: none; }
.render.photo > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.render.photo.contain > img { object-fit: contain; padding: 24px; }
.render.photo .caption-tl,
.render.photo .caption-tr,
.render.photo .caption-bl,
.render.photo .caption-br { z-index: 2; }

/* logo-mark can hold an image — override base square styles */
.logo .logo-mark.img {
  width: 88px !important; height: 48px !important;
  padding: 0 !important; background: transparent !important;
  border: 0 !important; border-radius: 0 !important;
  overflow: visible !important;
}
.logo .logo-mark.img::after { content: none !important; display: none !important; }
.logo .logo-mark.img img {
  width: 88px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

/* showcase grid for real insole photos */
.showcase-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin-top: 32px;
}
@media (max-width: 720px) { .showcase-grid { grid-template-columns: 1fr; } }
.showcase-grid .render { aspect-ratio: 4 / 3; }
.showcase-grid .render.full { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

/* real-world print outcome gallery */
.wild-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 40px;
}
@media (min-width: 880px) {
  .wild-head {
    grid-template-columns: .9fr 1.2fr;
    gap: 64px;
  }
}
.wild-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  padding: clamp(12px, 1.4vw, 18px);
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: color-mix(in oklch, var(--paper) 72%, var(--paper-2));
}
.wild-shot {
  position: relative;
  min-height: clamp(220px, 28vw, 360px);
  border-radius: 14px;
  overflow: hidden;
  background-image: url("img/app-parameters.png");
  background-repeat: no-repeat;
  background-size: 200% 200%;
  box-shadow: inset 0 0 0 1px rgba(15, 36, 32, .05);
}
.wild-shot--one { background-position: left top; }
.wild-shot--two { background-position: right top; }
.wild-shot--three { background-position: left bottom; }
.wild-shot--four { background-position: right bottom; }
.wild-tag {
  position: absolute;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 3px;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wild-tag--left { left: 10px; }
.wild-tag--right { right: 10px; }
.wild-tag--bottom { top: auto; bottom: 10px; }
@media (max-width: 720px) {
  .wild-gallery {
    grid-template-columns: 1fr;
  }
  .wild-shot {
    min-height: 260px;
    background-size: 200% 200%;
  }
}

/* Iterate section: asymmetric 3fr/7fr grid so both images share the same height
   at their natural proportions (portrait params panel + wide 3D preview) */
.iterate-grid {
  display: grid; grid-template-columns: 3fr 7fr; gap: 20px; margin-top: 40px;
  align-items: start;
}
@media (max-width: 720px) { .iterate-grid { grid-template-columns: 1fr; } }

/* full-bleed media card with caption */
.media-card { display: grid; gap: 14px; }
.media-card .render { aspect-ratio: 4 / 3; }
.media-card .media-caption {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted);
  display: flex; justify-content: space-between; gap: 12px;
}

/* technical lattice decorative SVG bg for hero */
.hero-render {
  border: 1px solid var(--rule); border-radius: 18px; padding: 28px;
  background:
    radial-gradient(ellipse at 70% 30%, color-mix(in oklch, var(--accent) 12%, transparent), transparent 60%),
    var(--paper-2);
  position: relative; overflow: hidden;
  min-height: 460px;
  display: grid; grid-template-rows: auto 1fr auto;
}
.hero-render .corner-tick {
  position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--ink);
}
.hero-render .corner-tick.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.hero-render .corner-tick.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.hero-render .corner-tick.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.hero-render .corner-tick.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.hero-render-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted);
  padding-bottom: 14px; border-bottom: 1px dashed var(--rule); margin-bottom: 14px;
}
.hero-render-foot {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px dashed var(--rule); padding-top: 14px; margin-top: 14px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
}
.hero-render-foot .cell { padding: 6px 10px; border-right: 1px solid var(--rule-2); }
.hero-render-foot .cell:last-child { border-right: 0; }
.hero-render-foot .cell .k { color: var(--muted); display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }

/* the sole svg stays crisp */
.sole-svg { width: 100%; height: 100%; display: block; }

/* ---------- feature grid / cards ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
@media (min-width: 720px) { .cards.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } .cards.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--paper); padding: 32px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 220px;
}
.card .num,
.num {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.05em;
}
.card h3 { font-size: 20px; letter-spacing: -0.015em; }
.card p  { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* parameter list */
.param-list { display: grid; gap: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.param-list .row {
  display: grid; grid-template-columns: 180px 1fr auto; gap: 16px;
  padding: 16px 20px; align-items: center;
  border-bottom: 1px solid var(--rule-2);
  font-size: 14px;
}
.param-list .row:last-child { border-bottom: 0; }
.param-list .row .name,
.param-list .name { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.param-list .row .desc,
.param-list .desc { color: var(--muted); }
.param-list .row .range,
.param-list .range { font-family: var(--mono); font-size: 12px; color: var(--accent-teal); background: var(--paper-2); padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
@media (max-width: 640px) { .param-list .row { grid-template-columns: 1fr; } .param-list .row .range { justify-self: start; } }

/* ---------- workflow / steps ---------- */
.steps { display: grid; gap: 24px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  border-left: 1px solid var(--rule); padding: 20px 20px 20px 24px;
  position: relative;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: -1px; top: 0;
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .1em;
  background: var(--paper); padding: 2px 8px 2px 0; color: var(--muted);
}
.step h4 { margin-top: 24px; font-size: 17px; }
.step p { margin-top: 6px; color: var(--muted); font-size: 14px; }

/* ---------- pricing ---------- */
.price-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; }
@media (min-width: 900px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card { background: var(--paper); padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.price-card.featured { background: var(--ink); color: var(--paper); }
.price-card.featured .muted, .price-card.featured .price-meta { color: oklch(70% 0.01 85); }
.price-card .tier { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.price-card.featured .tier { color: var(--accent); }
.price-card .price { display: flex; align-items: baseline; gap: 8px; }
.price-card .price .amt { font-size: 52px; letter-spacing: -0.03em; font-weight: 450; }
.price-card .price .cur { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); }
.price-card.featured .price .cur { color: oklch(75% 0.05 45); }
.price-card .price-meta { font-size: 13px; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.price-card ul li { display: flex; gap: 10px; align-items: flex-start; }
.price-card ul li::before {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px;
  border: 1px solid currentColor; border-radius: 2px;
}
.price-card ul li.check::before { background: var(--accent); border-color: var(--accent); }
.price-card .btn { align-self: flex-start; margin-top: auto; }
.price-card.featured .btn { background: var(--accent); border-color: var(--accent); color: #1a0f05; }
.price-card.featured .btn.secondary { background: transparent; color: var(--paper); border-color: oklch(45% 0.01 85); }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item details { padding: 0; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 24px 0;
  display: grid; grid-template-columns: 48px 1fr 24px; gap: 20px;
  align-items: center; font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.idx,
.faq-item summary .idx {
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .1em;
  opacity: 0.4; min-width: 32px; flex-shrink: 0;
}
.faq-item summary .tog { position: relative; width: 20px; height: 20px; }
.faq-item summary .tog::before, .faq-item summary .tog::after {
  content: ""; position: absolute; background: var(--accent); transition: transform .2s ease;
}
.faq-item summary .tog::before { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
.faq-item summary .tog::after { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); }
.faq-item details[open] summary .tog::after { transform: translateX(-50%) scaleY(0); }
.answer,
.faq-item .answer {
  padding: 0 0 28px 68px;
  color: var(--muted); font-size: 15.5px; max-width: 72ch; line-height: 1.6;
}
.answer p { margin-bottom: 14px; }
.answer p:last-child { margin-bottom: 0; }
.answer ul { padding-left: 18px; margin-bottom: 14px; }
.answer ul li { margin-bottom: 6px; }
.faq-category-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  margin-top: 48px;
  margin-bottom: 16px;
}

/* ---------- blog ---------- */
.post-feature {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  border: 1px solid var(--rule); border-radius: 16px; overflow: hidden;
  background: var(--paper);
}
@media (min-width: 880px) { .post-feature { grid-template-columns: 1.1fr 1fr; gap: 0; } }
.post-feature .body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.post-feature .body h2 { letter-spacing: -0.02em; }
.post-feature .art { min-height: 320px; position: relative; border-left: 1px solid var(--rule); }
.blog-featured-section {
  padding-top: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.blog-cat-nav {
  margin-top: 8px;
  margin-bottom: clamp(44px, 6vw, 78px);
}
.blog-posts-section {
  padding-top: clamp(34px, 5vw, 64px);
}

.post-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card {
  display: flex; flex-direction: column; gap: 16px;
  border: 1px solid var(--rule); border-radius: 14px; padding: 20px;
  background: var(--paper); transition: transform .2s ease, border-color .2s ease;
}
.post-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.post-card .art { aspect-ratio: 16/10; border-radius: 10px; }
.post-card .cat { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.post-card h3 { font-size: 19px; letter-spacing: -0.015em; line-height: 1.25; }
.post-card .meta { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); display: flex; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--rule-2); }

/* categories nav for blog */
.cat-nav {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 32px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 16px 0;
}
.cat-nav a {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink-2);
}
.cat-nav a.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cat-nav a:hover { border-color: var(--ink); color: var(--ink); }
.cat-nav a.active:hover { color: var(--paper); }

/* ---------- misc ---------- */
.logos-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  padding: 20px 0; border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule);
  align-items: center;
}
@media (min-width: 760px) { .logos-row { grid-template-columns: repeat(5, 1fr); } }
.logo-ghost {
  font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted);
  text-align: center; letter-spacing: .05em;
}

.callout {
  display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center;
  padding: clamp(28px, 4vw, 48px);
  background: var(--ink); color: var(--paper); border-radius: 18px;
  position: relative; overflow: hidden;
}
.callout::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 70%, transparent), transparent 60%);
  opacity: .35;
  pointer-events: none;
}
@media (min-width: 860px) { .callout { grid-template-columns: 1.3fr auto; gap: 48px; } }
.callout h2 { color: var(--paper); }
.callout p  { color: oklch(82% 0.01 85); max-width: 56ch; }
.callout .btn.secondary { color: var(--paper); border-color: oklch(60% 0.03 240); }
.callout .btn.secondary:hover { background: oklch(30% 0.06 240); color: var(--paper); border-color: var(--paper); }
/* eyebrow 在深色 callout 背景内：白色文字，更易阅读 */
.callout .eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
  opacity: 1;
  letter-spacing: 0.16em;
}
.callout .dot {
  background: var(--paper);
  width: 7px; height: 7px;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--rule); padding: 64px 0 32px;
  font-size: 14px; color: var(--ink-2);
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 14px; align-items: center; margin-top: 20px; }
.footer-social a { color: var(--muted); transition: color .15s; }
.footer-social a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule);
  font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); letter-spacing: .05em;
}

/* ---------- breadcrumb ---------- */
.crumbs {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em;
  color: var(--muted); padding: 20px 0; text-transform: uppercase;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { margin: 0 10px; opacity: .6; }

/* ---------- page-head pattern ---------- */
.page-head {
  padding: clamp(36px, 5vw, 60px) 0 clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.page-head .lede { margin-top: 20px; }
.page-head .tags { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.page-head .tag { font-family: "IBM Plex Mono", monospace; font-size: 11px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); }

/* utility */
.muted { color: var(--muted); }
.accent { color: var(--accent-ink); }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 56px; } }

/* reveal on scroll (minimal) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   Utility classes — replacement for inline styles
   ============================================================ */
.section--ruled  { border-top: 1px solid var(--rule); }
.section--tinted { background: var(--paper-2); }

.btn-group       { display: flex; gap: 12px; flex-wrap: wrap; }

.card-link {
  font-size: 13px;
  font-family: var(--mono);
  color: var(--accent);
}
.card-link:hover { color: var(--accent-teal); }

.quote-text {
  font-size: 20px;
  color: var(--ink);
  line-height: 1.4;
  margin-top: 12px;
}

.footer-body {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  max-width: 32ch;
  line-height: 1.65;
}
.footer-legal {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
}
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--ink); }

/* generic .kv key/value pair (covers hero-meta and other uses) */
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv .k {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.kv .v {
  font-size: 13px;
  color: var(--ink);
}

/* soft link-colour tweak for .accent utility */
a.accent:hover { color: var(--accent-teal); }

/* ---------- back-to-top ---------- */
.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent-grad);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 36, 32, 0.18);
  z-index: 60;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
}
.back-to-top:hover {
  background: var(--accent-grad-hover);
  color: #ffffff;
  transform: translateY(-2px);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top svg { width: 18px; height: 18px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .01s; }
}

/* =========================== PROCESS FLOW VISUAL =========================== */
.flow {
  margin-top: 40px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px;
  background:
    radial-gradient(circle at 48% 34%, color-mix(in oklch, var(--accent) 10%, transparent), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 52%, #eef7ff 100%);
  position: relative;
  overflow: hidden;
}
.flow::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--rule) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--rule) 55%, transparent) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  opacity: .42;
  pointer-events: none;
}
.flow > * {
  position: relative;
  z-index: 1;
}
.flow-live {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(92px, .18fr) minmax(0, 1fr);
  gap: clamp(16px, 2.6vw, 30px);
  align-items: center;
  min-height: 390px;
}
.flow-panel {
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in oklch, var(--rule) 82%, var(--ink));
  border-radius: 18px;
  background: color-mix(in oklch, var(--paper) 94%, var(--paper-2));
  box-shadow: 0 22px 55px rgba(15, 36, 32, .12);
}
.flow-panel--app {
  transform: translateY(-10px);
}
.flow-panel--print {
  transform: translateY(16px);
}
.flow-panel-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--rule-2);
  background: color-mix(in oklch, var(--paper) 90%, var(--paper-2));
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.flow-panel--print .flow-panel-bar {
  justify-content: space-between;
}
.flow-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  opacity: .75;
}
.flow-panel-bar .flow-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.flow-status {
  margin-left: auto;
  white-space: nowrap;
  color: var(--ink-2);
}
.flow-panel--print .flow-status {
  margin-left: 0;
}
.flow-status--live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-ink);
}
.flow-status--live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 34%, transparent);
  animation: flow-live-pulse 1.8s ease-out infinite;
}
.flow-image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f7fafc;
}
.flow-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.flow-panel--app .flow-image-wrap img {
  object-position: 45% 46%;
}
.flow-panel--print .flow-image-wrap img {
  object-position: 50% 48%;
  transform: scale(1.03);
}
.flow-panel figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.flow-panel figcaption strong {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}
.flow-transfer {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-family: var(--mono);
  color: var(--muted);
}
.flow-transfer-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--rule) 14%, var(--accent) 50%, var(--rule) 86%, transparent 100%);
  position: relative;
}
.flow-transfer-line::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  animation: flow-transfer-dot 3.6s ease-in-out infinite;
}
.flow-file-chip {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  box-shadow: 0 14px 34px rgba(15, 36, 32, .1);
}
.flow-transfer-copy {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
}
@keyframes flow-transfer-dot {
  0%   { left: 0; opacity: 0; }
  14%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { left: calc(100% - 7px); opacity: 0; }
}
@keyframes flow-live-pulse {
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* Legacy SVG kept in markup for now, but hidden in favor of the real-image workflow. */
.flow-svg {
  width: 100%;
  height: auto;
  display: none;
}

/* SVG text */
.flow-url          { font-family: "IBM Plex Mono", monospace; font-size: 11px; fill: var(--muted); }
.flow-label        { font-family: "IBM Plex Mono", monospace; font-size: 10px; fill: var(--muted); letter-spacing: .06em; }
.flow-btn-text     { font-family: "IBM Plex Mono", monospace; font-size: 12px; fill: var(--ink); letter-spacing: .02em; }
.flow-stl-label    { font-family: "IBM Plex Mono", monospace; font-size: 10px; fill: var(--ink); letter-spacing: .08em; }
.flow-clock-text   { font-family: "IBM Plex Mono", monospace; font-size: 11px; fill: var(--muted); letter-spacing: .05em; }
.flow-applogo      { font-family: "IBM Plex Sans", sans-serif; font-size: 14px; fill: var(--ink); font-weight: 600; }
.flow-applogo-3d   { fill: #d04a3f; font-weight: 700; }
.flow-appmini      { font-family: "IBM Plex Mono", monospace; font-size: 9px; fill: var(--muted); letter-spacing: .04em; }
.flow-applabel     { font-family: "IBM Plex Mono", monospace; font-size: 9px; fill: var(--ink); letter-spacing: .12em; }
.flow-approw       { font-family: "IBM Plex Mono", monospace; font-size: 9px; fill: var(--muted); letter-spacing: .03em; }
.flow-approwv      { font-family: "IBM Plex Mono", monospace; font-size: 9px; fill: var(--ink); letter-spacing: .03em; }
.flow-printerlabel { font-family: "IBM Plex Mono", monospace; font-size: 9px; fill: var(--muted); letter-spacing: .2em; }
.flow-done         { font-family: "IBM Plex Mono", monospace; font-size: 12px; fill: var(--accent); letter-spacing: .15em; font-weight: 600; opacity: 0; }

/* Master loop: 12s */

/* Cursor: enters, moves to Download, clicks, exits */
.flow-cursor {
  transform: translate(100px, 120px);
  animation: flow-cursor 12s ease-in-out infinite;
}
@keyframes flow-cursor {
  0%   { transform: translate(100px, 120px); opacity: 0; }
  5%   { transform: translate(100px, 120px); opacity: 1; }
  15%  { transform: translate(222px, 318px); opacity: 1; }
  17%  { transform: translate(222px, 318px) scale(0.8); opacity: 1; }
  19%  { transform: translate(222px, 318px) scale(1); opacity: 1; }
  28%  { transform: translate(222px, 318px); opacity: 1; }
  34%  { transform: translate(420px, 120px); opacity: 0; }
  100% { transform: translate(100px, 120px); opacity: 0; }
}

/* Download button: inverts briefly on click */
.flow-btn {
  animation: flow-btn 12s ease-in-out infinite;
}
@keyframes flow-btn {
  0%, 16%  { fill: var(--paper); }
  17%, 22% { fill: var(--ink); }
  23%, 100%{ fill: var(--paper); }
}

/* STL icon: hidden, pops out of button, flies into printer's nozzle */
.flow-stl {
  transform: translate(230px, 310px) scale(0);
  animation: flow-stl 12s ease-in-out infinite;
}
@keyframes flow-stl {
  0%, 18%  { transform: translate(230px, 310px) scale(0); opacity: 0; }
  22%      { transform: translate(230px, 310px) scale(1); opacity: 1; }
  28%      { transform: translate(230px, 220px) scale(1); opacity: 1; }
  42%      { transform: translate(965px, 220px) scale(1); opacity: 1; }
  46%      { transform: translate(971px, 200px) scale(0.35); opacity: 0; }
  100%     { transform: translate(230px, 310px) scale(0); opacity: 0; }
}

/* Clock hand: spins fast during build phase (3 revolutions) */
.flow-clock-hand {
  transform-origin: 770px 70px;
  animation: flow-clock 12s linear infinite;
}
@keyframes flow-clock {
  0%, 46%  { transform: rotate(0deg); }
  72%      { transform: rotate(1080deg); }
  100%     { transform: rotate(1080deg); }
}

/* Nozzle: travels back and forth as it prints */
.flow-nozzle {
  animation: flow-nozzle 12s ease-in-out infinite;
}
@keyframes flow-nozzle {
  0%, 46%  { transform: translateX(0); }
  52%      { transform: translateX(-100px); }
  58%      { transform: translateX(80px); }
  63%      { transform: translateX(-60px); }
  68%      { transform: translateX(50px); }
  72%      { transform: translateX(0); }
  100%     { transform: translateX(0); }
}

/* Insole pair builds bottom-up (clip-path reveal) */
.flow-built {
  clip-path: inset(100% 0 0 0);
  animation: flow-built 12s ease-in-out infinite;
}
@keyframes flow-built {
  0%, 46%  { clip-path: inset(100% 0 0 0); opacity: 1; }
  72%      { clip-path: inset(0 0 0 0); opacity: 1; }
  94%      { clip-path: inset(0 0 0 0); opacity: 1; }
  98%      { clip-path: inset(0 0 0 0); opacity: 0; }
  100%     { clip-path: inset(100% 0 0 0); opacity: 0; }
}

/* Completion caption fades in after build finishes */
.flow-done {
  animation: flow-done 12s ease-in-out infinite;
}
@keyframes flow-done {
  0%, 72%    { opacity: 0; }
  78%        { opacity: 1; }
  94%        { opacity: 1; }
  98%, 100%  { opacity: 0; }
}

/* Step list below workflow visual */
.flow-steps {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  border-top: 1px solid var(--rule); padding-top: 20px;
}
.flow-steps li {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 12px; color: var(--muted); letter-spacing: .05em;
}
.flow-steps .n { color: var(--accent); font-weight: 600; }
.flow-steps .t { color: var(--ink); }

@media (max-width: 720px) {
  .flow { padding: 18px; }
  .flow-live {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .flow-panel--app,
  .flow-panel--print {
    transform: none;
  }
  .flow-transfer {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
  }
  .flow-transfer-line {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .flow-file-chip {
    grid-column: 2;
    grid-row: 1;
    width: 52px;
    height: 52px;
  }
  .flow-transfer-copy {
    grid-column: 1 / -1;
  }
  .flow-panel figcaption {
    display: grid;
    gap: 4px;
  }
  .flow-steps { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-cursor, .flow-stl, .flow-btn, .flow-clock-hand,
  .flow-nozzle, .flow-built, .flow-done,
  .flow-transfer-line::after, .flow-status--live::before { animation: none; }
  .flow-cursor { opacity: 0; }
  .flow-stl    { opacity: 0; }
  .flow-built  { clip-path: inset(0 0 0 0); }
  .flow-done   { opacity: 1; }
}
