/* Shared styles for every page. Kept in a file (not a <style> block) so the
   Content-Security-Policy can use style-src without 'unsafe-inline'.
   Direction: dark product showcase (see DESIGN.md). */

/* Fonts are self-hosted (latin subset; SIL OFL, see fonts/). */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  --bg: #0b0c10;
  --panel: #121419;
  --panel-2: #171a21;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --text: #eceae4;
  --muted: #a19e95;
  --amber: #edb347;
  --amber-deep: #c99212;
  --green: #5fd38d;
  --radius: 18px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* Fine grain over the whole page */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, footer.site { position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.nw { white-space: nowrap; }  /* keeps "e-commerce" from splitting at its hyphen */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 300;
  background: var(--amber); color: #1b1404; font-weight: 600; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.label {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.label.amber { color: var(--amber); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: 15px; line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, filter .15s ease;
}
.btn-amber { background: var(--amber); color: #1b1404; }
.btn-amber:hover { filter: brightness(1.06); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.03); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,12,16,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { position: relative; display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.brand em { font-style: normal; color: var(--amber); }
.nav-links { display: flex; gap: 2px; list-style: none; margin-left: auto; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--muted); transition: color .15s ease; }
.nav-links a:hover, .nav-links a.active, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; }
@media (max-width: 780px) {
  .nav-inner { gap: 10px; }
  .nav .nav-cta { margin-left: auto; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer;
    background: transparent; color: var(--text);
  }
  .nav-toggle svg { width: 22px; height: 22px; }
  .nav-toggle path { transition: transform .2s ease; transform-origin: 12px 12px; }
  .nav[data-open] .nav-toggle .bar-top { transform: translateY(5px) rotate(45deg); }
  .nav[data-open] .nav-toggle .bar-bottom { transform: translateY(-5px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 8px); left: 40px; right: 40px;
    flex-direction: column; padding: 8px;
    background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  }
  .nav[data-open] .nav-links { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 1rem; color: var(--text); }
  .nav-links a:hover { background: rgba(255,255,255,0.05); }
}
@media (max-width: 640px) { .nav-links { left: 20px; right: 20px; } }

/* ============ HERO ============ */
.hero { position: relative; padding: 96px 0 110px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; width: 900px; height: 900px; left: -300px; top: -520px; pointer-events: none;
  background: radial-gradient(circle, rgba(237,179,71,0.15), transparent 62%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.hero h1 { font-weight: 700; font-size: clamp(2.75rem, 6vw, 4.75rem); line-height: 1; letter-spacing: -0.04em; margin-top: 22px; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero h1.serif-title { font-family: var(--serif); font-weight: 400; font-size: clamp(3.75rem, 9vw, 7rem); letter-spacing: -0.01em; line-height: .95; }
.hero h1.serif-title em { font-style: italic; }
.lede { margin-top: 26px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 32em; }
.hero .actions { margin-top: 36px; }
.pillars { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 28px; flex-wrap: wrap; }
.pillars div { font-size: 14px; color: var(--muted); }
.pillars b { display: block; color: var(--text); font-weight: 600; font-size: 15px; }

/* App-window illustrations */
.stack { position: relative; height: 520px; }
.win {
  position: absolute; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.4);
}
.win-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.win-bar span { width: 9px; height: 9px; border-radius: 50%; background: #2a2d35; }
.win-bar em { margin-left: 10px; font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.win-1 { left: 0; top: 0; width: 560px; max-width: 100%; }
.win-2 { right: -24px; bottom: 0; width: 300px; }
.win-body { padding: 20px 22px; }
.win-body .win-title { font-family: var(--display); font-size: 17px; font-weight: 600; }
.win-body .sub { font-size: 12.5px; color: var(--muted); }
.win-chart { display: block; width: 100%; height: 190px; margin-top: 16px; }
.legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--amber); }
.legend i.alt { background: #7d8597; }
.rows { list-style: none; margin-top: 8px; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.rows li:first-child { border-top: 0; }
.tag { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 6px; background: rgba(95,211,141,0.12); color: var(--green); }
.tag.wait { background: rgba(237,179,71,0.12); color: var(--amber); }

@media (max-width: 980px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .stack { height: auto; display: grid; gap: 16px; }
  .win { position: static; width: auto; }
  .win-2 { width: auto; max-width: 360px; margin-left: auto; }
}

/* ============ SECTIONS ============ */
.section { padding: 110px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 44px; }
.sec-head h2 { font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; margin-top: 14px; max-width: 17ch; }
.sec-head p { max-width: 28em; color: var(--muted); }
@media (max-width: 880px) {
  .section { padding: 80px 0; }
  .sec-head { flex-direction: column; align-items: start; gap: 16px; margin-bottom: 32px; }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-bento { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
@media (max-width: 880px) { .grid-3, .grid-bento { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.card h3 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.card p { color: var(--muted); margin-top: 8px; max-width: 34em; }
.card .more { margin-top: 20px; font-weight: 600; font-size: 15px; color: var(--amber); }
.card .more:hover { text-decoration: underline; text-underline-offset: 4px; }
.card .viz { margin-top: auto; padding-top: 28px; }
.card h3.serif-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.25rem, 4vw, 3rem); letter-spacing: -0.01em; line-height: 1.05; }
@media (max-width: 640px) { .card { padding: 24px 22px; } .card h3 { font-size: 1.4rem; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; list-style: none; }
.chips li { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }

.status {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted);
}
.status.live { color: var(--green); border-color: rgba(95,211,141,0.35); }
.status.live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; vertical-align: 1px;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}

.bars { display: block; width: 100%; height: 170px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tiles span { display: block; height: 76px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); padding: 14px 12px; }
.tiles span::before, .tiles span::after { content: ""; display: block; height: 8px; border-radius: 4px; background: #2a2d35; width: 70%; }
.tiles span::after { margin-top: 10px; width: 45%; background: #22252c; }
.tiles span.on { border-color: rgba(237,179,71,0.5); box-shadow: inset 0 0 0 1px rgba(237,179,71,0.2); }
.tiles span.on::before { background: rgba(237,179,71,0.6); }

/* ============ KTECH SUPPLY PANEL (editorial) ============ */
.serif-title { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.01em; }
.serif-title em { font-style: italic; color: var(--amber); }
.supply-panel {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: end; margin-top: 18px;
  padding: 44px 48px; border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(237,179,71,0.11), rgba(237,179,71,0.02) 60%), var(--panel);
  border: 1px solid rgba(237,179,71,0.25);
}
.supply-panel .serif-title { margin-top: 14px; }
.supply-panel p { margin-top: 14px; color: var(--muted); max-width: 32em; }
.link-list { list-style: none; }
.link-list a, .link-list .row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line-2); font-size: 15.5px; transition: color .15s ease;
}
.link-list li:last-child a, .link-list li:last-child .row { border-bottom: 1px solid var(--line-2); }
.link-list a::after { content: "→"; color: var(--amber); }
.link-list a:hover { color: var(--amber); }
.link-list .row b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 880px) { .supply-panel { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; } }

/* Catalog card (Supply hero) */
.catalog { padding: 30px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 40px 80px rgba(0,0,0,0.5); }
.catalog .serif-row { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.catalog .link-list { margin-top: 18px; }
.catalog .link-list a { padding: 18px 0; }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: start; }
.about-grid .copy p { color: var(--muted); font-size: 1.04rem; }
.about-grid .copy p + p { margin-top: 16px; }
.facts { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { display: flex; justify-content: space-between; gap: 20px; padding: 17px 24px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts div:last-child { border-bottom: none; }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { font-weight: 600; text-align: right; }
.facts dd.amber { color: var(--amber); }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 560px) {
  .facts div { flex-direction: column; gap: 4px; padding: 14px 20px; }
  .facts dd { text-align: left; }
}

/* ============ CHECKLIST (Supply partners) ============ */
.checklist { list-style: none; display: grid; gap: 12px; margin-top: 16px; }
.checklist li { position: relative; padding-left: 30px; color: var(--muted); }
.checklist li::before {
  content: ""; position: absolute; left: 3px; top: .5em; width: 13px; height: 7px;
  border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(-45deg);
}
.partner-copy .actions { margin-top: 28px; }

/* ============ CONTACT ============ */
.contact-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
  padding: 56px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line-2);
}
.contact-card::before {
  content: ""; position: absolute; width: 640px; height: 640px; right: -260px; bottom: -380px; pointer-events: none;
  background: radial-gradient(circle, rgba(237,179,71,0.14), transparent 62%);
}
.contact-card > * { position: relative; }
.contact-card h2 { font-weight: 700; font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.08; margin-top: 14px; }
.contact-card p { margin-top: 14px; color: var(--muted); max-width: 30em; }
.contact-card .actions { flex-direction: column; align-items: stretch; }
.contact-meta { margin-top: 20px; font-style: normal; color: var(--muted); font-size: .97rem; display: grid; gap: 6px; }
.contact-meta a { color: var(--amber); }
@media (max-width: 880px) { .contact-card { grid-template-columns: 1fr; gap: 28px; padding: 36px 24px; } }

/* ============ FOOTER ============ */
footer.site { padding: 48px 0 56px; color: var(--muted); font-size: .9rem; }
footer.site .foot-row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
footer.site .brand { font-size: 18px; color: var(--text); }
footer.site p, footer.site address { margin-top: 8px; font-style: normal; }
footer.site address a { white-space: nowrap; color: var(--text); }
footer.site .foot-links { list-style: none; display: grid; gap: 6px; }
footer.site .foot-links a:hover { color: var(--text); }
@media (max-width: 560px) {
  footer.site .foot-row { flex-direction: column; gap: 22px; }
  footer.site .sep { display: none; }
  footer.site .foot-id p span, footer.site .foot-id address span { display: block; }
  footer.site .foot-id .sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-toggle path { transition: none; }
}
