:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --ink: #111214;
  --ink-2: #44464c;
  --muted: #7a7c83;
  --line: #e7e6e3;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3f0;
  --contact-bg: #111214;
  --contact-ink: #fafaf9;
  --shadow: 0 1px 2px rgba(17, 18, 20, .04), 0 8px 24px -12px rgba(17, 18, 20, .12);
  --radius: 18px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0e; --surface: #131418; --surface-2: #1a1c21; --ink: #f2f2f0; --ink-2: #b9bbc1;
    --muted: #84868d; --line: #24262c; --accent: #2dd4bf; --accent-ink: #04201c; --accent-soft: #10302c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.6);
    --contact-bg: #15191b; --contact-ink: #f2f2f0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0e; --surface: #131418; --surface-2: #1a1c21; --ink: #f2f2f0; --ink-2: #b9bbc1;
  --muted: #84868d; --line: #24262c; --accent: #2dd4bf; --accent-ink: #04201c; --accent-soft: #10302c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.6);
  --contact-bg: #15191b; --contact-ink: #f2f2f0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.fill { fill: currentColor; stroke: none; }
.mono { font-family: var(--mono); font-size: .82rem; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.wrap { width: min(1080px, 100% - 48px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-size: .75rem; font-weight: 700;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-size: .92rem; transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .i-moon { display: block; }
}

/* Hero */
.hero { padding: clamp(72px, 14vw, 160px) 0 clamp(56px, 9vw, 104px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: .85rem; color: var(--ink-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 700; letter-spacing: -0.05em; margin: 28px 0 24px; }
.lede { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink-2); max-width: 40ch; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px;
  border-radius: 999px; font-weight: 500; font-size: .95rem; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover svg { transform: translateX(2px); }
.btn-primary svg { transition: transform .15s; }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.kicker { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }

/* Feature */
.feature {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow);
}
.feature-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; }
.feature-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag { font-size: .78rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.feature-title { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; }
.feature-sub { font-size: 1.15rem; color: var(--ink-2); margin-top: -8px; }
.facts { display: grid; gap: 14px; margin: 6px 0; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.facts dt { font-family: var(--mono); font-size: .78rem; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; color: var(--ink-2); font-size: .97rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-size: .78rem; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); }
.chips em { font-style: normal; color: var(--muted); }
.chips.small { margin-top: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--accent); width: fit-content; margin-top: auto; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover svg { transform: translate(2px, -2px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Feature visual: abstract POS */
.feature-visual {
  position: relative; display: grid; place-items: center; padding: 40px 32px;
  background:
    radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    radial-gradient(circle at 20% 90%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 50%),
    var(--surface-2);
  border-left: 1px solid var(--line);
}
.feature-visual::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px;
}
.device {
  position: relative; width: 100%; max-width: 420px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); overflow: hidden;
  transform: rotate(-2deg); transition: transform .4s ease;
}
.feature:hover .device { transform: rotate(0deg) translateY(-4px); }
.device-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.device-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.pos { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; padding: 14px; }
.pos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pos-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 6px; background: var(--bg); }
.pos-item i { display: block; aspect-ratio: 4/3; border-radius: 6px; background: var(--surface-2); }
.pos-item b { display: block; height: 6px; width: 70%; border-radius: 3px; background: var(--line); }
.pos-item.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pos-item.is-on i { background: var(--accent-soft); }
.receipt {
  border-radius: 10px; background: var(--bg); border: 1px dashed var(--line); padding: 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.receipt-head { font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; color: var(--muted); text-align: center; }
.line { height: 6px; border-radius: 3px; background: var(--line); }
.line.short { width: 60%; }
.line.total { height: 9px; width: 80%; background: var(--ink-2); opacity: .5; }
.receipt-sep { border-top: 1px dashed var(--line); margin: 2px 0; }
.pay { margin-top: auto; text-align: center; font-size: .72rem; font-weight: 600; padding: 7px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }

/* Cards */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.card-icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 1.25rem; font-weight: 600; }
.card p { color: var(--ink-2); font-size: .95rem; }
.card .card-note { font-size: .85rem; color: var(--muted); }
.card .link-arrow { padding-top: 6px; font-size: .9rem; }

/* Timeline */
.timeline { display: grid; }
.role { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.role:first-child { padding-top: 0; }
.role-when { color: var(--muted); padding-top: 4px; }
.role h3 { font-size: 1.3rem; font-weight: 600; }
.role .at { color: var(--muted); font-weight: 500; }
.role-body > .muted { font-size: .9rem; margin: 4px 0 14px; }
.role-body ul:not(.chips) { display: grid; gap: 8px; }
.role-body ul:not(.chips) li { position: relative; padding-left: 20px; color: var(--ink-2); }
.role-body ul:not(.chips) li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 1.5px; background: var(--accent); }
.role:last-child .role-body h3 { margin-bottom: 14px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.panel { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.panel .list { display: grid; gap: 16px; margin-top: 16px; }
.panel .list li { color: var(--ink-2); font-size: .97rem; }
.panel strong { color: var(--ink); font-weight: 600; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; }
.about-big { font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.25; letter-spacing: -0.03em; font-weight: 600; }
.about-big mark { background: linear-gradient(transparent 62%, var(--accent-soft) 62%); color: inherit; padding: 0 2px; }
.about-small { color: var(--ink-2); font-size: 1.05rem; }

/* Contact */
.contact {
  text-align: center; padding: clamp(40px, 7vw, 80px) 24px; border-radius: calc(var(--radius) + 10px);
  background: var(--contact-bg); color: var(--contact-ink); border: 1px solid var(--line); position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  pointer-events: none;
}
.contact > * { position: relative; }
.contact .kicker { color: color-mix(in srgb, var(--accent) 70%, var(--contact-ink)); }
.contact h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; margin: 14px 0 14px; }
.contact p { color: color-mix(in srgb, var(--contact-ink) 70%, transparent); max-width: 46ch; margin-inline: auto; }
.contact .cta { justify-content: center; }
.contact .btn-primary { background: var(--contact-ink); color: var(--contact-bg); }
.contact .btn-ghost { background: transparent; color: var(--contact-ink); border-color: color-mix(in srgb, var(--contact-ink) 25%, transparent); }
.contact .btn-ghost:hover { border-color: var(--contact-ink); }
.section:has(.contact) { border-top: 0; padding-top: 24px; }

.footer { display: flex; justify-content: space-between; gap: 16px; padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .device, .card, .btn { transition: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature-visual { border-left: 0; border-top: 1px solid var(--line); }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 680px) {
  .wrap { width: min(1080px, 100% - 32px); }
  .nav-links { display: none; }
  .grid3, .split { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 6px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .eyebrow { font-size: .78rem; border-radius: 14px; align-items: flex-start; line-height: 1.45; }
  .eyebrow .dot { margin-top: 5px; }
  .footer { flex-direction: column; }
}
