/* ==========================================================================
   OmnyFit — Design System
   Built from OmnyFit Brand Summary v1.0 (Aug 2026)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Instrument+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Core palette */
  --ink: #14161C;
  --porcelain: #F7F5F1;
  --denim: #2E45D4;
  --lime: #C6F24A;
  --graphite: #5B6070;
  --clay: #E0CDB8;

  /* Working tints */
  --panel-light: #F1EFEA;
  --card-white: #FFFFFF;
  --border-light: #E6E2DB;
  --rule-light: #DCD8D1;
  --panel-dark: #1C1F28;
  --border-dark: #3A3F4C;
  --muted-dark: #8A8F9E;
  --body-dark: #B9BDC8;
  --body-light: #3A3F4C;
  --lime-wash: rgba(198, 242, 74, 0.14);
  --denim-tint: #C3CBFA;
  --btn-secondary-border-light: #CFCAC2;

  /* Type */
  --font-display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Instrument Sans', Helvetica, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', Menlo, Consolas, monospace;

  /* Radii */
  --r-sm: 10px;
  --r-md: 20px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Section rhythm */
  --section-py: clamp(64px, 9vw, 140px);
  --section-px: clamp(24px, 7vw, 140px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--porcelain);
  color: var(--body-light);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--section-px);
  padding-right: var(--section-px);
}

section { padding-top: var(--section-py); padding-bottom: var(--section-py); }
section[id] { scroll-margin-top: 96px; }

/* Surfaces --------------------------------------------------------------- */
.surface-porcelain { background: var(--porcelain); color: var(--body-light); }
.surface-white { background: var(--card-white); color: var(--body-light); }
.surface-ink { background: var(--ink); color: var(--body-dark); }
.surface-ink h1, .surface-ink h2, .surface-ink h3, .surface-ink h4,
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: var(--porcelain); }
.surface-ink .eyebrow, .card-dark .eyebrow { color: var(--lime); }

/* Typography scale --------------------------------------------------------*/
.h1 {
  font-weight: 600;
  font-size: clamp(44px, 7.2vw, 104px);
  letter-spacing: -0.04em;
  line-height: 0.94;
}
.h2 {
  font-weight: 600;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.h3 {
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--graphite);
  max-width: 640px;
}
.surface-ink .lede, .card-dark .lede { color: var(--body-dark); }
.small { font-size: 14px; line-height: 1.6; color: var(--graphite); }
.surface-ink .small, .card-dark .small { color: var(--muted-dark); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--denim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule-light);
  margin-bottom: 48px;
}
.surface-ink .section-head { border-bottom-color: var(--border-dark); }
.section-head .h2 { max-width: 700px; }
.card-dark .section-head { border-bottom-color: var(--border-dark); }

/* Buttons ------------------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-sm);
  padding: 13px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:disabled:hover { opacity: 0.55; }
.btn-primary { background: var(--denim); color: #fff; }
.btn-secondary {
  background: transparent;
  border-color: var(--btn-secondary-border-light);
  color: var(--ink);
  font-weight: 500;
}
.surface-ink .btn-secondary, .card-dark .btn-secondary { border-color: var(--border-dark); color: var(--porcelain); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Pills ----------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--lime-wash);
  color: var(--ink);
  border: 1px solid transparent;
}
.surface-ink .pill, .card-dark .pill { background: var(--lime-wash); color: var(--lime); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

/* Cards ------------------------------------------------------------------*/
.card {
  background: var(--card-white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 36px);
}
.surface-ink .card, .card-dark {
  background: var(--panel-dark);
  border: none;
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 36px);
  color: var(--body-dark);
}
.surface-porcelain .card { background: var(--card-white); }

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Stat blocks --------------------------------------------------------------*/
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.03em;
  color: var(--ink);
}
.surface-ink .stat-num, .card-dark .stat-num { color: var(--porcelain); }
.stat-cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
}
.surface-ink .stat-cap, .card-dark .stat-cap { color: var(--muted-dark); }

/* Header ------------------------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-light);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand-mark { height: 26px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--body-light); }
.nav-links a:hover, .nav-links a.active { color: var(--denim); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}
.has-dropdown {
  position: relative;
  /* padding-bottom + matching negative margin extends the hoverable box down
     across the visual gap to the dropdown, without adding layout height —
     otherwise moving the mouse diagonally into the panel drops :hover mid-transit. */
  padding-bottom: 8px;
  margin-bottom: -8px;
}
.dropdown {
  position: absolute;
  top: 100%;
  left: -20px;
  background: var(--card-white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 10px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
}
.dropdown a {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
}
.dropdown a:hover { background: var(--panel-light); color: var(--denim); }

/* Footer -------------------------------------------------------------------*/
.site-footer { background: var(--ink); color: var(--body-dark); }
.footer-top {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  padding-bottom: 56px;
}
.footer-brand .brand-mark { height: 24px; margin-bottom: 16px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--body-dark); }
.footer-col a:hover { color: var(--lime); }
.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding-top: 24px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted-dark);
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* Utility -------------------------------------------------------------------*/
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-40 { gap: 40px; }
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mt-32{margin-top:32px;} .mt-48{margin-top:48px;} .mt-64{margin-top:64px;}
.mb-0{margin-bottom:0;}
.text-center { text-align: center; }
.w-full { width: 100%; }
.rule { border: none; border-top: 1px solid var(--rule-light); margin: 0; }
.surface-ink .rule, .card-dark .rule { border-top-color: var(--border-dark); }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.numeral { font-family: var(--font-mono); }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.badge-note {
  border: 1px dashed var(--btn-secondary-border-light);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--graphite);
  background: var(--panel-light);
}
.surface-ink .badge-note, .card-dark .badge-note { border-color: var(--border-dark); background: var(--ink); color: var(--muted-dark); }

/* Form ----------------------------------------------------------------------*/
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); font-family: var(--font-body); }
.surface-ink .field label, .card-dark .field label { color: var(--porcelain); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-light);
  background: var(--card-white);
  color: var(--ink);
}
.surface-ink .field input, .surface-ink .field select, .surface-ink .field textarea,
.card-dark .field input, .card-dark .field select, .card-dark .field textarea {
  background: var(--ink);
  border-color: var(--border-dark);
  color: var(--porcelain);
}
.field textarea { resize: vertical; min-height: 110px; font-family: var(--font-body); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { font-size: 12px; color: var(--graphite); }
.surface-ink .form-note, .card-dark .form-note { color: var(--muted-dark); }

/* Demo widget (product.html render demo) ------------------------------------*/
.demo-frame {
  margin-top: 24px;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  background: var(--panel-light);
  transition: opacity 0.2s ease;
}
.demo-frame--dashed { border: 1px dashed var(--btn-secondary-border-light); }
.demo-frame--solid { border: 1px solid var(--border-light); }
.demo-frame--rendering { opacity: 0.45; }

table.compare { width: 100%; border-collapse: collapse; }
table.compare th, table.compare td {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid var(--rule-light);
  font-size: 14px;
}
table.compare th { font-family: var(--font-mono); text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; color: var(--graphite); }

/* Responsive -----------------------------------------------------------------*/
@media (max-width: 980px) {
  .nav-links, .nav-cta .btn-secondary { display: none; }
  .nav-toggle { display: block; }
  .hero { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* Mobile nav panel ------------------------------------------------------------*/
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px var(--section-px) 24px;
  border-bottom: 1px solid var(--rule-light);
  background: var(--porcelain);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 4px; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--rule-light); }
.mobile-nav .btn { margin-top: 12px; }
