/* =========================================================================
   LiQuiBit shared site styles
   Engineering-document aesthetic: warm off-white, IBM Plex, blue accent.
   ========================================================================= */

/* ── Self-hosted IBM Plex (SIL OFL) ──────────────────────────────────────
   Fonts are loaded from /assets/fonts/ so no third-party font requests
   leak to Google. If the WOFF2 files are missing, the body font-stack
   falls back to system-ui and the site stays readable.
   ───────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/IBMPlexSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/IBMPlexSans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
}

:root {
  --bg:        oklch(0.985 0.004 85);
  --surface:   #ffffff;
  --warm:      oklch(0.955 0.010 80);
  --ink:       oklch(0.20 0.012 75);
  --ink-2:     oklch(0.36 0.010 75);
  --muted:     oklch(0.52 0.010 75);
  --faint:     oklch(0.72 0.006 75);
  --border:    oklch(0.89 0.007 75);
  --border-2:  oklch(0.82 0.008 75);
  --accent:    oklch(0.58 0.16 252);
  --accent-ink:oklch(0.42 0.18 252);
  --accent-soft: oklch(0.93 0.04 252);
  --ink-dark:  oklch(0.16 0.01 75);

  --sans: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.mono { font-family: var(--mono); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  padding: 11px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--ink-dark); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-2);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-ink); }

/* ── Top ticker ────────────────────────────────────────────────── */
.ticker {
  background: var(--ink-dark);
  color: #d9d9d4;
  font-family: var(--mono);
  font-size: 12px;
}
.ticker .shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 16px;
}
.ticker .left { color: #fff; }
.ticker .right { color: #8a8a82; }
@media (max-width: 640px) { .ticker .right { display: none; } }

/* ── Nav ───────────────────────────────────────────────────────── */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 251, 248, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-size: 14.5px;
  padding: 9px 14px;
  border-radius: 5px;
  color: var(--ink-2);
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--warm); }
.nav-links a.is-current { color: var(--ink); background: var(--warm); }
.nav-links .contact-btn {
  margin-left: 8px;
  background: var(--ink-dark);
  color: #fff;
  padding: 9px 16px;
}
.nav-links .contact-btn:hover { background: var(--accent-ink); color: #fff; }

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-burger { display: none; }
@media (max-width: 760px) {
  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--warm);
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
  }
  /* Collapse the links into a dropdown panel under the bar */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: rgb(252, 251, 248);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-links .contact-btn { margin-left: 0; margin-top: 6px; text-align: center; }
  /* Checkbox toggle state */
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── Eyebrows + section headers ───────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}

.section { padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 120px); }
.section--tight { padding-top: clamp(60px, 7vw, 96px); padding-bottom: clamp(60px, 7vw, 96px); }

.sec-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
@media (max-width: 760px) {
  .sec-head { grid-template-columns: 1fr; gap: 12px; }
}
.sec-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sec-label .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}
.sec-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.sec-sub {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 14px 0 0;
}

/* ── CTA block ─────────────────────────────────────────────────── */
.cta {
  background: var(--ink-dark);
  color: #f0eee9;
  border-radius: 14px;
  padding: clamp(36px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, oklch(0.25 0.012 75) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.25 0.012 75) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 100% 0%, #000 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 860px) { .cta-inner { grid-template-columns: 1fr; align-items: start; } }
.cta .eyebrow { color: #8a8a82; }
.cta .eyebrow .dot { background: var(--accent-soft); }
.cta h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.022em;
  line-height: 1.05;
  margin: 14px 0 16px;
  color: #fff;
  max-width: 18ch;
  text-wrap: balance;
}
.cta p { margin: 0 0 24px; color: #b8b6ae; font-size: 17px; max-width: 46ch; }
.cta-actions { display: flex; flex-direction: column; gap: 14px; }
.cta-actions a.btn-primary { background: var(--accent); border-color: var(--accent); }
.cta-actions a.btn-primary:hover { background: #fff; color: var(--ink); border-color: #fff; }
.cta-actions .info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  padding-top: 18px;
  border-top: 1px solid #2a2a2a;
  font-family: var(--mono);
  font-size: 13px;
  color: #8a8a82;
}
.cta-actions .info b { color: #f0eee9; font-weight: 500; }

/* ── Footer ────────────────────────────────────────────────────── */
footer { padding-top: 48px; padding-bottom: 36px; }
.foot-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr 1fr; gap: 24px; } }
.foot-brand img { height: 26px; width: auto; margin-bottom: 16px; }
.foot-brand p { margin: 0; color: var(--muted); font-size: 14px; max-width: 30ch; line-height: 1.55; }
.foot-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-col a { font-size: 14.5px; color: var(--ink-2); transition: color .15s ease; }
.foot-col a:hover { color: var(--ink); }
.foot-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}
.foot-bot .legal { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-bot .legal a:hover { color: var(--ink); }
