/* utils.css — reset, design tokens, base typography, buttons, shared utilities (Altomirel) */

@font-face {
  src:url('../fonts/oswald.woff2') format('woff2');
  font-family:'Oswald';
  font-weight:400 700;
  font-style:normal;
  font-display:swap;
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  src:local('Arial');
  font-family:'Oswald Fallback';
  size-adjust:81%;
  ascent-override:148%;
}
@font-face {
  src:url('../fonts/merriweather-sans.woff2') format('woff2');
  font-family:'Merriweather Sans';
  font-weight:400 700;
  font-style:normal;
  font-display:swap;
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  src:local('Arial');
  font-family:'Merriweather Sans Fallback';
  size-adjust:104%;
  ascent-override:94%;
}

:root {
  --color-surface: rgb(255, 255, 255);
  --color-tint: rgb(238, 241, 245);
  --color-tint-accent: rgb(236, 232, 240);
  --color-line: rgb(208, 214, 221);
  --color-text-soft: rgb(94, 102, 113);
  --color-text: rgb(23, 25, 29);
  --color-dark: rgb(32, 26, 34);
  --color-text-invert: rgb(220, 224, 230);
  --color-text-invert-soft: rgb(171, 178, 188);
  --color-accent: rgb(132, 64, 94);

  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;

  --font-head: 'Oswald', 'Oswald Fallback', Arial, sans-serif;
  --font-body: 'Merriweather Sans', 'Merriweather Sans Fallback', Arial, sans-serif;

  --wrap-max: 1200px;
  --radius-card: 20px;   /* corners axis: large 16-24px */
  --radius-pill: 999px;  /* buttons axis: full pill */
  --shadow-hard: 8px 8px 0 var(--color-line); /* hard offset shadow-plate */
  --shadow-accent: 8px 8px 0 var(--color-accent);
}

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

html {
  scroll-padding-top: 132px; /* sticky header height, folds with scroll-margin on targets */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;

  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);

  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

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

svg {
  display: block;
}

h1,
h2,
h3,
h4 {
  margin: 0;

  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3rem); /* restrained hero scale per axis */
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem);
}

h3 {
  font-size: 1.22rem;
}

p {
  margin: 0 0 var(--space-sm);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

/* tabular figures everywhere numbers appear as data */
.alto-num {
  font-family: var(--font-head);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.alto-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0 0 var(--space-sm);

  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em; /* loose spacing on small labels per axis */
  text-transform: uppercase;
  color: var(--color-accent);
}

.alto-eyebrow::after {
  content: "";
  flex: 1;

  height: 2px;

  background: var(--color-line);
}

/* outline-text treatment reserved for large display headings */
.alto-outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--color-accent);
}

.alto-lede {
  max-width: 54ch;

  font-size: 1.12rem;
  color: var(--color-text-soft);
}

/* buttons — full pill, single accent */
.alto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 48px;
  padding: 12px 26px;

  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;

  border: 2px solid var(--color-accent);
  border-radius: var(--radius-pill);
  cursor: pointer;

  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.alto-btn-primary {
  color: var(--color-surface);

  background: var(--color-accent);
}

.alto-btn-primary:hover {
  transform: translateY(-2px);

  background: rgb(104, 50, 74); /* darker accent for hover depth */
  border-color: rgb(104, 50, 74);
}

.alto-btn-ghost {
  color: var(--color-accent);

  background: transparent;
}

.alto-btn-ghost:hover {
  color: var(--color-surface);

  background: var(--color-accent);
}

.alto-btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* reveal animation (io-reveal, state out/here) only once JS is present */
.js-yes .alto-reveal.out {
  opacity: 0;
  transform: translateY(18px);
}

.js-yes .alto-reveal.here {
  opacity: 1;
  transform: none;

  transition: opacity 0.5s ease, transform 0.5s ease;
}

.alto-visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;

  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .js-yes .alto-reveal.out,
  .js-yes .alto-reveal.here {
    opacity: 1;
    transform: none;

    transition: none;
  }
}
