/* DataMisu — website styles
   Built on the DataMisu design system: light theme = koffie 5, dark theme = koffie 7.
   Sober, deliberate, Japanese-inspired: space, hairlines, one copper accent per screen. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --surface: #f3eadc;
  --surface-raised: #fbf7f0;
  --surface-inverse: #2f2118;
  --on-inverse: #f7f0e4;
  --ink: #2f2118;
  --ink-muted: #605349;
  --line: #dccdb9;
  --line-strong: #8f7762;
  --accent: #8a5224;
  --focus-ring: #b87333;
  --danger: #a1392a;

  --espresso: #2f2118;
  --mokka: #6b4f3b;
  --cappuccino: #b99d84;
  --vanilla: #f7f0e4;
  --cream: #f3eadc;
  --koper: #b87333;

  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --font-sans: "Zen Kaku Gothic New", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  --font-brand: Montserrat, "Helvetica Neue", Arial, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px; --space-40: 160px;
  --radius-sm: 2px;
  --hairline: 1px;
  --content-max: 1120px;
  --measure: 38em;
  --gutter: var(--space-16);
  --section: var(--space-24);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface: #6b4f3b;
    --surface-raised: #5e4533;
    --surface-inverse: #f7f0e4;
    --on-inverse: #2f2118;
    --ink: #f7f0e4;
    --ink-muted: #dbd0c2;
    --line: #85664f;
    --line-strong: #cdb9a4;
    --accent: #f5c8a0;
    --focus-ring: #f5c8a0;
    --danger: #ffc2b5;
  }
}

@media (max-width: 900px) {
  :root { --gutter: var(--space-6); --section: var(--space-16); }
}
@media (max-width: 480px) {
  :root { --gutter: var(--space-4); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 30px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; color: var(--ink); text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }

.skip {
  position: absolute; left: var(--space-4); top: -100px;
  background: var(--surface-inverse); color: var(--on-inverse);
  padding: var(--space-2) var(--space-4); z-index: 10; text-decoration: none;
}
.skip:focus { top: var(--space-4); }

.wrap { width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Type roles ---------- */
.eyebrow {
  font-family: var(--font-brand); font-size: 12px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-muted);
}
.display { font-size: clamp(38px, 6vw, 56px); line-height: 1.2; letter-spacing: -0.01em; }
.h1 { font-size: clamp(32px, 4.6vw, 40px); line-height: 1.3; }
.h2 { font-size: clamp(24px, 3.2vw, 28px); line-height: 1.42; }
.h3 { font-size: 20px; line-height: 32px; font-weight: 600; }
.lead { font-size: 19px; line-height: 34px; color: var(--ink-muted); max-width: var(--measure); }
.body { max-width: var(--measure); }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 48px; padding: 0 28px; border-radius: var(--radius-sm);
  border: var(--hairline) solid transparent;
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--surface-inverse); color: var(--on-inverse); }
.btn-primary:hover { background: var(--ink-muted); color: var(--on-inverse); }
.btn-secondary { color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-text {
  height: auto; padding: 0 0 4px; border-radius: 0; color: var(--accent);
  border-bottom-color: var(--accent);
}
.btn-text:hover { color: var(--ink); border-bottom-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }

/* ---------- Header: large logo on top, menu bar below ---------- */
:root { --p: 0; }
.masthead { padding-block: var(--space-16) var(--space-12); background: var(--surface); }
.masthead .wrap { display: flex; justify-content: center; }
.lockup.lockup-top {
  gap: var(--space-4);
  width: min(100%, 440px); text-decoration: none; color: var(--ink);
  opacity: calc(1 - var(--p));
  transform: translateY(calc(var(--p) * -32px)) scale(calc(1 - var(--p) * 0.06));
  transform-origin: 50% 100%;
  will-change: opacity, transform;
}
.lockup.lockup-top .wordmark { font-size: clamp(44px, 8vw, 76px); }
.lockup.lockup-top .tagline { font-size: clamp(10px, 1.3vw, 12px); }
@media (max-width: 480px) { .masthead { padding-block: var(--space-12) var(--space-8); } .lockup.lockup-top { width: min(100%, 300px); } }

.navbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-top: var(--hairline) solid var(--line);
  border-bottom: var(--hairline) solid var(--line);
}
.navbar .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: var(--space-8); min-height: 72px;
}
.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.is-stuck .brand { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .35s ease, visibility 0s; }
.brand img { width: auto; height: 22px; }
.brand .wordmark { font-size: 20px; }
.wordmark { font-family: var(--font-brand); font-size: 22px; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; color: var(--ink); }
.wordmark b { font-weight: 800; }
.wordmark span { font-weight: 400; }
.nav ul { display: flex; gap: var(--space-12); }
.nav a {
  font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: 0.08em;
  color: var(--ink); text-decoration: none; padding-bottom: 6px;
  border-bottom: var(--hairline) solid transparent;
}
.nav a:hover { border-bottom-color: var(--line-strong); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.header-cta { justify-self: end; height: 44px; }
.menu { display: none; }
section[id], [id="main"] { scroll-margin-top: 96px; }

@media (max-width: 1000px) {
  .navbar .wrap { min-height: 64px; gap: var(--space-4); }
  .nav, .header-cta { display: none; }
  .menu { display: block; grid-column: 3; justify-self: end; position: relative; }
  .menu summary {
    list-style: none; cursor: pointer; height: 44px; padding: 0 var(--space-4);
    display: inline-flex; align-items: center; border: var(--hairline) solid var(--line-strong);
    border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; letter-spacing: 0.04em;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] summary { border-color: var(--ink); }
  .menu-panel {
    position: absolute; right: 0; top: calc(100% + var(--space-2)); z-index: 5;
    min-width: 240px; background: var(--surface-raised); border: var(--hairline) solid var(--line);
    padding: var(--space-4) var(--space-6);
  }
  .menu-panel a { display: block; padding: var(--space-2) 0; color: var(--ink); text-decoration: none; font-weight: 500; }
  .menu-panel a[aria-current="page"] { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .lockup-top { transform: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section + .section { border-top: var(--hairline) solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-12); max-width: 44em; }

/* Hero */
.hero { padding-block: var(--space-24); }
.hero .wrap { display: block; }
.hero-main { display: flex; flex-direction: column; gap: var(--space-8); max-width: 700px; }
.hero-aside {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-6);
  border-left: var(--hairline) solid var(--line); padding-top: var(--space-2);
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--koper); flex: none; }
.vertical {
  writing-mode: vertical-rl; font-family: var(--font-brand); font-size: 12px; font-weight: 500;
  letter-spacing: 0.42em; text-transform: uppercase; color: var(--ink-muted);
}
@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-aside { display: none; }
}

/* Lockup (home) */
.lockup { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); width: min(100%, 560px); }
.lockup picture { display: flex; justify-content: center; width: 100%; }
.lockup img { width: 72%; height: auto; margin-inline: auto; }
.lockup .wordmark { font-size: clamp(48px, 10vw, 96px); line-height: .9; }
.tagline {
  display: flex; align-items: center; gap: var(--space-6); width: 100%;
  font-family: var(--font-brand); font-size: clamp(10px, 1.6vw, 14px); font-weight: 500;
  letter-spacing: 0.42em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap;
}
.tagline::before, .tagline::after { content: ""; flex: 1; height: var(--hairline); background: var(--line-strong); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12) var(--space-16); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-12) var(--space-8); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Split: text + figure */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-16); align-items: start; }
.split > .text { display: flex; flex-direction: column; gap: var(--space-6); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: var(--space-12); } }

/* Cards */
.card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding-top: var(--space-6); border-top: var(--hairline) solid var(--line-strong);
  color: var(--ink); text-decoration: none;
}
.card .h3 { font-family: var(--font-display); }
.card p { color: var(--ink-muted); }
.card-link { margin-top: var(--space-2); font-size: 15px; font-weight: 500; letter-spacing: 0.04em; color: var(--accent); }
a.card:hover .h3 { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* Product cards (home) */
.products { align-items: stretch; }
.products .product { height: 100%; }
.product {
  display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-8) var(--space-6);
  background: var(--surface-raised); color: var(--ink); text-decoration: none;
  border-top: var(--hairline) solid var(--line);
}
.product-name { font-family: var(--font-brand); font-size: 28px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.product-name-service { font-size: 24px; line-height: 1.1; font-weight: 800; }
.product p { color: var(--ink-muted); }
.product ul { display: flex; flex-direction: column; gap: var(--space-2); }
.product li { display: flex; gap: var(--space-3); font-size: 15px; line-height: 26px; }
.product li::before { content: ""; width: 16px; height: var(--hairline); background: var(--line-strong); margin-top: 13px; flex: none; }
.product:hover .card-link { color: var(--ink); }

/* Numbered steps (a real sequence) */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-8); }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); border-top: var(--hairline) solid var(--line-strong); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-brand); font-size: 12px; font-weight: 500; letter-spacing: 0.32em; color: var(--ink-muted); }
.steps b { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 28px; }
.steps span { font-size: 15px; line-height: 26px; color: var(--ink-muted); }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .steps, .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps, .steps-4 { grid-template-columns: 1fr; } }

/* Definition list (facts) */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-3) var(--space-8); margin: 0; }
.facts dt { font-family: var(--font-brand); font-size: 12px; line-height: 30px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-muted); }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 0 0; } .facts dd { margin-bottom: var(--space-3); } }

/* Product glimpse panels (illustrative) */
.panel { background: var(--surface-raised); border: var(--hairline) solid var(--line); }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-6); padding: var(--space-4) var(--space-6); border-bottom: var(--hairline) solid var(--line); }
.panel-title { font-weight: 700; }
.panel-meta { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.panel-scroll { overflow-x: auto; }
.panel table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; font-variant-numeric: tabular-nums; }
.panel th { text-align: left; font-weight: 500; color: var(--ink-muted); padding: var(--space-3) var(--space-6); border-bottom: var(--hairline) solid var(--line); white-space: nowrap; }
.panel td { padding: var(--space-3) var(--space-6); border-bottom: var(--hairline) solid var(--line); white-space: nowrap; }
.panel tr:last-child td { border-bottom: 0; }
.key { color: var(--accent); font-weight: 700; }
.tag { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 var(--space-2); border: var(--hairline) solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); white-space: nowrap; }
.tag-current { background: var(--surface-inverse); color: var(--on-inverse); border-color: var(--surface-inverse); }
.panel-foot { padding: var(--space-3) var(--space-6); border-top: var(--hairline) solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.caption { margin-top: var(--space-3); font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* Workflow panel (Solvarius) */
.flow { display: flex; flex-direction: column; }
.flow li { display: grid; grid-template-columns: 28px 1fr auto; gap: var(--space-4); align-items: start; padding: var(--space-4) var(--space-6); border-bottom: var(--hairline) solid var(--line); }
.flow li:last-child { border-bottom: 0; }
.flow .mark { width: 12px; height: 12px; margin-top: 9px; border: var(--hairline) solid var(--line-strong); border-radius: 50%; }
.flow .done .mark { background: var(--ink); border-color: var(--ink); }
.flow .active .mark { background: var(--koper); border-color: var(--koper); }
.flow b { display: block; font-weight: 700; }
.flow small { display: block; font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* Code */
.code {
  background: var(--surface-inverse); color: var(--on-inverse);
  padding: var(--space-6); overflow-x: auto; font-size: 14px; line-height: 24px; margin: 0;
}
.code code { font-size: 14px; }

/* Quote / statement */
.statement { display: block; }
.statement .h1 { max-width: 18em; }
.statement-aside { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); border-right: var(--hairline) solid var(--line); }
@media (max-width: 720px) { .statement { grid-template-columns: 1fr; } .statement-aside { display: none; } }

/* CTA band */
.cta .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-8); }
.cta .text { display: flex; flex-direction: column; gap: var(--space-4); max-width: 36em; }

/* Contact block */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); }
@media (max-width: 720px) { .contact { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-inverse); color: var(--on-inverse); padding-block: var(--space-16) var(--space-8); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-12) var(--space-16); }
.site-footer .wordmark { color: var(--on-inverse); font-size: 24px; }
.site-footer .eyebrow { color: var(--on-inverse); }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
.footer-head { margin-bottom: var(--space-3); font-size: 14px; font-weight: 700; }
.footer-cols ul { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer a { color: var(--on-inverse); font-size: 14px; line-height: 24px; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline-color: var(--on-inverse); }
.footer-note { grid-column: 1 / -1; padding-top: var(--space-6); border-top: var(--hairline) solid var(--on-inverse); font-size: 13px; line-height: 20px; }
@media (max-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}


/* Aligned rows across cards in a row (modern browsers): titles, text and links line up */
@supports (grid-template-rows: subgrid) {
  .products { grid-template-rows: auto auto auto auto 1fr auto; }
  .products .product { display: grid; grid-row: span 6; grid-template-rows: subgrid; }
  .grid-3, .grid-2 { grid-template-rows: auto 1fr; }
  .grid-3 > .card, .grid-2 > .card { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
  .steps, .steps-4 { grid-auto-rows: auto; }
  .steps li { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
  .steps { grid-template-rows: auto auto 1fr; }
}

/* Helpers */
.stack { display: flex; flex-direction: column; gap: var(--space-8); }
.figure { margin: 0; min-width: 0; }

.eyebrow-dot { display: inline-flex; align-items: center; gap: var(--space-3); }
.eyebrow-dot .dot { width: 8px; height: 8px; }

/* One-page site: the menu links to the sections on the page */
.site-footer-compact .wrap { grid-template-columns: 1fr; }
.steps { padding-left: 0; margin: 0; list-style: none; }

/* Headings and intro text start where the first menu item starts (--indent is measured in js/site.js).
   Grids, cards and steps keep the full content width. */
.hero-main, .section-head, .cta .text { margin-left: var(--indent, 0px); }
