/* ==========================================================================
   base.css — reset, element defaults, layout primitives
   ========================================================================== */

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

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

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

/* Display type carries the personality. */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 460;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-display);
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--text-h2);
}
h3 {
  font-size: var(--text-h3);
  font-weight: 500;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
  transition: color var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

strong {
  font-weight: 600;
}

hr,
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-6) 0;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Layout primitives */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* clip (not hidden) contains full-bleed breakouts without creating a scroll
   container — so position: sticky on the header keeps working. */
main {
  overflow-x: clip;
}

/* Content padding lives on the wrap, not <main>, so a full-bleed {% block hero %}
   can sit flush at the top while every other page keeps its usual rhythm. */
.page-content {
  padding-block: var(--space-8);
}

/* Vertical rhythm between stacked sections. */
section + section {
  margin-top: var(--space-8);
}

/* Eyebrow label — the recurring small-caps motif. */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--ink-3);
  margin: 0 0 var(--space-4);
}
.eyebrow::after {
  content: "";
  display: block;
  width: 2.5rem;
  border-top: 1px solid var(--line-strong);
  margin-top: var(--space-3);
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
}

.note {
  color: var(--ink-3);
  font-size: var(--text-sm);
}

/* A note that reports a failure — a payment we couldn't take, say. Same
   restraint as .alert.err in components.css: --danger is the one non-neutral
   in the system, and a left rule is enough to separate it from ordinary
   .muted/.note copy without shouting. */
.note-error {
  color: var(--danger);
  border-left: 2px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  padding-left: var(--space-3);
}

/* Collapsed "if you need to cancel" terms under the deposit CTA. */
.refund-terms {
  margin-block: var(--space-5);
  font-size: var(--text-sm);
}
.refund-terms > summary {
  cursor: pointer;
  color: var(--ink-2);
}
.refund-terms > summary:hover {
  color: var(--ink);
}
.refund-terms > *:not(summary) {
  margin-top: var(--space-3);
}

/* --- Buttons ------------------------------------------------------------- */
/* Moved from components.css: the public shell AND the staff shell both link
   base.css, but components.css is public-only marketing furniture (hero,
   testimonials, footer) that the staff area deliberately does not load. See
   docs/plans/ for the shell split. The .btn/.cta overrides left behind in
   components.css (.hero-full .btn, .cta-band .cta-band__btn, header.site nav
   .cta) are all two selectors deep, so they out-specify this base rule and
   win regardless of which file it lives in or which order the two are linked.
   `.cta-band__btn` used to be a single class here — a specificity TIE with
   .btn, decided by source order alone — and was scoped to fix exactly that. */
.btn,
.cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  padding: 0.72em 1.25em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.btn:hover,
.cta:hover {
  text-decoration: none;
  opacity: 0.88;
}
.btn:active,
.cta:active {
  transform: translateY(1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--bg);
  opacity: 1;
}
