/* Self-hosted fonts. Subset: Latin only. font-display: swap to avoid FOIT. */
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-800.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-tight-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-tight-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-tight-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 800; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-tight-800.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/jetbrains-mono-600.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/jetbrains-mono-700.woff2') format('woff2'); }

/* Onestop CPE — 2026 Redesign
 * Token system + base components.
 * Tailwind handles utilities; this file owns brand tokens, typography,
 * and design-system primitives that Tailwind doesn't express well.
 */

:root {
  /* Brand */
  --brand-purple: #753d96;
  --brand-cyan: #5abcc9;
  --brand-gradient: linear-gradient(135deg, #753d96 0%, #5abcc9 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(117,61,150,0.08) 0%, rgba(90,188,201,0.08) 100%);
  --brand-gradient-deep: linear-gradient(135deg, #2d1640 0%, #0d2a3d 100%);

  /* Ink scale (text + neutrals) */
  --ink-900: #0E0B14;
  --ink-800: #1B1426;
  --ink-700: #2D2535;
  --ink-600: #3D3548;
  --ink-500: #5C5868;
  --ink-400: #8B8794;
  --ink-300: #B5B1BC;
  --ink-200: #E5E2EA;
  --ink-100: #EFEDF2;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-warm: #F7F5FA;
  --surface-panel: #F0EDF5;

  /* Accent */
  --accent-orange: #F97316;
  --accent-orange-deep: #EA580C;
  --accent-green: #10B981;
  --accent-red: #E11D48;
  --accent-amber: #F59E0B;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(14,11,20,0.04), 0 1px 3px rgba(14,11,20,0.06);
  --shadow-md: 0 4px 12px rgba(14,11,20,0.06), 0 2px 4px rgba(14,11,20,0.04);
  --shadow-lg: 0 18px 40px -12px rgba(14,11,20,0.18), 0 6px 16px rgba(14,11,20,0.06);
  --shadow-xl: 0 30px 70px -20px rgba(14,11,20,0.25), 0 10px 24px rgba(14,11,20,0.10);
  --shadow-brand: 0 24px 60px -16px rgba(117,61,150,0.35);

  /* Container */
  --max-w: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "ss01", "cv11";
  color: var(--ink-900);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

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

/* Typography ------------------------------------------------------------ */
.font-display { font-family: 'Inter Tight', 'Inter', sans-serif; letter-spacing: -0.025em; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.brand-gradient { background: var(--brand-gradient); }
.brand-gradient-deep { background: var(--brand-gradient-deep); }
.text-gradient {
  background-image: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--accent-orange);
  color: white;
  box-shadow: 0 6px 16px -4px rgba(249,115,22,0.45);
}
.btn-primary:hover { background: var(--accent-orange-deep); transform: translateY(-1px); }

.btn-dark { background: var(--ink-900); color: white; }
.btn-dark:hover { background: var(--ink-800); }

.btn-light { background: white; color: var(--ink-900); border: 1px solid var(--ink-200); }
.btn-light:hover { background: var(--ink-100); }

.btn-ghost { background: transparent; color: var(--ink-900); border: 1px solid var(--ink-200); }
.btn-ghost:hover { background: var(--ink-100); }

.btn-ghost-light {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.18); }

.btn-lg { padding: 18px 28px; font-size: 16px; border-radius: 12px; }

/* Tags / pills ---------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-panel);
  color: var(--ink-600);
}
.tag-on-light { background: white; border: 1px solid var(--ink-200); }
.tag-on-dark { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.15); }
.tag-amber { background: rgba(245,158,11,0.12); color: #92400E; }
.tag-green { background: rgba(16,185,129,0.12); color: #047857; }
.tag-red { background: rgba(225,29,72,0.10); color: #9F1239; }
.tag-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--brand-purple); }

/* Card ------------------------------------------------------------------ */
.card { background: white; border: 1px solid var(--ink-200); border-radius: var(--radius-lg); padding: 28px; }
.card-soft { background: var(--surface-warm); border-radius: var(--radius-lg); padding: 28px; }

/* Section helpers ------------------------------------------------------- */
.section { padding: 96px 24px; }
.section-tight { padding: 60px 24px; }
@media (min-width: 768px) {
  .section { padding: 120px 56px; }
  .section-tight { padding: 72px 56px; }
}
.container { max-width: var(--max-w); margin: 0 auto; }

/* Site nav -------------------------------------------------------------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-200);
}
@media (min-width: 768px) { .site-nav { padding: 22px 56px; } }

.site-nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.015em; color: var(--ink-900); }
.site-nav .brand img { width: 32px; height: 32px; border-radius: 7px; display: block; }
.site-nav .brand-cpe { color: var(--ink-500); margin-left: 2px; }

.site-nav .primary-nav { display: none; gap: 6px; align-items: center; font-size: 14px; font-weight: 500; color: var(--ink-600); }
@media (min-width: 1024px) { .site-nav .primary-nav { display: flex; } }

.site-nav .nav-item { position: relative; }
.site-nav .nav-link { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: background 0.12s; color: var(--ink-600); }
.site-nav .nav-link:hover { background: var(--ink-100); color: var(--ink-900); }
.site-nav .nav-link[aria-current="page"] { color: var(--ink-900); background: var(--surface-warm); }
.site-nav .caret { width: 10px; height: 10px; opacity: 0.5; }

.site-nav .dropdown {
  position: absolute; top: 100%; left: 0; margin-top: 8px;
  min-width: 240px;
  background: white; border: 1px solid var(--ink-200);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.site-nav .nav-item:hover .dropdown,
.site-nav .nav-item:focus-within .dropdown,
.site-nav .nav-item.open .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.site-nav .dropdown a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink-800);
  font-size: 14px; font-weight: 500;
  transition: background 0.12s;
}
.site-nav .dropdown a:hover { background: var(--surface-warm); color: var(--ink-900); }
.site-nav .dropdown .desc { font-size: 12px; color: var(--ink-500); font-weight: 400; }

.site-nav .actions { display: flex; gap: 12px; align-items: center; }

.site-nav .menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--ink-200);
  background: white; cursor: pointer;
}
@media (min-width: 1024px) { .site-nav .menu-toggle { display: none; } }
.site-nav .menu-toggle svg { width: 18px; height: 18px; color: var(--ink-700); }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed; inset: 0; top: 64px; z-index: 49;
  background: white;
  padding: 24px;
  display: none;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav .group { border-bottom: 1px solid var(--ink-100); padding: 4px 0; }
.mobile-nav .group:last-child { border-bottom: 0; }
.mobile-nav .group-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: transparent; border: 0; padding: 14px 4px;
  font-size: 16px; font-weight: 600; color: var(--ink-900);
  cursor: pointer; text-align: left;
}
.mobile-nav .group-head .caret { width: 12px; height: 12px; transition: transform 0.15s; }
.mobile-nav .group.open .group-head .caret { transform: rotate(180deg); }
.mobile-nav .group-children { display: none; padding: 4px 4px 12px; }
.mobile-nav .group.open .group-children { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav .group-children a { padding: 10px 12px; border-radius: 8px; font-size: 15px; color: var(--ink-700); }
.mobile-nav .group-children a:hover { background: var(--surface-warm); }
.mobile-nav .group-link { padding: 14px 4px; font-size: 16px; font-weight: 600; color: var(--ink-900); display: block; }
.mobile-nav .actions { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }

/* Footer ---------------------------------------------------------------- */
.site-footer {
  background: var(--ink-900);
  color: rgba(255,255,255,0.6);
  padding: 64px 24px 28px;
  font-size: 14px;
}
@media (min-width: 768px) { .site-footer { padding: 64px 56px 32px; } }
.site-footer .top {
  display: grid;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 768px) { .site-footer .top { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; } }
.site-footer h5 {
  color: white; font-size: 13px; font-weight: 600;
  letter-spacing: 0.03em; text-transform: uppercase; margin: 0 0 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a:hover { color: white; }
.site-footer .lede { max-width: 360px; line-height: 1.6; margin: 0; color: rgba(255,255,255,0.55); }
.site-footer .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: white; margin-bottom: 16px; }
.site-footer .brand img { width: 32px; height: 32px; border-radius: 7px; }
.site-footer .bottom {
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 28px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
@media (min-width: 768px) { .site-footer .bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.site-footer .bottom .links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer .bottom .links a:hover { color: white; }
.site-footer .made { font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* Cookie banner --------------------------------------------------------- */
#cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  background: white; border: 1px solid var(--ink-200);
  border-radius: 16px; box-shadow: var(--shadow-xl);
  padding: 20px;
  display: none;
  max-width: 720px; margin-left: auto; margin-right: auto;
}
#cookie-banner.show { display: block; }
@media (min-width: 768px) {
  #cookie-banner { left: auto; right: 24px; bottom: 24px; padding: 22px 24px; max-width: 460px; margin: 0; }
}
#cookie-banner .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--ink-900); }
#cookie-banner p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-600); }
#cookie-banner .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
#cookie-banner .actions .btn { flex: 1; min-width: 120px; padding: 11px 16px; font-size: 13px; }
#cookie-banner .actions .text-link { font-size: 12px; color: var(--ink-500); text-decoration: underline; align-self: center; padding: 0 8px; }

/* Form ------------------------------------------------------------------ */
.input {
  width: 100%;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink-900);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus { outline: 0; border-color: var(--brand-purple); box-shadow: 0 0 0 3px rgba(117,61,150,0.12); }

/* Reusable patterns ------------------------------------------------------ */
.pill-toggle {
  display: inline-flex; padding: 4px;
  background: white; border-radius: 999px;
  border: 1px solid var(--ink-200);
  font-size: 13px; font-weight: 600;
}
.pill-toggle button {
  padding: 10px 22px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-500);
  cursor: pointer; font: inherit;
}
.pill-toggle button.active { background: var(--ink-900); color: white; }

.placeholder {
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,0.04) 8px 9px),
    var(--surface-panel);
  border: 1px dashed var(--ink-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-400);
  border-radius: var(--radius-md);
}

/* Print-friendlier defaults for legal pages */
@media print {
  .site-nav, .site-footer, #cookie-banner { display: none !important; }
}

/* Screen-reader-only utility for accessible/SEO headings without visual impact */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Error pages (403/404/500) — shared layout */
body.error-page { display: flex; flex-direction: column; min-height: 100vh; }
.error-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 24px; background: var(--brand-gradient-deep); color: white; text-align: center; position: relative; overflow: hidden; }
.error-main::before { content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 800px; height: 800px; border-radius: 50%; background: radial-gradient(circle, rgba(117,61,150,0.3), transparent 70%); }
.error-main .inner { position: relative; z-index: 2; max-width: 540px; }
.error-main img { max-width: 240px; width: 60vw; height: auto; margin: 0 auto 16px; display: block; }
.error-code { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: rgba(255,255,255,0.7); letter-spacing: 0.06em; }
.error-title { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: clamp(36px, 6vw, 56px); font-weight: 800; line-height: 1.0; letter-spacing: -0.04em; margin: 8px 0 0; }
.error-msg { font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.75); margin-top: 16px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }

/* Legal pages (cookie-policy / privacy-policy / terms-conditions) — shared layout */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; line-height: 1.7; color: var(--ink-700); font-size: 16px; }
.legal h1 { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 12px; color: var(--ink-900); }
.legal .updated { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 32px; }
.legal h2 { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin: 36px 0 12px; color: var(--ink-900); }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 20px; margin: 0 0 14px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--brand-purple); text-decoration: underline; }
.legal strong, .legal b { color: var(--ink-900); font-weight: 700; }
