/* ============================================================
   operanda — marketing landing page
   Design system: industrial control-panel, not startup-cloud.
   Accent: brand orange (logo). Ground: cool steel neutrals.
   Type: Big Shoulders Display (signage) / IBM Plex Sans (body)
         / IBM Plex Mono (time, codes, figures).
   ============================================================ */

/* ---------- Fonts (self-hosted, no external requests) ---------- */

@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/bsd800.woff2") format("woff2");
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/bsd900.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plex600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plex700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/mono400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/mono500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/mono600.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  --display: "Big Shoulders Display", ui-sans-serif, system-ui, sans-serif;
  --body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* light theme (default) */
  --ink: #1B1815;
  --ink-soft: #57524B;
  --ink-faint: #85807A;
  --paper: #EEF0EE;
  --surface: #F8F9F7;
  --surface-raised: #FFFFFF;
  --border: #D5D8D3;
  --border-strong: #B7BBB4;
  --accent: #F97316;
  --accent-ink: #1B1815;
  --accent-strong: #C2570A;
  --accent-wash: #FCE7D3;
  --focus: #2B4C5C;

  --radius: 3px;
  --content-width: 1180px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F3F1EA;
    --ink-soft: #C7C2B8;
    --ink-faint: #8C877E;
    --paper: #17181A;
    --surface: #1D1E1F;
    --surface-raised: #232425;
    --border: #34332F;
    --border-strong: #4A4844;
    --accent: #FB8A3C;
    --accent-ink: #17181A;
    --accent-strong: #FFA35E;
    --accent-wash: #3A2A17;
    --focus: #7FB0C2;

    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- Language toggle (CSS-only, checkbox hack) ---------- */

#lang-toggle {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
}

.site.lang-en { display: none; }
#lang-toggle:checked ~ .site:not(.lang-en) { display: none; }
#lang-toggle:checked ~ .site.lang-en { display: block; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
}
.lang-switch .tick {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.lang-switch .off { color: var(--ink-faint); }

/* ---------- Layout helpers ---------- */

.wrap {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

section { padding: 88px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }

h2.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 22ch;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 48px;
}
.section-head p {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.nav .logo { height: 38px; width: auto; }
.nav .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .nav .logo-light { display: none; }
  .nav .logo-dark { display: block; }
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-color: var(--border-strong); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-cta { display: none; }
@media (min-width: 860px) { .nav-cta { display: inline-flex; } }

@media (max-width: 859px) {
  .nav-links { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-arrow::after { content: "\2192"; }

/* ---------- Hero ---------- */

.hero { padding-top: 72px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
}
@media (min-width: 980px) {
  .hero .wrap { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; }
}

.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 5.4vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 4px;
}
.hero-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4CA35A;
  box-shadow: 0 0 0 3px color-mix(in srgb, #4CA35A 25%, transparent);
}

/* ---------- Hero board mock ---------- */

.board-frame {
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-raised);
  overflow: hidden;
}
.board-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.board-bar .dots { display: flex; gap: 5px; }
.board-bar .dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }

.board-scroll { overflow-x: auto; }
.board {
  position: relative;
  display: grid;
  grid-template-columns: 58px repeat(4, minmax(96px, 1fr));
  grid-auto-rows: 34px;
  min-width: 460px;
  font-family: var(--mono);
  font-size: 11.5px;
}
.board .hcell {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
}
.board .hcell:first-child { border-left: 0; }
.board .tcell {
  padding: 7px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-faint);
  text-align: right;
}
.board .cell {
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  min-height: 30px;
  position: relative;
}
.board .shift {
  position: absolute;
  inset: 2px 3px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #1B1815;
  overflow: hidden;
}
.board .shift.urgent { box-shadow: inset 0 0 0 2px #D1453B; }
.board .shift .flag {
  position: absolute; top: 1px; right: 3px;
  font-size: 9px; font-weight: 700; color: #D1453B;
}
.board .shift.stage { opacity: 0.72; font-style: italic; }
.board .shift.backup { opacity: 0.5; font-style: italic; }

.board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.board-legend span { display: inline-flex; align-items: center; gap: 6px; }
.board-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------- Feature panels ---------- */

.panels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.panel {
  background: var(--surface);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  grid-column: span 6;
}
@media (min-width: 720px) {
  .panel.large { grid-column: span 3; }
  .panel.small { grid-column: span 2; }
}
@media (max-width: 719px) {
  .panel.small { grid-column: span 6; }
}

.panel-plate {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 4px 9px;
}
.panel h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}
.panel ul { display: flex; flex-direction: column; gap: 10px; }
.panel li {
  padding-left: 16px;
  position: relative;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.panel li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 2px;
  background: var(--accent);
}

/* ---------- For whom ---------- */

.fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.fit-item {
  background: var(--surface);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fit-item .num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.fit-item p { color: var(--ink-soft); font-size: 0.95rem; }
.fit-item strong { font-size: 1.02rem; }

/* ---------- CTA ---------- */

.cta-section {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 0;
}
.cta-section .eyebrow { color: var(--accent); }
.cta-section .section-title { color: var(--paper); max-width: 26ch; }
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}
@media (min-width: 860px) {
  .cta-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
.cta-section p.lede {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  font-size: 1.08rem;
  max-width: 50ch;
}
.cta-section .btn-primary {
  background: var(--accent);
  color: #1B1815;
}
.cta-panel {
  border: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: color-mix(in srgb, var(--paper) 5%, transparent);
}
.cta-panel dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  font-size: 0.92rem;
}
.cta-panel dt { color: color-mix(in srgb, var(--paper) 55%, transparent); }
.cta-panel dd { margin: 0; font-family: var(--mono); }

/* ---------- Footer ---------- */

footer {
  padding: 40px 0;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 20px; width: 20px; }
.footer-brand span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
