/* ============================================================================
   Inteople v2 — Base layer: reset, typography, layout primitives, buttons, a11y
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

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

/* ---- Headings ---- */
h1,
h2,
h3,
h4 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

p {
  color: var(--muted);
}

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

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

.section {
  padding-block: var(--section-y);
}

.section.tight {
  padding-block: clamp(40px, 3vw + 24px, 72px);
}

.bg-alt {
  background: var(--bg-2);
}

.bg-dark {
  background: var(--dark-bg);
  color: var(--on-dark);
}

.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
  color: var(--on-dark);
}

.bg-dark p {
  color: var(--on-dark-muted);
}

/* ---- Section header ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.bg-dark .eyebrow {
  color: var(--accent-2);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head {
  max-width: 660px;
  margin-bottom: var(--sp-7);
}

.section-head.compact {
  margin-bottom: var(--sp-5);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head .eyebrow {
  margin-bottom: var(--sp-4);
}

.section-head h2 {
  margin-bottom: var(--sp-4);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--muted);
}

.grad-text {
  background: var(--grad-text);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- Buttons ---- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.85rem 1.4rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  box-shadow: 0 14px 30px -12px rgba(255, 106, 80, 0.6);
}

.btn-primary:hover {
  --btn-bg: var(--accent-2);
  box-shadow: 0 18px 38px -12px rgba(255, 106, 80, 0.7);
}

.btn-ghost {
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--brand-3);
}

.btn-on-dark {
  --btn-fg: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.btn-on-dark:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 0.6rem 1.05rem;
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: 1rem 1.7rem;
  font-size: var(--fs-body);
}

/* ---- Pills / badges ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 106, 80, 0.18);
}

.pill.on-dark {
  background: rgba(255, 255, 255, 0.07);
  color: var(--on-dark);
  border: 1px solid var(--dark-line);
}

.badge {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.03em;
  background: var(--brand);
  color: #fff;
}

/* ---- a11y ---- */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: var(--fw-semibold);
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Reveal-on-scroll ----
   The hidden state is gated behind `.js` (set by an inline <head> script before
   stylesheets load). With no JS — or if the observer never fires — content stays
   fully visible instead of collapsing to opacity:0. home.js also runs a failsafe
   that reveals everything after ~1.2s. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.js .reveal[data-delay="1"] {
  transition-delay: 0.08s;
}

.js .reveal[data-delay="2"] {
  transition-delay: 0.16s;
}

.js .reveal[data-delay="3"] {
  transition-delay: 0.24s;
}

@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;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
