/* ericfreeburg.com — shared foundations and interior page language.
   Structural paper/header/footer geometry belongs only in atlas-chrome.css. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/Archivo-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Archivo Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/ArchivoExtraCondensed-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/SourceSerif4-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/SourceSerif4-Italic.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #fff;
  --paper: #fff;
  --ink: #131311;
  --ink-bright: #050505;
  --ink-muted: #605e57;
  --hairline: rgba(19, 19, 17, 0.18);
  --hairline-strong: rgba(19, 19, 17, 0.36);

  --c-cypress: #55705b;
  --c-legacy: #df513f;
  --c-research: #5574aa;
  --c-artifact: #8c6c91;
  --c-meta: #5e5e5a;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo Condensed", "Arial Narrow", sans-serif;
  --type-caption: clamp(0.525rem, 0.5rem + 0.05vw, 0.5625rem);
  --type-label: clamp(0.625rem, 0.59rem + 0.08vw, 0.6875rem);
  --type-small: clamp(0.75rem, 0.72rem + 0.08vw, 0.8125rem);
  --type-lead: clamp(1.15rem, 0.95rem + 0.45vw, 1.45rem);
  --tracking-label: 0.11em;
  --tracking-display: -0.035em;
  --leading-display: 0.86;
  --leading-lead: 1.42;
  --page-pad: clamp(1.25rem, 3vw, 3rem);
  --atlas-content-max-inline-size: 80rem;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  /* Two drawn corners, never a font glyph: safe from emoji substitution. */
  --atlas-open-marker:
    linear-gradient(currentColor, currentColor) right top / 72% 1px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 1px 72% no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 72% 1px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 1px 72% no-repeat;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: color-mix(in srgb, var(--bg) 94%, var(--ink));
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-kerning: normal;
  font-synthesis: none;
  font-optical-sizing: auto;
  font-variant-ligatures: common-ligatures contextual;
  overscroll-behavior: none;
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: clip;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

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

.atlas-main {
  width: 100%;
  max-width: var(--atlas-content-max-inline-size);
  min-height: 72vh;
  margin-inline: auto;
  padding: clamp(7rem, 11vw, 9rem) var(--page-pad) clamp(5rem, 9vw, 8rem);
}

.atlas-main h1 {
  max-width: 8ch;
  font-family: var(--display);
  font-size: clamp(5.5rem, 12.5vw, 14rem);
  font-weight: 600;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  color: var(--ink-bright);
}

@media (max-width: 820px) {
  :root {
    --page-pad: 1rem;
  }

  html {
    scroll-behavior: auto;
  }

  .atlas-main {
    padding-top: calc(6rem + env(safe-area-inset-top));
  }

  .atlas-main h1 {
    max-width: 100%;
    font-size: clamp(4.15rem, 20vw, 7.5rem);
    line-height: 0.84;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
