/* ==========================================================================
   ORYGIN AI — reset, base elements, layout primitives, accessibility
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  color-scheme: dark;
  background-color: var(--surface-100);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor jumps clear the sticky top bar. */
  scroll-padding-top: var(--space-16);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--surface-100);
  color: var(--text-secondary);
  /* Default UA tap flash is a blue-grey box. */
  -webkit-tap-highlight-color: var(--tap-highlight);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* The fixed offer bar must never cover the footer's last line. */
  padding-bottom: calc(var(--stickybar-height) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

a {
  color: var(--brand-400);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

strong,
b {
  font-weight: 700;
  color: var(--text-primary);
}

::selection {
  background: var(--brand-500);
  color: var(--text-on-brand);
}

/* --------------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------------
   Sentence case, one family, 800 weight, tight tracking. No text-transform
   anywhere in this codebase except the eyebrow — the previous page set every
   heading in caps, which is what made a 12-section page feel like being
   shouted at for two minutes.
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 800;
  text-wrap: balance;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Focus — one visible ring everywhere
   -------------------------------------------------------------------------- */

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

/* Only suppress the default ring where :focus-visible is supported, so
   older engines keep a fallback. */
@supports selector(:focus-visible) {
  :focus:not(:focus-visible) { outline: none; }
}

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  transform: translateY(-200%);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  background: var(--brand-600);
  color: var(--text-on-brand);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--text-on-brand);
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }

/* Every section is separated by a hairline, the way solar.orygin.ai does it.
   One rule replaces the old alternating-band-plus-gradient scheme. */
.section {
  position: relative;
  padding-block: var(--section-gap);
  border-top: 1px solid var(--border-subtle);
}

.section--flush { border-top: 0; }

/* The band is now a flat surface step. No gradient wash, no lit edge — the
   page reads as chapters on one sheet of black, not as stripes. */
.section--band {
  background: var(--surface-200);
}

.section__head {
  max-width: 40rem;
  margin-inline: auto;
  margin-bottom: var(--block-gap);
  text-align: center;
}

.section__head > * + * {
  margin-top: var(--space-4);
}

.section__head .section__sub {
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
}

.stack > * + * { margin-top: var(--space-4); }
.stack-sm > * + * { margin-top: var(--space-2); }
.stack-lg > * + * { margin-top: var(--space-8); }

.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   Touch ergonomics
   --------------------------------------------------------------------------
   ~99% of this page's traffic is mobile. Every interactive target clears the
   44x44px WCAG 2.5.5 minimum, and nothing relies on hover to be usable.
   -------------------------------------------------------------------------- */

@media (hover: none) {
  /* Hover states on a touch screen stick after the tap and read as a stuck
     button. Collapse them into the active state instead. */
  .btn--primary:hover { transform: none; }
  .card:hover,
  .bonus:hover { transform: none; }
}

@media (hover: hover) {
  a:hover { color: var(--brand-300); }
}
