/* XSELA — site styles.
   Palette and geometry come from research/brand-analysis.md; the same values are
   generated into assets/css/tokens.css by tools/build_assets.py. */

:root {
  --navy: #14427D;
  --accent: #1D58A4;
  --accent-dark: #5290E0;
  --silver: #C8C9C7;
  --carbon: #11111F;
  --ink: #1F304A;
  --grey: #696B6D;
  --offwhite: #F7F7F7;
  --white: #FFFFFF;

  --bg: var(--white);
  --bg-subtle: var(--offwhite);
  --text: var(--ink);
  --muted: var(--grey);
  --brand: var(--navy);
  --link: var(--accent);
  --rule: #E2E4E6;
  --card: var(--white);
  --shadow: 0 1px 2px rgba(17,17,31,.05), 0 8px 24px rgba(17,17,31,.06);

  --wrap: 1180px;
  --gut: clamp(1.15rem, 4vw, 2.5rem);
  --r: 3px;

  --f: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
       "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--carbon);
    --bg-subtle: #191926;
    --text: #EDEFF2;
    --muted: #A8ADB4;
    --brand: var(--silver);
    --link: var(--accent-dark);
    --rule: #2A2A3A;
    --card: #1A1A28;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.6rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.35rem); }
p { margin: 0 0 1.1em; }
a { color: var(--link); text-underline-offset: .2em; }

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem;
}
.skip:focus { left: .5rem; top: .5rem; }

/* eyebrow ------------------------------------------------------------------ */
.eyebrow {
  font-size: .765rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem;
  display: flex; align-items: center; gap: .7rem;
}
.eyebrow::before {
  content: ""; width: 1.6rem; height: 2px; background: var(--link); flex: none;
}

/* header ------------------------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.hdr__in { display: flex; align-items: center; gap: 1.5rem; height: 4.35rem; }
.hdr__logo { display: flex; align-items: center; color: var(--brand); flex: none; }
.hdr__logo svg, .hdr__logo img { display: block; height: 1.9rem; width: auto; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.9rem); }
.nav a {
  color: var(--text); text-decoration: none; font-size: .925rem; font-weight: 500;
  padding: .3rem 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="true"] { border-bottom-color: var(--link); color: var(--link); }

.lang { display: flex; gap: .1rem; align-items: center; font-size: .8rem; font-weight: 600; }
.lang a { color: var(--muted); text-decoration: none; padding: .25rem .45rem; border-radius: var(--r); }
.lang a[aria-current="true"] { color: var(--bg); background: var(--brand); }

.burger {
  display: none; margin-left: auto; background: none; border: 1px solid var(--rule);
  border-radius: var(--r); width: 2.6rem; height: 2.4rem; cursor: pointer; color: var(--text);
}
.burger span { display: block; width: 1.05rem; height: 2px; background: currentColor; margin: 3px auto; }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 4.35rem 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--rule);
    padding: .6rem var(--gut) 1.4rem; margin: 0; display: none; box-shadow: var(--shadow);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
  .lang { padding-top: .9rem; }
}

/* hero --------------------------------------------------------------------- */
.hero { position: relative; background: var(--carbon); color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(17,17,31,.55) 0%, rgba(17,17,31,.35) 45%, rgba(17,17,31,.95) 100%),
    linear-gradient(90deg, rgba(20,66,125,.55) 0%, rgba(17,17,31,.1) 65%);
}
.hero__in { position: relative; padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero__in .eyebrow { color: rgba(255,255,255,.72); }
.hero__in .eyebrow::before { background: var(--accent-dark); }
.hero h1 { max-width: 17ch; text-wrap: balance; }
.hero__lead {
  font-size: clamp(1.05rem, .98rem + .55vw, 1.3rem);
  max-width: 56ch; color: rgba(255,255,255,.86); margin-bottom: 2rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82rem 1.5rem; border-radius: var(--r); font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--pri { background: var(--accent); color: #fff; }
.btn--pri:hover { background: #2464B8; }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* hero stat strip */
.stats {
  position: relative; display: grid; gap: 1px; background: var(--carbon);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-top: 1px solid rgba(255,255,255,.14);
}
/* box-shadow rather than gap colour, so a short final row stays carbon
   instead of letting the hero photo show through an empty cell */
.stats div {
  background: var(--carbon); padding: 1.3rem clamp(1rem, 3vw, 1.8rem);
  box-shadow: 0 0 0 1px rgba(255,255,255,.14);
}
.stats dt { font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.stats dd { margin: .25rem 0 0; font-size: 1.28rem; font-weight: 700; color: #fff; }

/* sections ----------------------------------------------------------------- */
.sec { padding: clamp(3.6rem, 9vw, 7rem) 0; }
.sec--alt { background: var(--bg-subtle); }
.sec--dark { background: var(--carbon); color: #EDEFF2; }
.sec--dark .eyebrow { color: rgba(255,255,255,.62); }
.sec--dark h2 { color: #fff; }
.sec__head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.sec__head p { color: var(--muted); font-size: 1.075rem; margin-bottom: 0; }
.sec--dark .sec__head p { color: rgba(255,255,255,.72); }

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr .95fr; } }
.split img { width: 100%; height: auto; border-radius: var(--r); display: block; }

/* cards -------------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.6rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r);
  padding: clamp(1.5rem, 3vw, 2.1rem); position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--link);
  transform: scaleY(0); transform-origin: top; transition: transform .25s ease;
}
.card:hover::before { transform: scaleY(1); }
.card__n {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--link);
  display: block; margin-bottom: .8rem;
}
.card p { color: var(--muted); margin-bottom: 0; font-size: .975rem; }
.card h3 { margin-bottom: .55rem; }

/* products ----------------------------------------------------------------- */
.prod { border-top: 1px solid var(--rule); padding: clamp(2rem, 4vw, 3rem) 0; }
.prod:last-of-type { border-bottom: 1px solid var(--rule); }
.sec--dark .prod { border-color: rgba(255,255,255,.14); }
.prod__head { display: grid; gap: 1rem 2.5rem; margin-bottom: 1.8rem; }
@media (min-width: 820px) { .prod__head { grid-template-columns: 20rem 1fr; align-items: start; } }
.prod__head h3 { margin: 0; }
.prod__head p { color: var(--muted); margin: 0; font-size: .975rem; }
.sec--dark .prod__head p { color: rgba(255,255,255,.68); }

.brands { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.brands img {
  width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: contain;
  background: #fff; border-radius: var(--r); padding: .45rem;
  border: 1px solid var(--rule);
  opacity: .93; transition: opacity .18s ease, transform .18s ease;
}
.brands img:hover { opacity: 1; transform: translateY(-2px); }

.note { font-size: .84rem; color: var(--muted); margin-top: 1.6rem; }
.sec--dark .note { color: rgba(255,255,255,.55); }

/* contact ------------------------------------------------------------------ */
.contact { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .contact { grid-template-columns: .85fr 1.15fr; } }

.dl { margin: 0; display: grid; gap: 1.35rem; }
.dl dt {
  font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .2rem;
}
.dl dd { margin: 0; font-size: 1.02rem; }
.dl a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--link); }
.dl a:hover { color: var(--link); }

.form { display: grid; gap: 1rem; }
.row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .row--2 { grid-template-columns: 1fr 1fr; } }
label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .38rem; }
.req { color: var(--link); }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--rule); border-radius: var(--r);
  padding: .72rem .85rem;
}
textarea { resize: vertical; min-height: 7rem; }
input:focus, select:focus, textarea:focus { border-color: var(--link); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent); }
.consent { display: flex; gap: .65rem; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.consent input { width: auto; margin-top: .2rem; flex: none; }

/* footer ------------------------------------------------------------------- */
.ftr { background: var(--carbon); color: rgba(255,255,255,.72); padding: clamp(2.8rem, 6vw, 4.5rem) 0 2rem; font-size: .9rem; }
.ftr__top { display: grid; gap: 2.2rem; padding-bottom: 2.4rem; border-bottom: 1px solid rgba(255,255,255,.13); }
@media (min-width: 780px) { .ftr__top { grid-template-columns: 1.4fr 1fr 1fr; } }
.ftr__logo { color: #fff; display: block; }
.ftr__logo svg, .ftr__logo img { height: 2.1rem; width: auto; display: block; }
.ftr h4 { color: #fff; font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 .9rem; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ftr a { color: rgba(255,255,255,.72); text-decoration: none; }
.ftr a:hover { color: #fff; }
.ftr__btm { padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; font-size: .82rem; color: rgba(255,255,255,.5); }

/* legal pages -------------------------------------------------------------- */
.doc { padding: clamp(3rem, 7vw, 5rem) 0; }
.doc .wrap { max-width: 44rem; }
.doc h2 { font-size: 1.4rem; margin-top: 2.4rem; }
.doc h3 { font-size: 1.08rem; margin-top: 1.6rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .92rem; }
.doc th, .doc td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Wide policy tables must never widen the page. Above the stacking breakpoint they
   scroll inside their own box; below it they become labelled blocks, which reads far
   better than a sideways-scrolling privacy policy on a phone. */
.doc .t-cols { display: block; overflow-x: auto; }

@media (max-width: 720px) {
  .doc .t-cols { display: block; overflow-x: visible; }
  .doc .t-cols thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc .t-cols tbody, .doc .t-cols tr, .doc .t-cols td { display: block; width: 100%; }
  .doc .t-cols tr {
    border: 1px solid var(--rule); border-radius: var(--r);
    padding: .3rem .9rem .6rem; margin: 0 0 .9rem;
  }
  .doc .t-cols td { border: 0; padding: .55rem 0 0; }
  .doc .t-cols td::before {
    content: attr(data-label); display: block;
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
    color: var(--muted); margin-bottom: .15rem;
  }

  /* row-header tables: label above value instead of beside it */
  .doc .t-rows, .doc .t-rows tbody, .doc .t-rows tr, .doc .t-rows th, .doc .t-rows td {
    display: block; width: 100%;
  }
  .doc .t-rows tr {
    border-bottom: 1px solid var(--rule); padding: .7rem 0;
  }
  .doc .t-rows th, .doc .t-rows td { border: 0; padding: 0; }
  .doc .t-rows th { margin-bottom: .2rem; }
}

/* cookie gate -------------------------------------------------------------- */
.cookie {
  position: fixed; z-index: 90; inset: auto 1rem 1rem; max-width: 30rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.25rem 1.35rem; box-shadow: var(--shadow); font-size: .88rem;
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 1rem; color: var(--muted); }
.cookie div { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie .btn { padding: .6rem 1.1rem; font-size: .87rem; }
.btn--sm { border-color: var(--rule); color: var(--text); }
.btn--sm:hover { border-color: var(--link); }

/* ==========================================================================
   Motion, process, FAQ, form states
   ========================================================================== */

/* scroll reveal. Opt-in via [data-reveal]; JS adds .in when the block enters
   view. Anything without JS, or with reduced motion, is visible from the start. */
/* Content is visible by default. The hidden start state applies only once JS has
   confirmed IntersectionObserver is available and motion is allowed, so a failed
   observer, an old browser or a JS error can never leave the page blank. */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(14px); }
.reveal-ready [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal], .reveal-ready [data-reveal].in {
    opacity: 1; transform: none; transition: none;
  }
}
/* stagger children of a group */
.reveal-ready .steps > li:nth-child(2).in, .faq details:nth-child(2).in { transition-delay: .06s; }
.reveal-ready .steps > li:nth-child(3).in, .faq details:nth-child(3).in { transition-delay: .12s; }
.reveal-ready .steps > li:nth-child(4).in, .faq details:nth-child(4).in { transition-delay: .18s; }
.faq details:nth-child(5).in { transition-delay: .24s; }
.faq details:nth-child(6).in { transition-delay: .3s; }

/* header condenses once you leave the hero */
.hdr { transition: height .2s ease, box-shadow .2s ease; }
.hdr[data-stuck="true"] { box-shadow: 0 1px 0 var(--rule), 0 6px 22px rgba(17,17,31,.07); }
.hdr[data-stuck="true"] .hdr__in { height: 3.7rem; }
.hdr__in { transition: height .2s ease; }

/* scroll progress hairline */
.prog {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: var(--link); transition: width .1s linear;
}

/* service card tick lists */
.tick { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .45rem; }
.tick li {
  position: relative; padding-left: 1.35rem; font-size: .9rem; color: var(--muted);
}
.tick li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: .5rem; height: .5rem; border-left: 2px solid var(--link);
  border-bottom: 2px solid var(--link); transform: rotate(-45deg) translateY(-1px);
}

/* process ------------------------------------------------------------------ */
.steps {
  list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1rem, 2.2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: s;
}
.steps li { position: relative; padding-top: 2.6rem; }
.steps li::after {
  content: ""; position: absolute; left: 2.6rem; right: -1.5rem; top: 1.1rem;
  height: 1px; background: var(--rule);
}
.steps li:last-child::after { display: none; }
@media (max-width: 719px) { .steps li::after { display: none; } }
.steps__n {
  position: absolute; top: 0; left: 0;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
  color: var(--link); border: 1px solid var(--rule); background: var(--bg);
}
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

/* faq ---------------------------------------------------------------------- */
.faq { display: grid; gap: .55rem; max-width: 54rem; }
.faq details {
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--card);
  overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 3rem 1.05rem 1.2rem;
  font-weight: 600; position: relative; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.25rem; top: 50%;
  width: .55rem; height: .55rem; margin-top: -.4rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease, border-color .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); border-color: var(--link); }
.faq summary:hover { color: var(--link); }
.faq__a { padding: 0 1.2rem 1.15rem; }
.faq__a p { margin: 0; color: var(--muted); font-size: .96rem; }
.faq details[open] .faq__a { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .faq details[open] .faq__a { animation: none; } }

/* form states -------------------------------------------------------------- */
.field { position: relative; }
.err { display: block; margin-top: .35rem; font-size: .8rem; color: #C2401E; font-weight: 500; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #FF9C7A; } }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #C2401E; }
input[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(194,64,30,.16);
}

.form__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form__note { margin: 0; font-size: .82rem; color: var(--muted); }
.form__status { margin: 0; font-size: .87rem; }
.form__status[data-kind="error"] { color: #C2401E; }

.btn[data-busy="true"] { pointer-events: none; opacity: .75; }
.spin {
  width: .95rem; height: .95rem; border-radius: 50%; display: none;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn[data-busy="true"] .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.sent {
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--card);
  padding: clamp(1.6rem, 4vw, 2.4rem); text-align: left;
}
.sent[hidden] { display: none; }
.sent__mark {
  width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--link) 14%, transparent); color: var(--link);
  margin-bottom: 1rem;
}
.sent h3 { margin-bottom: .4rem; }
.sent p { color: var(--muted); }

/* hero parallax drift, disabled for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .hero__bg img { will-change: transform; }
}
.sent__act { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0 0; }
.sent__act .btn[hidden] { display: none; }
