/* ============================================================
   rawcloser.com — Base (Phase 7.A.1)
   Reset, base typography, prose defaults, focus styling, motion
   safety. No page-specific rules — those live in each page's own
   markup/components.css usage, never here.
   Consumes tokens.css only. Never hardcode a color, spacing,
   radius, type, shadow, or motion value in this file.
   ============================================================ */

/* ----- Reset ----- */
*,
*::before,
*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

/* Belt-and-braces for every [hidden] element site-wide, Phase 7.A.33. The
   UA stylesheet's own `[hidden]{display:none}` is LOW priority — it loses to
   ANY same-or-higher-specificity author rule regardless of source order,
   because origin (author beats user-agent) is decided before specificity in
   the cascade. So a component that ships `hidden` in its markup plus its own
   unconditional `display:flex`/`grid`/`block` rule (e.g. components.css
   .nav-dropdown, .modal-backdrop) silently un-hides itself unless that
   component ALSO carries its own `[selector][hidden]{display:none}`
   reassertion — which both of those happen to do today, but nothing
   enforced it, so the next component to ship `hidden` without one fails the
   same way. !important pins display:none at the top of the cascade
   regardless of what any other author rule sets, closing that gap for good
   without requiring every future component to remember its own guard. */
[hidden]{
  display:none !important;
}

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  /* Suppress the rubber-band bounce at the top/bottom of the scroll root
     (7.A.11). At the very bottom this bounce was the trailing "extra scroll"
     that retriggered the nav's compact/expand animation; with the bounce gone
     there is no overscroll for the nav handler to react to. Site-wide, on
     every page, because it lives in the shared base stylesheet. It does not
     affect normal scrolling — only the overscroll past the content edges. */
  overscroll-behavior-y:none;
}

/* Smooth in-page anchor jumps, site-wide, and only when the visitor has not
   asked to reduce motion. NOTE (7.A.15): the landing hero's "See how it works"
   anchor — this rule's former trigger — was removed with the hero's secondary
   link, and no in-page #anchor link currently exercises it. It is kept as a
   latent base default for any future anchor rather than deleted, since it is
   shared base behaviour, not hero CSS. The reduced-motion block at the bottom of
   this file additionally forces scroll-behavior:auto !important, so this is
   double-guarded. Native scrolling itself is untouched — this governs
   programmatic/anchor jumps, not wheel/trackpad/keyboard scrolling. */
@media (prefers-reduced-motion: no-preference){
  html{
    scroll-behavior:smooth;
  }
}

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

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

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

ul,
ol{
  list-style:none;
}

/* ----- Base typography ----- */
body{
  font-family:var(--font-sans);
  font-size:var(--text-base);
  font-weight:var(--weight-regular);
  line-height:var(--leading-normal);
  letter-spacing:var(--tracking-normal);
  color:var(--color-text);
  background:var(--color-bg);
  min-height:100vh;
}

h1, h2, h3, h4, h5, h6{
  font-weight:var(--weight-semibold);
  line-height:var(--leading-tight);
  letter-spacing:var(--tracking-tight);
}

/* ----- Prose defaults (legal pages: privacy, terms) ----- */
.prose{
  max-width:var(--measure-prose);
}

.prose h2{
  font-size:var(--text-xl);
  margin-top:var(--space-7);
  margin-bottom:var(--space-3);
}

.prose h3{
  font-size:var(--text-lg);
  margin-top:var(--space-6);
  margin-bottom:var(--space-2);
}

.prose p{
  margin-bottom:var(--space-4);
}

.prose ul,
.prose ol{
  margin-bottom:var(--space-4);
  padding-left:var(--space-5);
}

.prose ul{
  list-style:disc;
}

.prose ol{
  list-style:decimal;
}

.prose li{
  margin-bottom:var(--space-2);
}

.prose a{
  color:var(--color-text);
  text-decoration:underline;
  text-underline-offset:2px;
}

.prose strong{
  font-weight:var(--weight-semibold);
}

/* ----- Focus ----- */
:focus{
  outline:none;
}

:focus-visible{
  outline:2px solid var(--color-focus-ring);
  outline-offset:2px;
  border-radius:var(--radius-sm);
}

/* ----- Accessibility utilities -----
   Visually-hidden: removes an element from the visual layout while keeping it
   in the accessibility tree (a proper accessible name for an input whose
   visible design is placeholder-only, e.g. the waitlist form label). Global
   a11y primitive, not page-specific — both waitlist surfaces reuse it. The 1px
   / -1px are the standard clip-pattern structural dims, not token values. */
.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;
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce){
  :root{
    --dur-fast:0ms;
    --dur-base:0ms;
    --dur-slow:0ms;
    --dur-slower:0ms;
    /* --dur-nav (7.A.11) is zeroed here so the compact-on-scroll nav SNAPS
       between full and compact under reduced motion — the state change is
       usability, so it still happens; only the tween is dropped. It replaced
       --dur-slower on the nav, which used to give it this snap. --dur-reveal
       is deliberately NOT listed: each reveal section has its own
       transition:none guard, so it snaps without needing to be zeroed here. */
    --dur-nav:0ms;
    --stagger:0ms;
  }

  *,
  *::before,
  *::after{
    scroll-behavior:auto !important;
  }
}
