/* OPR Technovation — shared stylesheet */

:root {
  /* Palette: Midnight (default) */
  --bg: #f6f4ef;
  --bg-elev: #ffffff;
  --ink: #0e1a2b;
  --ink-2: #1d2a3d;
  --muted: #5b6576;
  --line: #d9d3c7;
  --line-2: #e7e2d7;
  --accent: #0e1a2b;
  --accent-soft: #c9b07a;  /* muted gold */
  --accent-ink: #8a6e3d;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);
  --h-nav: 72px;
}

/* Palette: Oxford */
[data-palette="oxford"] {
  --bg: #f2efe8;
  --bg-elev: #ffffff;
  --ink: #15233d;
  --ink-2: #243657;
  --muted: #596377;
  --line: #d6cfc1;
  --line-2: #e8e3d6;
  --accent: #15233d;
  --accent-soft: #b48a50;
  --accent-ink: #8b6531;
}

/* Palette: Graphite */
[data-palette="graphite"] {
  --bg: #ecece9;
  --bg-elev: #ffffff;
  --ink: #161616;
  --ink-2: #2a2a2a;
  --muted: #5e5e5e;
  --line: #cfcfc9;
  --line-2: #e2e2dd;
  --accent: #161616;
  --accent-soft: #a9845a;
  --accent-ink: #7a5a34;
}

/* Palette: Forest */
[data-palette="forest"] {
  --bg: #f1efe7;
  --bg-elev: #ffffff;
  --ink: #0f2a24;
  --ink-2: #1d3a33;
  --muted: #566863;
  --line: #cfcabb;
  --line-2: #e4dfce;
  --accent: #0f2a24;
  --accent-soft: #c2a36a;
  --accent-ink: #836a3d;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0b1320;
  --bg-elev: #101a2b;
  --ink: #eee7d6;
  --ink-2: #d5cdb9;
  --muted: #8d95a3;
  --line: #1e2a3f;
  --line-2: #152036;
  --accent: #eee7d6;
  --accent-soft: #c9b07a;
  --accent-ink: #e2c591;
}
[data-theme="dark"][data-palette="forest"] {
  --bg: #0a1a16;
  --bg-elev: #0f241f;
  --ink: #e9e4d3;
  --line: #1b2e28;
  --line-2: #132420;
}
[data-theme="dark"][data-palette="graphite"] {
  --bg: #0f0f0f;
  --bg-elev: #161616;
  --ink: #ebe9e3;
  --line: #242424;
  --line-2: #1a1a1a;
}

/* Font families */
[data-font="cormorant-inter"] { --serif: "Cormorant Garamond", serif; --sans: "Inter", sans-serif; }
[data-font="playfair-inter"]  { --serif: "Playfair Display", serif; --sans: "Inter", sans-serif; }
[data-font="dmserif-dmsans"]  { --serif: "DM Serif Display", serif; --sans: "DM Sans", sans-serif; }
[data-font="spectral-ibm"]    { --serif: "Spectral", serif; --sans: "IBM Plex Sans", sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7.2vw, 104px); line-height: 0.98; letter-spacing: -0.025em; }
h2 { font-size: clamp(36px, 4.8vw, 64px); line-height: 1.02; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; }
p  { margin: 0; text-wrap: pretty; }

.serif-italic { font-style: italic; font-family: var(--serif); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--muted);
  display: inline-block;
}

a { color: inherit; text-decoration: none; }

/* Layout primitives */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }

/* Top Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  height: var(--h-nav);
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__mark {
  width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-family: var(--serif); font-size: 16px; font-weight: 500;
  letter-spacing: 0;
}
.brand__name { font-weight: 500; }
.brand__name em { font-style: italic; color: var(--accent-ink); font-weight: 400; }

.nav__links {
  display: flex; gap: 36px; align-items: center;
  font-size: 14px; color: var(--ink-2);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-2);
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent-soft);
}

.nav__cta {
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  color: var(--bg-elev); background: var(--ink);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav__cta:hover { background: transparent; color: var(--ink); }

.nav__burger { display: none; }

@media (max-width: 820px) {
  .nav__links { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg-elev);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg-elev); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Link arrow */
.link-arrow {
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}
.link-arrow:hover { color: var(--ink); border-color: var(--ink); }
.link-arrow .arrow { transition: transform .25s ease; }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  margin-top: 60px;
  background: var(--bg);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
}
.footer__about { max-width: 360px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.footer__col h4 {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  margin-bottom: 18px;
}
.footer__col a {
  display: block; color: var(--ink-2); font-size: 14px; line-height: 2.1;
  transition: color .2s;
}
.footer__col a:hover { color: var(--ink); }
.footer__meta {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  font-family: var(--mono);
}
@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* Page header (internal pages) */
.page-head {
  padding: clamp(80px, 10vw, 140px) 0 clamp(48px, 7vw, 80px);
  border-bottom: 1px solid var(--line);
}
.page-head__eyebrow { margin-bottom: 24px; }
.page-head h1 {
  font-size: clamp(56px, 8vw, 112px);
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.page-head h1 em { color: var(--accent-ink); font-weight: 400; }
.page-head__sub {
  margin-top: 28px;
  max-width: 640px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--muted);
  line-height: 1.6;
}

/* Quote / divider */
.rule { height: 1px; background: var(--line); width: 100%; }
.rule--soft { background: var(--line-2); }

/* Utility */
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.tabnum { font-variant-numeric: tabular-nums; }

/* Stripe placeholder (imagery) */
.stripe-box {
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in oklab, var(--ink) 6%, transparent) 10px 11px),
    var(--bg-elev);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* Tweaks panel */
.tw-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--ink); color: var(--bg-elev);
  border: none; cursor: pointer; display: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.tw-fab.is-visible { display: grid; place-items: center; }

.tweaks {
  position: fixed; right: 20px; bottom: 76px; z-index: 100;
  width: 300px; background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  padding: 18px;
  font-family: var(--sans); font-size: 13px;
  display: none;
}
.tweaks.is-open { display: block; }
.tweaks__title {
  font-family: var(--serif); font-size: 18px;
  margin-bottom: 4px; letter-spacing: -0.01em;
}
.tweaks__sub { font-size: 11px; color: var(--muted); margin-bottom: 16px; letter-spacing: 0.1em; text-transform: uppercase; }
.tw-row { margin-bottom: 14px; }
.tw-row__label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tw-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--sans);
  transition: all .15s;
}
.tw-chip:hover { border-color: var(--ink); }
.tw-chip.is-active { background: var(--ink); color: var(--bg-elev); border-color: var(--ink); }
.tw-swatches { display: flex; gap: 8px; }
.tw-swatch {
  width: 28px; height: 28px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent;
  position: relative;
}
.tw-swatch.is-active { border-color: var(--ink); }
.tw-swatch::after {
  content: ""; position: absolute; inset: 2px; border-radius: 999px;
}
