/* Shared typography, layout, and controls for 1PageStudio pages. */

@font-face {
  font-family: Geist;
  src: url("/assets/fonts/geist.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f7f6f0;
  --surface: #fffefa;
  --panel: #eeede6;
  --ink: #1a1b23;
  --dark: #191b29;
  --light-ink: #f9f8f3;
  --dark-muted: #d2d1de;
  --muted: #51515d;
  --line: #d9d7d0;
  --control-line: #86848c;
  --dark-line: #575767;
  --action: #293dc1;
  --action-hover: #2132a6;
  --action-pressed: #192782;
  --focus: #293dc1;
  --error: #992d26;
  --success: #145740;
  --font-body: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-width: 75rem;
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --gap: clamp(1rem, 3vw, 2rem);
  --section-space: clamp(3.25rem, 7vw, 6.5rem);
  --radius: 0.5rem;
  --header-height: 4.375rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-padding-top: calc(var(--header-height) + 1rem); }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}
h1, h2, h3, p, figure, ul, ol { margin: 0; }
h1, h2, h3 { min-width: 0; overflow-wrap: break-word; text-wrap: balance; font-weight: 600; }
h2 { font-size: clamp(2.125rem, 4.5vw, 4rem); line-height: 1.04; letter-spacing: -0.06em; font-weight: 625; }
h3 { font-size: clamp(1.125rem, 2vw, 1.475rem); line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.24em; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
ul[role="list"] { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.site-footer :focus-visible { outline-color: var(--light-ink); }

.container { width: min(calc(100% - 2 * var(--gutter)), var(--max-width)); margin-inline: auto; }
.section { padding-block: var(--section-space); }
.section-head { max-width: 41rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section-head p { max-width: 50ch; margin-top: 0.875rem; color: var(--muted); }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: clip;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: var(--gutter);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
}

.btn {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.125rem;
  border: 1px solid var(--action);
  border-radius: var(--radius);
  background: var(--action);
  color: var(--light-ink);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { background: var(--action-pressed); }
.btn:disabled, .btn[aria-disabled="true"] {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: wait;
}

.site-header { z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-height); }
.brand { display: inline-flex; gap: 0.625rem; align-items: center; flex: none; text-decoration: none; }
.brand img { width: 2rem; height: 2rem; filter: grayscale(1); }
.brand-name { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.045em; white-space: nowrap; }

.site-footer { padding-block: 3rem 1rem; background: var(--dark); color: var(--light-ink); }

@media (hover: hover) {
  .btn:not(:disabled):hover { background: var(--action-hover); }
  .btn:not(:disabled):active { background: var(--action-pressed); }
}

@media (max-width: 900px) {
  :root { --header-height: 4rem; }
}

@media (max-width: 540px) {
  .brand { gap: 0.375rem; }
  .brand img { width: 1.5rem; height: 1.5rem; }
  .brand-name { font-size: 1rem; }
}

@media (max-width: 360px) {
  .brand img { width: 1.25rem; height: 1.25rem; }
  .brand-name { font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
