/* ==========================================================================
   SoloTrace base styles and components
   Requires tokens.css. Mobile first. WCAG 2.1 AA.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
[hidden] { display: none !important; }

/* --- Document ------------------------------------------------------------- */
body {
  font-family: var(--st-font-body);
  font-size: var(--st-fs-body);
  line-height: var(--st-lh-body);
  font-weight: var(--st-fw-regular);
  color: var(--st-fg);
  background: var(--st-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .st-h1, .st-h2, .st-h3, .st-h4, .st-display {
  font-family: var(--st-font-heading);
  font-weight: var(--st-fw-bold);
  line-height: var(--st-lh-heading);
  letter-spacing: var(--st-tracking-heading);
  color: var(--st-fg);
  text-wrap: balance;
}
h1, .st-h1 { font-size: var(--st-fs-h1); font-weight: var(--st-fw-extrabold); }
h2, .st-h2 { font-size: var(--st-fs-h2); }
h3, .st-h3 { font-size: var(--st-fs-h3); line-height: var(--st-lh-tight); }
h4, .st-h4 { font-size: var(--st-fs-h4); line-height: var(--st-lh-tight); }
.st-display { font-size: var(--st-fs-display); font-weight: var(--st-fw-extrabold); }
.st-light   { font-weight: var(--st-fw-light); }   /* light touch, matches the wordmark's "Trace" */

p { max-width: 62ch; }
.st-lead { font-size: var(--st-fs-lead); line-height: 1.6; }
.st-muted { color: var(--st-fg-muted); }
.st-small { font-size: var(--st-fs-small); }

.st-label {
  display: inline-block;
  font-family: var(--st-font-body);
  font-size: var(--st-fs-label);
  font-weight: var(--st-fw-medium);
  letter-spacing: var(--st-tracking-label);
  text-transform: uppercase;
  color: var(--st-accent);
  margin-bottom: var(--st-space-3);
}

a { color: var(--st-fg); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

/* Wordmark in live text: "Solo" bold, "Trace" light, tight tracking. */
.st-wordmark {
  font-family: var(--st-font-heading);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.st-wordmark b { font-weight: var(--st-fw-bold); }
.st-wordmark span { font-weight: var(--st-fw-light); }

/* --- Focus, press and hover feedback (shared, 2 November 2026, third version) ---
   One style for every interactive element on the site, defined here only; no per-page overrides.
   - Keyboard focus (:focus-visible): 2px Deep Navy outline, 2px offset, soft Dusty Blue halo. On navy surfaces the
     outline is Warm Ivory with the same halo at lower opacity (tokens.css remap).
   - Mouse and touch press (:active): the same Dusty Blue halo plus scale 0.98, 120ms. Primary navy buttons go
     slightly darker. No grey or beige fill on any pressed element.
   - No outline lingers after a mouse click (:focus-visible only). No default browser outline, no tap flash.
   - Reduced motion: no scale, halo kept. Dusty Blue is never used as text. */
a, button, summary, input, select, textarea, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--st-ring); outline-offset: 2px; box-shadow: var(--st-ring-glow); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--st-navy); }
/* One transition for hover, focus and press. */
.hp-demo, .hp-cat .st-card, .sv-over__item, .st-card--interactive, .hp-pkg .st-card, .pr-grid .st-card, .sv-card, .sv-pcard, .sv-main, .st-btn, .pr-acc__btn, .pr-acc__all, .hp-faq summary, .faq summary, .hp-lang a, .st-nav a, .hp-drawer__links a, .hp-footer a, .hp-cat .st-card a, .sv-link, .hp-pkg__toggle button, .hp-dots button, .hp-float__toggle, .st-nav-toggle, .hp-form input, .hp-form select, .hp-form textarea {
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.hp-pkg .st-card:hover, .pr-grid .st-card:hover, .sv-pcard:hover, .sv-main:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -18px rgb(15 23 42 / 0.35); }
.pr-acc__btn:hover, .hp-faq summary:hover, .faq summary:hover { background: var(--st-navy-a04); }
.hp-lang a:not([aria-current]):hover, .st-nav a:hover, .hp-drawer__links a:hover { background: var(--st-navy-a04); }
/* Press: halo and a slight scale on every interactive element (the body prefix beats hover lifts and tints). */
body a:active, body button:active, body summary:active, body input:active, body select:active, body textarea:active, body [tabindex]:active { box-shadow: var(--st-ring-glow); }
body .st-btn:active, body .hp-demo:active, body .hp-cat .st-card:active, body .sv-over__item:active, body .st-card--interactive:active,
body .pr-acc__btn:active, body .pr-acc__all:active, body .hp-faq summary:active, body .faq summary:active, body .hp-lang a:active, body .hp-pkg__toggle button:active, body .hp-dots button:active, body .hp-float__toggle:active, body .st-nav-toggle:active { transform: scale(0.98); }
body .st-btn:active { box-shadow: var(--st-ring-glow); }   /* beats the primary button's hover shadow */
body .st-btn--primary:active { background: var(--st-navy-press); border-color: var(--st-navy-press); }
body .st-btn--secondary:active, body .st-nav a:active, body .hp-drawer__links a:active, body .hp-lang a:not([aria-current]):active, body .pr-acc__btn:active, body .pr-acc__all:active, body .hp-faq summary:active, body .faq summary:active, body .hp-footer a:not(.st-btn):active { background-color: transparent; }
.hp-cat .st-card a, .sv-link, .st-nav a, .hp-footer a:not(.st-btn), .pr-acc__all, .hp-faq summary, .faq summary, .pr-acc__btn { border-radius: var(--st-radius-sm); }
.st-skip-link {
  position: absolute; left: var(--st-space-4); top: -100%;
  padding: var(--st-space-2) var(--st-space-4);
  background: var(--st-navy); color: var(--st-ivory);
  border-radius: var(--st-radius-sm); z-index: 100;
}
.st-skip-link:focus { top: var(--st-space-4); }
.st-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- Layout --------------------------------------------------------------- */
.st-container {
  width: min(100% - 2 * var(--st-gutter), var(--st-container));
  margin-inline: auto;
}
.st-section { padding-block: var(--st-section); }
.st-section--tight { padding-block: calc(var(--st-section) * 0.6); }
.st-stack > * + * { margin-top: var(--st-space-4); }
.st-stack--lg > * + * { margin-top: var(--st-space-6); }
.st-cluster { display: flex; flex-wrap: wrap; gap: var(--st-space-3); align-items: center; }
.st-grid { display: grid; gap: var(--st-space-5); }
@media (min-width: 640px)  { .st-grid--2, .st-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .st-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.st-divider { border: 0; height: 1px; background: var(--st-divider); margin-block: var(--st-space-6); }

/* --- Buttons -------------------------------------------------------------- */
.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--st-space-2);
  min-height: 2.9rem; padding: 0.7rem 1.4rem;
  font-family: var(--st-font-heading); font-size: 0.9375rem; font-weight: var(--st-fw-bold);
  letter-spacing: -0.005em; line-height: 1; text-decoration: none; white-space: nowrap;
  border-radius: var(--st-radius-sm); border: 1.5px solid transparent; cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.st-btn--primary { background: var(--st-btn-bg); color: var(--st-btn-fg); border-color: var(--st-btn-bg); }
.st-btn--primary:hover { transform: translateY(-1px); box-shadow: var(--st-shadow-btn); }
.st-btn--secondary { background: transparent; color: var(--st-fg); border-color: var(--st-btn-outline); }
.st-btn--secondary:hover { background: var(--st-btn-hover-tint); }
.st-btn--lg { min-height: 3.25rem; padding: 0.9rem 1.75rem; font-size: 1rem; }
.st-btn[disabled], .st-btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.st-btn .st-icon { width: 1.1em; height: 1.1em; }

/* --- Cards ---------------------------------------------------------------- */
.st-card {
  padding: var(--st-space-6);
  border-radius: var(--st-radius-md);
  background: var(--st-surface);
  color: var(--st-navy);              /* all card fills are light: navy text, always */
  transition: transform var(--st-dur) var(--st-ease);
}
.st-card--beige  { background: var(--st-beige); }
.st-card--greige { background: var(--st-greige); }
.st-card--blue   { background: var(--st-blue); }
.st-card--blue .st-muted, .st-card--blue .st-label { color: var(--st-navy); }
.st-card--interactive:hover { transform: translateY(-3px); }
.st-card h3 { margin-bottom: var(--st-space-3); }
.st-card > * + * { margin-top: var(--st-space-3); }
.st-card__icon {
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border-radius: var(--st-radius-sm); background: var(--st-navy); color: var(--st-ivory);
  margin-bottom: var(--st-space-4);
}
.st-card__icon svg { width: 1.35rem; height: 1.35rem; }

/* --- Navy contrast band --------------------------------------------------- */
.st-band { padding-block: var(--st-section); }
.st-band .st-card { background: var(--st-ivory-a12); color: var(--st-ivory); }
.st-band .st-card .st-muted { color: var(--st-ivory-75); }

/* --- Header / nav --------------------------------------------------------- */
.st-header { padding-block: var(--st-space-4); }
.st-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--st-space-5); }
.st-logo { display: inline-flex; align-items: center; }
.st-logo img, .st-logo svg { height: 3.25rem; width: auto; }
.st-nav { display: none; gap: var(--st-space-5); align-items: center; }
.st-nav a { font-weight: var(--st-fw-medium); text-decoration: none; font-size: 0.9375rem; padding: 0.35rem 0.5rem; margin: -0.35rem -0.5rem; border-radius: var(--st-radius-sm); }
.st-nav a:hover, .st-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.35em; }
.st-nav-toggle {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 1.5px solid var(--st-btn-outline); background: transparent; border-radius: var(--st-radius-sm);
}
.st-nav-toggle svg { width: 1.25rem; height: 1.25rem; }
@media (min-width: 840px) { .st-nav { display: flex; } .st-nav-toggle { display: none; } }

/* --- Hero ----------------------------------------------------------------- */
.st-hero { display: grid; gap: var(--st-space-7); align-items: center; }
@media (min-width: 960px) { .st-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); gap: var(--st-space-8); } }
.st-hero__copy > * + * { margin-top: var(--st-space-5); }
.st-hero__copy h1 { max-width: 14ch; }

/* 3D hero panel: static image by default, canvas fades in once ready. */
.st-hero3d {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--st-radius-lg); background: var(--st-greige);
}
.st-hero3d__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity var(--st-dur-slow) var(--st-ease);
}
.st-hero3d canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  opacity: 0; transition: opacity var(--st-dur-slow) var(--st-ease);
}
.st-hero3d.is-3d canvas { opacity: 1; }
.st-hero3d.is-3d .st-hero3d__fallback { opacity: 0; }

/* --- Scroll reveal (opt in with data-reveal; motion.js adds is-visible) --- */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--st-dur-slow) var(--st-ease), transform var(--st-dur-slow) var(--st-ease);
  transition-delay: var(--st-reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* --- Footer --------------------------------------------------------------- */
.st-footer { padding-block: var(--st-space-7); font-size: var(--st-fs-small); color: var(--st-fg-muted); }
.st-footer a { color: inherit; }

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .st-btn--primary:hover, .st-card--interactive:hover, .hp-pkg .st-card:hover, .pr-grid .st-card:hover, .sv-pcard:hover, .sv-main:hover,
  body .st-btn:active, body .hp-demo:active, body .hp-cat .st-card:active, body .sv-over__item:active, body .st-card--interactive:active, body .pr-acc__btn:active, body .pr-acc__all:active, body .hp-faq summary:active, body .faq summary:active, body .hp-lang a:active, body .hp-pkg__toggle button:active, body .hp-dots button:active, body .hp-float__toggle:active, body .st-nav-toggle:active { transform: none; }
}

/* --- Print ---------------------------------------------------------------- */
@media print {
  .st-hero3d canvas, .st-nav-toggle { display: none; }
  .st-hero3d.is-3d .st-hero3d__fallback { opacity: 1; }
}
