/* Incorpa design system.
 *
 * Tokens and components lifted from the design prototype (prototype/*.dc.html),
 * where everything was inline styles. Colours, radii and type scale are the
 * mockups' values — keep them in sync here, not in templates.
 */

:root {
  --navy: #101b30;
  --navy-soft: #22304e;
  --gold: #b0894a;
  --gold-light: #d9b877;
  --gold-dark: #8a6a34;
  --gold-bg: #f0ebe1;
  --ink: #101b30;
  --ink-2: #384252;
  --muted: #5c6470;
  --muted-2: #8a919d;
  --muted-3: #c1c5cc;
  --on-navy: #a7b0c2;
  --line: #e8e9ec;
  --line-strong: #d5d8dd;
  --surface: #ffffff;
  --surface-soft: #f5f6f8;
  --surface-mute: #f0f1f4;
  --green: #2e7d4f;
  --green-bg: #e6f4ec;
  --red: #b23c3c;
  --red-bg: #f7e9e9;

  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --page-x: 56px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --pill: 100px;
  --shadow-card: 0 12px 28px rgba(16, 27, 48, .09);
  --shadow-pop: 0 24px 64px rgba(16, 27, 48, .35);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; }

h1, h2, h3 { margin: 0; letter-spacing: -1px; font-weight: 700; }
h1 { font-size: 48px; line-height: 1.08; letter-spacing: -1.6px; }
h2 { font-size: 36px; line-height: 1.15; }
h3 { font-size: 19px; letter-spacing: -0.3px; }
p { margin: 0; }

.mono { font-family: var(--mono); font-weight: 500; }
.kicker {
  font: 500 13px var(--mono);
  letter-spacing: 3px;
  color: var(--gold-light);
  text-transform: uppercase;
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted-2);
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ------------------------------------------------------------------ layout */

.page { padding: 80px var(--page-x); }
.page--tight { padding: 40px var(--page-x); }
.section-soft { background: var(--surface-soft); }
.dark { background: var(--navy); color: #fff; }
.dark .muted, .dark p.lede { color: var(--on-navy); }

.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

.lede { font-size: 19px; line-height: 1.6; color: var(--muted); }

/* ------------------------------------------------------------------ header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-x);
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  z-index: 20;
}
.site-header__left { display: flex; align-items: center; gap: 48px; }
.logo { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; }
.logo span { color: var(--gold); }
.nav { display: flex; gap: 30px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a.is-active { font-weight: 600; }
.site-header__right { display: flex; align-items: center; gap: 20px; font-size: 15px; font-weight: 600; }

.lang { position: relative; }
.lang__toggle { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; background: none; border: 0; font-family: inherit; }
.lang__menu {
  position: absolute; right: 0; top: 28px; min-width: 140px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px;
  box-shadow: var(--shadow-card); display: none;
}
.lang:focus-within .lang__menu, .lang__menu:hover { display: block; }
.lang__menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none;
  border-radius: var(--r-sm); font: 500 14px var(--sans); color: var(--ink); cursor: pointer;
}
.lang__menu button:hover { background: var(--surface-soft); }
.lang__menu button[aria-current="true"] { color: var(--gold-dark); font-weight: 700; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: var(--r-md); border: 1px solid transparent;
  font: 700 16px var(--sans); cursor: pointer; white-space: nowrap; transition: .15s;
}
.btn:hover { color: inherit; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #1a2742; color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--gold-light); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-light); }
.btn--ghost { border-color: var(--gold); color: var(--gold-light); font-weight: 600; }
.btn--ghost:hover { background: rgba(176, 137, 74, .12); color: #fff; }
.btn--outline { border-color: var(--navy); color: var(--navy); font-weight: 600; background: #fff; }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--sm { padding: 11px 20px; font-size: 14px; }
.btn--block { display: flex; width: 100%; }

/* ------------------------------------------------------------------ cards & badges */

.card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
  background: #fff; display: flex; flex-direction: column; transition: .15s;
  /* explicit: cards also sit inside .dark sections, where text is white */
  color: var(--ink);
}
a.card:hover, .card--link:hover { border-color: var(--gold); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card--selected { border-color: var(--gold); }

.badge {
  border: 1px solid #d9c9a8; color: var(--gold-dark); background: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--pill);
  display: inline-block;
}
.badge--green { border-color: #cfe3d6; color: var(--green); }
.badge--solid { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.flag {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background-color: var(--surface-mute); background-position: center; background-size: cover;
  flex: 0 0 auto;
}
.flag--sm { width: 30px; height: 30px; }
.flag--lg { width: 52px; height: 52px; }

.price { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.price__note { font-size: 13px; color: var(--muted-2); }

/* ------------------------------------------------------------------ chips & filters */

.chip {
  padding: 9px 18px; border-radius: var(--pill); border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-2); font: 600 14px var(--sans);
  cursor: pointer; white-space: nowrap; transition: .12s;
}
.chip:hover { border-color: var(--gold); }
.chip--on { background: var(--navy); border-color: var(--navy); color: #fff; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 20px var(--page-x);
        border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }

.filters { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 86px; }
.filters__group-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); cursor: pointer; padding: 3px 0; }
.check input { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }

.field {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 12px 14px; font: 400 15px var(--sans); color: var(--ink); background: #fff; outline: none;
}
.field:focus { border-color: var(--gold); }
.field--dark {
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff;
}
.field--dark::placeholder { color: var(--on-navy); }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }

/* ------------------------------------------------------------------ stats strip */

.stats {
  margin-top: 72px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stats > div {
  padding: 28px 20px; border-right: 1px solid rgba(255, 255, 255, .14); text-align: center;
}
.stats > div:last-child { border-right: 0; }
.stats__value { font-size: 32px; font-weight: 700; color: var(--gold-light); }
.stats__label { font-size: 14px; color: var(--on-navy); margin-top: 4px; }

/* ------------------------------------------------------------------ steps & lists */

.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 56px 240px 1fr; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.step__n { font: 500 15px var(--mono); color: var(--gold); }
.step__title { font-size: 17px; font-weight: 700; }
.step__sub { font-size: 15px; color: var(--muted); }

.dashed-list { display: flex; flex-direction: column; gap: 22px; }
.dashed-list__item { display: flex; gap: 16px; align-items: baseline; }
.dashed-list__dash { color: var(--gold); font-size: 18px; }

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

.cta {
  margin: 0 var(--page-x) 80px; background: var(--navy); border-radius: var(--r-xl); color: #fff;
  padding: 56px 64px; display: flex; align-items: center; justify-content: space-between; gap: 60px;
}
.cta h2 { font-size: 32px; margin-bottom: 10px; }
.cta p { font-size: 16px; color: var(--on-navy); }

/* ------------------------------------------------------------------ footer */

.site-footer {
  padding: 36px var(--page-x); display: flex; justify-content: space-between; gap: 24px;
  font-size: 13px; color: var(--muted-2); border-top: 1px solid var(--line); flex-wrap: wrap;
}
.site-footer__links { display: flex; gap: 8px; flex-wrap: wrap; }
.site-footer__links a:hover { color: var(--gold); }

/* ------------------------------------------------------------------ misc */

.empty {
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 48px;
  text-align: center; margin-top: 8px;
}
.htmx-request .is-loading { opacity: .45; transition: opacity .15s; }
.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;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --page-x: 22px; }
  h1 { font-size: 34px; letter-spacing: -1px; }
  h2 { font-size: 27px; }
  .site-header { height: auto; padding: 14px var(--page-x); flex-wrap: wrap; gap: 12px; }
  .site-header__left { gap: 20px; flex-wrap: wrap; }
  .nav { gap: 16px; font-size: 14px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
  .stats > div:nth-child(2) { border-right: 0; }
  .step { grid-template-columns: 40px 1fr; }
  .step__sub { grid-column: 2; }
  .cta { flex-direction: column; align-items: flex-start; gap: 24px; padding: 32px 24px; }
  .page { padding: 48px var(--page-x); }
  .catalog-layout { grid-template-columns: 1fr !important; }
  .filters { position: static; }
}

/* ------------------------------------------------------------------ quiz */

.quiz-options { display: grid; gap: 12px; }
.quiz-option {
  border: 1.5px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04);
  border-radius: var(--r-lg); padding: 22px 24px; cursor: pointer;
  display: flex; align-items: center; gap: 16px; transition: .12s;
}
.quiz-option:hover { border-color: rgba(176, 137, 74, .6); }
.quiz-option input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-option__mark {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35);
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 13px; font-weight: 700;
}
.quiz-option:has(input[type="checkbox"]) .quiz-option__mark { border-radius: 7px; }
.quiz-option:has(input:checked) { border-color: var(--gold); background: rgba(176, 137, 74, .12); }
.quiz-option:has(input:checked) .quiz-option__mark { background: var(--gold); border-color: var(--gold); }
.quiz-option:has(input:checked) .quiz-option__mark::after { content: "✓"; }
.quiz-option__label { display: block; font-size: 17px; font-weight: 600; color: #fff; }
.quiz-option__sub { display: block; font-size: 13.5px; color: var(--on-navy); margin-top: 2px; }

/* ------------------------------------------------------------------ modal */

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start;
         justify-content: center; padding: 48px 20px; overflow: auto; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(16, 27, 48, .55); backdrop-filter: blur(2px); }
.modal__box {
  position: relative; background: #fff; border-radius: 16px; width: 900px; max-width: 100%;
  box-shadow: var(--shadow-pop); display: grid; grid-template-columns: 320px 1fr; overflow: hidden;
}
.modal__side { background: var(--navy); color: #fff; padding: 34px 30px; }
.modal__body { padding: 32px 34px; }
.modal__close { background: none; border: 0; color: var(--muted-2); font-size: 20px; cursor: pointer; line-height: 1; }
.form-error { color: var(--red); font-size: 12.5px; margin-top: 4px; }

.segmented { display: flex; gap: 8px; }
.segmented__item {
  flex: 1; text-align: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  padding: 11px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: .12s;
}
.segmented__item input { position: absolute; opacity: 0; pointer-events: none; }
.segmented__item:has(input:checked) { border-color: var(--gold); background: var(--gold-bg); color: var(--gold-dark); }

@media (max-width: 860px) {
  .modal__box { grid-template-columns: 1fr; }
  .modal__side { display: none; }
  .quiz-options { grid-template-columns: 1fr !important; }
}
