/* 02 — BASE, SHELL, GLOBAL COMPONENTS */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--w-regular); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-contrast); }

:focus-visible {
  outline: var(--focus-width) solid var(--accent-contextual);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  z-index: 100; padding: 0.75rem 1.25rem;
  background: var(--accent); color: var(--accent-contrast);
  font-size: var(--t-ui); transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

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

/* SECTION SHELL & RHYTHM */

.sec { position: relative; }
.sec--ink     { background: var(--ink); }
.sec--surface { background: var(--surface); }
.sec--deep    { background: var(--surface-deep); }

.sec--mid     { background: var(--mid); }

.rhythm-breath  { padding-block: var(--pad-breath); }
.rhythm-build   { padding-block: var(--pad-build); }
.rhythm-deliver { padding-block: var(--pad-deliver); }

.wrap {
  width: 100%;
  max-width: var(--c-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow  { max-width: calc(var(--c-narrow)  + var(--gutter) * 2); }
.wrap--reading { max-width: calc(var(--c-reading) + var(--gutter) * 2); }
.wrap--mid     { max-width: calc(var(--c-mid)     + var(--gutter) * 2); }

/* TYPE ROLES */

.eyebrow {
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  color: var(--fg-muted);
}

.display {
  font-family: var(--font-display);
  font-weight: var(--w-regular);
  font-size: var(--t-section);
  line-height: var(--lh-section);
  letter-spacing: var(--tr-section);
  max-width: var(--m-section);
  color: var(--fg-primary);
  text-wrap: balance;
}

.insight {
  font-family: var(--font-display);
  font-weight: var(--w-regular);
  font-size: var(--t-insight);
  line-height: var(--lh-insight);
  letter-spacing: var(--tr-insight);
  max-width: var(--m-insight);
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
  color: var(--fg-primary);
}

.lede {
  font-size: var(--t-body-lg);
  line-height: var(--lh-body-lg);
  max-width: var(--m-body-lg);
  color: var(--fg-secondary);
}

.body { max-width: var(--m-body); color: var(--fg-secondary); }
.body--strong { color: var(--fg-primary); }

.small {
  font-size: var(--t-small);
  line-height: var(--lh-small);
  max-width: var(--m-small);
  color: var(--fg-secondary);
}

.muted-line { color: var(--fg-muted); }

.bridge {
  font-size: var(--t-body);
  line-height: var(--lh-body);
  max-width: var(--m-body);
  color: var(--fg-secondary);
}
.bridge--strong { color: var(--fg-primary); }

.rule {
  height: 1px; border: 0; margin: 0;
  background: var(--rule);
}

/* CTA */

.cta {
  display: inline-flex; align-items: center; justify-content: center;
  
  text-align: center;
  min-height: 3rem;
  padding: 0.85rem 1.5rem;
  font-size: var(--t-ui);
  font-weight: var(--w-medium);
  letter-spacing: var(--tr-ui);
  line-height: var(--lh-price);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.cta--solid {
  background: var(--accent-action);
  color: var(--accent-action-text);
}

.zone--dark .cta--solid {
  background: var(--text-primary-dark);
  color: var(--ink);
}
.cta--solid:hover { background: var(--accent-action-hover); }

.cta--solid:focus-visible { outline-color: var(--ink); }

.zone--dark .cta--solid:focus-visible { outline-color: var(--highlight); }

.zone--dark .cta--solid:hover { background: var(--surface-warm); color: var(--accent-action); }

.cta--outline {
  background: transparent;
  color: var(--fg-primary);
  border-color: var(--fg-primary);
}
.cta--outline:hover, .cta--outline:focus-visible {
  background: var(--fg-primary);
  color: var(--surface);
}

.cta-block { display: flex; justify-content: center; }

/* ACCORDION PRIMITIVE (mode: single | multiple) */

.acc__item { border-top: 1px solid var(--rule); }
.acc__item:last-child { border-bottom: 1px solid var(--rule); }

.acc__trigger {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  width: 100%; min-height: 44px;
  padding-block: 1.25rem;
  text-align: left;
  color: var(--fg-primary);
}
.acc__trigger:hover .acc__q { color: var(--accent-contextual); }

.acc__q { flex: 1; transition: color var(--dur-fast) var(--ease-out); }

.acc__mark {
  flex: none; width: 1rem; height: 1rem; margin-top: 0.4em;
  position: relative; color: var(--fg-muted);
}
.acc__mark::before, .acc__mark::after {
  content: ""; position: absolute; inset: 50% 0 auto 0;
  height: 1px; background: currentColor;
}
.acc__mark::after {
  transform: rotate(90deg);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
[aria-expanded="true"] .acc__mark::after { transform: rotate(0deg); opacity: 0; }

.acc__panel { overflow: hidden; }
.acc__panel-inner { padding-bottom: 1.75rem; }
.acc__panel-inner > * + * { margin-top: 0.9em; }

/* JS-enhanced collapse. Without JS every panel stays open. */
.js .acc__panel[hidden] { display: none; }

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

html.motion-ready .reveal {
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
html.motion-ready .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(var(--shift-y));
}

html[data-no-animation="true"] .reveal,
html[data-no-animation="true"] .reveal:not(.is-in),
html[data-no-animation="true"] .s03__point {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* STICKY CTA */

.sticky { display: none; }
html.js .sticky {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 0.5rem var(--gutter);
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  transform: translateY(110%);
  transition: transform var(--dur-base) var(--ease-out);
}
.sticky.is-visible { transform: none; }
.sticky__label {
  flex: 1; min-width: 0;
  font-size: var(--t-caption);
  line-height: 1.3;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 420px) { .sticky__label { display: none; } }
.sticky .cta { min-height: 44px; padding: 0.7rem 1.1rem; font-size: var(--t-caption); }

@media (min-width: 900px) { html.js .sticky { display: none; } }

/* FOOTER */

.foot {
  background: var(--surface);
  padding-block: var(--space-md) var(--space-lg);
  font-size: var(--t-caption);
  color: var(--muted);
}
.foot__grid { display: grid; gap: 0.6rem; }
.foot__name { color: var(--text-secondary); }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.foot__links a { text-decoration: none; border-bottom: 1px solid var(--hairline); padding-bottom: 2px; }
.foot__links a:hover { border-color: var(--text-secondary); }

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, html.motion-ready .reveal:not(.is-in) {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .sticky { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
