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

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  background-color: #0b2e2b;
}

/* Soft crossfade between pages (Chromium) — avoids hard white cut */
@supports (view-transition-name: none) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.16s;
    animation-timing-function: var(--ease, ease);
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.page-home {
  background: var(--brand-bg);
}

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

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

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

a,
button,
[role="button"],
.chip,
.tab,
label[for],
input[type="color"],
input[type="range"],
summary {
  cursor: pointer;
}

:disabled,
[aria-disabled="true"],
.is-disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.55;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  font-weight: 600;
  color: var(--text);
}

p {
  margin: 0 0 1em;
}

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

::selection {
  background: rgba(228, 184, 74, 0.35);
  color: #000;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 calc(var(--space) * 1.5);
}

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

.section {
  padding: calc(var(--space) * 8) 0;
}

.section-tight {
  padding: calc(var(--space) * 5) 0;
}

.page-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  color: var(--text);
}

@media (min-width: 900px) {
  .page-shell {
    padding-bottom: 0;
  }
  .section {
    padding: calc(var(--space) * 10) 0;
  }
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: calc(var(--space) * 1.5);
  max-width: 18ch;
}

.section-lead {
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: calc(var(--space) * 4);
  font-size: 1.05rem;
}

/* Visible by default — only hide below-fold after JS marks in-view items */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

html.has-reveal .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(10px);
}

html.has-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.banner-fade {
  animation: banner-fade 0.35s var(--ease) both;
}

@keyframes banner-fade {
  from { opacity: 0.92; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.has-reveal .reveal:not(.is-visible),
  .reveal,
  .banner-fade,
  .hero-brand-stamp,
  .hero-title,
  .hero-cta-row,
  .config-panel {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  @supports (view-transition-name: none) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
      animation: none !important;
    }
  }
}
