/**
 * Rentium base stylesheet — reset, fonts, typography, nav, footer.
 * Tokens come from tokens.css; no raw colour values below.
 */

/* ── Fonts ──────────────────────────────────────────────────────────────────
   Self-hosted and subset to Latin (1.6 MB of TTF → 73 KB of woff2 across three
   weights). DESIGN_SYSTEM.md §1: never rely on a runtime font fetch.
   Only 400/500/600 ship — the marketing surface uses no heavier weight. */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Digits share a fixed width so money and KPI columns never jitter
     (DESIGN_SYSTEM.md §1). */
  font-variant-numeric: tabular-nums;
}

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

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

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ── Accessibility ───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Parked above the viewport rather than at left:-9999px, so it never widens
   the document or trips the layout audit in tools/shot.mjs. */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--surface-inverse);
  color: var(--text-inverse-primary);
  border-radius: 0 0 var(--radius-card-sm) 0;
  transform: translateY(-120%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  transform: none;
}

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

/* Respect users who ask for less motion (DESIGN_SYSTEM.md §9). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Type scale (LandingTypography) ──────────────────────────────────────── */
.t-display {
  font-size: var(--t-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--text-primary);
}

.t-headline {
  font-size: var(--t-headline);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text-primary);
}

.t-subhead {
  font-size: var(--t-subhead);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.55;
  color: var(--text-secondary);
}

.t-body {
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-secondary);
}

.t-label {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-accent);
}

.t-mono {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Nav is fixed; give the first section room to breathe beneath it. */
main {
  padding-top: 96px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* ≥44px hit area (DESIGN_SYSTEM.md §9) even though the visual is smaller. */
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--surface-inverse);
  color: var(--text-inverse-primary);
}
.btn--primary:hover {
  background: #2a2a2d;
}

.btn--accent {
  background: var(--surface-accent-subtle);
  color: var(--text-primary);
  border: 1px solid var(--gold);
}
.btn--accent:hover {
  background: var(--gold);
}

/* ── Nav (haven_nav.dart) ────────────────────────────────────────────────────
   Floating frosted pill. BackdropFilter(sigma 28) → backdrop-filter blur(28px).
   Flutter switched the fill on scroll past 80px; a small IntersectionObserver
   in nav.js reproduces that by toggling .is-scrolled. */
.nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  /* Pad the rail rather than sizing the pill off 100vw — 100vw includes the
     scrollbar gutter and pushed the pill 2px past the viewport edge. */
  padding-inline: 16px;
  pointer-events: none;
}

.nav__pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px;
  max-width: 100%;
  border-radius: var(--radius-pill);
  background: var(--surface-glass-chrome);
  border: 1px solid var(--border-glass-inner);
  box-shadow: var(--shadow-glass-float);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  transition: background-color var(--dur-slow) var(--ease-out-quart);
}

.nav.is-scrolled .nav__pill {
  background: rgba(255, 255, 255, 0.38);
}

.nav__logo {
  display: flex;
  align-items: center;
  padding-inline: 16px;
}
.nav__logo img {
  height: 24px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
}

.nav__link {
  position: relative;
  padding: 8px 14px 11px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color var(--dur-base) var(--ease-out);
}
.nav__link:hover {
  color: var(--text-primary);
}

/* Active-tab marker: an 18px gold underline that grows from 0. */
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  translate: -50% 0;
  height: 2px;
  width: 0;
  border-radius: 1px;
  background: var(--gold);
  transition: width var(--dur-base) var(--ease-out);
}
.nav__link[aria-current='page'] {
  color: var(--text-primary);
  font-weight: 600;
}
.nav__link[aria-current='page']::after {
  width: 18px;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.nav__toggle {
  display: none;
  padding: 10px 12px;
  min-height: 44px;
  align-items: center;
}

/* ── Mobile nav ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .nav__links,
  .nav__actions .btn--accent {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .nav__pill {
    width: 100%;
    justify-content: space-between;
  }
}

/* Slide-down sheet, mirroring the Flutter modal bottom sheet's link list. */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(10, 10, 11, 0.4);
}
.mobile-menu[data-open='true'] {
  display: block;
}

.mobile-menu__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--chalk);
  border-radius: 24px 24px 0 0;
  animation: sheet-up var(--dur-base) var(--ease-out-quart);
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.mobile-menu__grabber {
  width: 36px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 2px;
  background: var(--text-secondary);
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding-inline: 12px;
  font-size: 16px;
  color: var(--text-primary);
}
.mobile-menu__link[aria-current='page'] {
  font-weight: 600;
}
.mobile-menu__link[aria-current='page']::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.mobile-menu__cta {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
  font-size: 15px;
}

/* ── Footer (marketing_footer.dart) ──────────────────────────────────────── */
.footer {
  background: var(--surface-inverse);
  color: var(--text-inverse-muted);
  padding-block: 56px;
}

@media (min-width: 768px) {
  .footer {
    padding-block: 80px;
  }
}

.footer__top {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer__top {
    /* Brand column is twice as wide as each link column (Flutter flex 4 : 2). */
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 32px;
  }
}

.footer__brand img {
  height: 30px;
  width: auto;
}

.footer__blurb {
  max-width: 240px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-inverse-muted);
}

.footer__col-title {
  margin-bottom: 16px;
  color: var(--text-accent);
}

.footer__col li + li {
  margin-top: 12px;
}

.footer__link {
  font-size: 14px;
  color: var(--text-inverse-muted);
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__link:hover {
  color: var(--text-inverse-primary);
}

.footer__divider {
  height: 1px;
  margin-block: 56px 24px;
  background: var(--border-glass-inner);
  border: 0;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer__bottom-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer__tagline {
  font-style: italic;
}

.footer__admin {
  font-family: var(--font-mono);
  font-size: 13px;
}
