/* =========================================================================
   BASE — reset, document defaults, typography, and layout primitives.
   Depends on: tokens.css
   ========================================================================= */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  overflow-x: hidden;
}

/* Slim, on-brand scrollbars (fixes the chunky default that reads as a visual
   bug, especially inside the rounded quote dialog). */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background-color: var(--c-concrete-300);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: var(--c-concrete-400);
  background-clip: content-box;
}
html,
.modal__dialog {
  scrollbar-width: thin;
  scrollbar-color: var(--c-concrete-300) transparent;
}

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

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

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-heading);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-5xl);
}
h2 {
  font-size: var(--text-4xl);
}
h3 {
  font-size: var(--text-2xl);
}
h4 {
  font-size: var(--text-xl);
}
h5 {
  font-size: var(--text-lg);
}

p {
  margin-block: 0 var(--space-4);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-accent-ink);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent);
}

strong,
b {
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
}

ul,
ol {
  padding-inline-start: 1.1em;
  margin-block: 0 var(--space-4);
}

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

small {
  font-size: var(--text-sm);
}

/* ---------------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-pad-y);
}

.section--tight {
  padding-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);
}

.section--alt {
  background-color: var(--color-surface-alt);
}

/* Concrete + grass texture: a grounded, tactile mid-page moment.
   Featured behind the "Why Galaxia" / craftsmanship section. */
.section--textured {
  position: relative;
  background:
    linear-gradient(180deg, rgba(239, 237, 232, 0.9), rgba(239, 237, 232, 0.82)),
    url("../img/concrete-bg.jpg") center top / cover no-repeat;
  background-color: var(--color-surface-alt);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-on-dark);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #fff;
}

.section--dark p {
  color: rgba(244, 242, 238, 0.82);
}

/* Keep strong text and links legible on dark backgrounds */
.section--dark strong,
.section--dark b,
.cta-band strong,
.cta-band b {
  color: #fff;
}

.section--dark a:not(.btn) {
  color: var(--c-brand-200);
}

.section--dark a:not(.btn):hover {
  color: #fff;
}

/* ---------------------------------------------------------------------
   Section headers (eyebrow + title + lead)
   --------------------------------------------------------------------- */
.section-header {
  max-width: 720px;
  margin-bottom: var(--space-8);
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--color-accent-ink);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: var(--radius-pill);
}

.section-header--center .eyebrow::before {
  display: none;
}

.lead {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--color-muted);
  line-height: var(--leading-relaxed);
}

.section--dark .eyebrow {
  color: var(--c-brand-200);
}

/* ---------------------------------------------------------------------
   Utilities
   --------------------------------------------------------------------- */
.text-center {
  text-align: center;
}
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background-color: var(--color-dark);
  color: #fff;
  border-radius: var(--radius-md);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-3);
}

/* Focus visibility for keyboard users */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
