/* Site-wide base: type, links, buttons, surfaces, motion. Brand values come from /brand/tokens.css. */

:root {
  /* Tints mixed from brand colors only, so no new colors enter the palette */
  --text-secondary: color-mix(in srgb, var(--color-stone) 72%, var(--color-ink));
  --text-muted: color-mix(in srgb, var(--color-stone) 58%, var(--color-ink));
  --rule-on-ink: color-mix(in srgb, var(--color-stone) 14%, var(--color-ink));
  --surface-lifted: color-mix(in srgb, var(--color-stone) 7%, var(--color-ink-raised));
  --text-on-stone-secondary: color-mix(in srgb, var(--color-ink) 80%, var(--color-stone));
  --rule-on-stone: color-mix(in srgb, var(--color-ink) 16%, var(--color-stone));
  --page-width: 1280px;
  --gutter: 40px;
  --section-space: 8rem;
  --header-height: 76px;
  --radius-card: 16px;
  --ease-soft: cubic-bezier(.3, .3, .3, 1);
  --ease-out: cubic-bezier(0, .7, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-padding-top: var(--header-height); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-ink);
  color: var(--color-stone);
  font: var(--weight-body) var(--text-16) / var(--leading-body) var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-water-lit); transition: color .3s var(--ease-soft), background-color .3s var(--ease-soft), border-color .3s var(--ease-soft); }
:focus-visible { outline: 2px solid var(--color-water-lit); outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
p, li { text-wrap: pretty; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-variant-numeric: lining-nums;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(var(--text-48), 6.2vw, 5.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(var(--text-36), 4vw, var(--text-48)); }
h3 { font-size: var(--text-24); line-height: 1.2; letter-spacing: -0.01em; }

.wrap { max-width: var(--page-width); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-space); }
.section-raised { background: var(--color-ink-raised); }

/* Small label above a section heading: sentence case, quiet */
.kicker { display: block; margin: 0 0 var(--space-16); font-size: var(--text-14); font-weight: var(--weight-strong); color: var(--color-water-lit); }
.section-head { max-width: 46rem; margin-bottom: var(--space-64); }
.section-head p { margin: var(--space-24) 0 0; font-size: var(--text-18); line-height: 1.6; color: var(--text-secondary); }
.section-head-center { margin-inline: auto; text-align: center; }

.skip-link { position: absolute; left: var(--space-16); top: -100px; z-index: 3; padding: var(--space-12) var(--space-16); background: var(--color-stone); color: var(--color-ink); }
.skip-link:focus { top: var(--space-16); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: 48px;
  padding: 0 var(--space-24);
  border-radius: var(--radius-control);
  font-size: var(--text-16);
  font-weight: var(--weight-strong);
  text-decoration: none;
  white-space: nowrap;
}
.button-primary { background: var(--color-hazel); color: var(--color-ink); }
.button-primary:hover { background: color-mix(in srgb, var(--color-hazel) 80%, var(--color-stone)); color: var(--color-ink); }
.button-outline { color: var(--color-stone); box-shadow: inset 0 0 0 1px var(--text-muted); }
.button-outline:hover { background: var(--color-stone); color: var(--color-ink); }
.button-stone { background: var(--color-stone); color: var(--color-ink); }
.button-stone:hover { background: var(--color-water-lit); color: var(--color-ink); }
.button-large { min-height: 56px; padding: 0 var(--space-32); font-size: var(--text-18); }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16); }

/* Text link with an arrow that moves on hover */
.arrow-link { font-weight: var(--weight-strong); text-decoration: none; }
/* Joined to the last word by a no-break space, so a wrapped link never leaves the arrow alone on a line */
.arrow-link::after { content: "\00a0→"; position: relative; left: 0; margin-left: var(--space-4); transition: left .3s var(--ease-out); }
.arrow-link:hover::after, a:hover .arrow-link::after { left: 4px; }

/* The phone number is quiet text beside the main action */
.phone { color: var(--text-muted); white-space: nowrap; }
a.phone, .phone a { color: inherit; text-decoration: none; }
a.phone:hover, .phone a:hover { color: var(--color-water-lit); }

/* Stone surfaces read as paper, with a faint grain */
.paper { background: var(--color-stone) url("/assets/paper-grain.png"); color: var(--color-ink); }
.paper a { color: var(--color-water-deep); }
.paper :focus-visible { outline-color: var(--color-water-deep); }
.paper .kicker { color: var(--color-water-deep); }
.paper .section-head p { color: var(--text-on-stone-secondary); }

/* Reveal on scroll: once, gently, and only when motion is welcome and the script has run */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--reveal-delay, 0s); }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --section-space: 5rem; --header-height: 64px; }
  .section-head { margin-bottom: var(--space-48); }
}
