/* scalessio.com
   Tokens from docs/design-system/theme-scalessio.css. Component rules use variables only.

   Fallback metrics so Arial occupies the same box as the webfont. Measured with fontTools.
   Webfonts use OS/2 typo metrics (USE_TYPO_METRICS). Arial uses hhea (that bit is off).
   Width is OS/2 xAvgCharWidth.
   size-adjust = (xAvg / UPM) / (fallback xAvg / fallback UPM)
   ascent-override = (ascent / UPM) / size-adjust
   descent-override = (|descent| / UPM) / size-adjust
   line-gap-override is 0% because these webfonts have no line gap and Arial has one.
   xAvgCharWidth made Arial wider than the Latin we set (Anton 273px vs 248px,
   body 852px vs 688px). size-adjust is scaled to those advances, and the
   vertical overrides by the inverse, so the ascent in pixels stays put.

   Anton     UPM 2048  ascent 2409  descent 674  lineGap 0  xAvg 938
   Sans 400  UPM 1000  ascent  970  descent 250  lineGap 0  xAvg 564
   Sans 600  UPM 1000  ascent  970  descent 250  lineGap 0  xAvg 576
   Arial     UPM 2048  ascent 1854  descent 434  lineGap 67 xAvg 904
   Arial Bold UPM 2048 ascent 1854  descent 434  lineGap 67 xAvg 980
*/

:root {
  color-scheme: dark;

  --surface: #0d0d0b;
  --surface-raised: #171714;
  --ink: #f5f4f0;
  --ink-muted: #9a978d;
  --line: #262622;
  --accent: #c49a3c;
  --focus: #c49a3c;

  --font-display: Anton, "Anton Fallback", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-sans: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-24: 96px;

  --container: 1200px;
  --gutter: 20px;
  --header-height: 72px;
  --legal-measure: 880px;
  --hairline: 1px;
  --focus-width: 2px;
  --pad-end: 120px;

  --text-size: 17px;
  --text-leading: 28px;
  --label-size: 13px;
  --label-leading: 20px;
  --h2-size: 24px;
  --h2-leading: 32px;
  --h2-tracking: -0.01em;
  --chapeau-size: clamp(20px, 2vw, 22px);
  --chapeau-leading: 1.5;
  --chapeau-measure: 44ch;
  --title-size: clamp(40px, 6vw, 64px);
  --title-leading: 1;

  --wordmark-s: 28px;
  --wordmark-hero: clamp(64px, 10vw, 144px);
  --wordmark-leading: 0.9;
  --wordmark-tracking: 0.01em;
  --dot-size: 0.2em;
  --dot-gap: 0.05em;

  --hero-pad-top: clamp(96px, 10vw, 144px);
  --mail-size: clamp(24px, 3vw, 36px);
  --mail-leading: 1.2;
  --mail-tracking: -0.02em;
  --mail-rule: 2px;
  --mail-pad: 6px;
  --dl-label: 240px;

  --layer: 1;
  --duration-fast: 150ms;
  --duration-reveal: 700ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --rise-hero: 0.35em;
}

@media (min-width: 768px) {
  :root { --gutter: 40px; }
}

@font-face {
  font-family: "Anton Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 94.26%;
  ascent-override: 124.79%;
  descent-override: 34.92%;
  line-gap-override: 0%;
}

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

@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 102.26%;
  ascent-override: 94.86%;
  descent-override: 24.45%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  size-adjust: 99.77%;
  ascent-override: 97.21%;
  descent-override: 25.06%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-size);
  line-height: var(--text-leading);
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1, h2, p, dl, dd, dt { margin: 0; }

:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-width);
}

.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: content-box;
}

.skip {
  position: absolute;
  z-index: var(--layer);
  inset-inline-start: var(--gutter);
  inset-block-start: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-raised);
  color: var(--ink);
  text-decoration: none;
}

.skip:not(:focus) {
  clip-path: inset(50%);
  block-size: var(--hairline);
  inline-size: var(--hairline);
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
}

.site-header { height: var(--header-height); flex-shrink: 0; }

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  border-top: var(--hairline) solid var(--line);
}

.site-footer-line {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  line-height: var(--label-leading);
  color: var(--ink-muted);
}

.site-footer a {
  color: inherit;
  text-decoration-thickness: var(--hairline);
  text-underline-offset: var(--space-1);
}

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

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
}

.wordmark-s {
  font-size: var(--wordmark-s);
  line-height: var(--title-leading);
}

.wordmark-hero {
  font-size: var(--wordmark-hero);
  line-height: var(--wordmark-leading);
}

.wordmark-text {
  letter-spacing: var(--wordmark-tracking);
  margin-right: calc(var(--wordmark-tracking) * -1);
}

.wordmark-dot {
  display: inline-block;
  width: var(--dot-size);
  height: var(--dot-size);
  margin-left: var(--dot-gap);
  background: var(--accent);
  vertical-align: baseline;
}

.wordmark-clip {
  display: block;
  overflow: clip;
}

.wordmark-rise {
  display: inline-block;
  animation: wordmark-rise var(--duration-reveal) var(--ease-out) both;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  line-height: var(--label-leading);
  color: var(--ink-muted);
}

.eyebrow-index { color: var(--ink); }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--title-size);
  line-height: var(--title-leading);
  letter-spacing: var(--wordmark-tracking);
  text-transform: lowercase;
}

.accent { color: var(--accent); }

.hero { padding: var(--hero-pad-top) 0 var(--space-24); }

.hero-inner,
.page-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
}

.chapeau {
  max-width: var(--chapeau-measure);
  font-size: var(--chapeau-size);
  line-height: var(--chapeau-leading);
}

.band { padding-bottom: var(--space-24); }

.x-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
}

@media (min-width: 900px) {
  .x-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-12);
  }
}

.x-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: var(--hairline) solid var(--line);
}

.x-label,
.contact-title {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  line-height: var(--label-leading);
  font-weight: 400;
  color: var(--ink-muted);
}

.x-text { font-size: var(--text-size); line-height: var(--text-leading); }

.x-text strong { font-weight: 600; }

.arrow {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.arrow-icon {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-out);
}

.arrow:hover .arrow-icon { transform: translateX(var(--space-1)); }

.contact { padding-bottom: var(--pad-end); }

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.mail {
  font-weight: 600;
  font-size: var(--mail-size);
  line-height: var(--mail-leading);
  letter-spacing: var(--mail-tracking);
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% var(--mail-rule) no-repeat;
  padding-bottom: var(--mail-pad);
  overflow-wrap: anywhere;
}

.mail:hover { color: var(--accent); }

.page { padding: var(--space-24) 0 var(--pad-end); }

.legal-col { max-width: var(--legal-measure); }

.legal h2 {
  margin: var(--space-12) 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--h2-size);
  line-height: var(--h2-leading);
  font-weight: 600;
  letter-spacing: var(--h2-tracking);
}

.legal p,
.legal dd {
  font-size: var(--text-size);
  line-height: var(--text-leading);
}

.legal p { margin-bottom: var(--space-3); }

.legal a {
  color: var(--accent);
  text-decoration-thickness: var(--hairline);
  text-underline-offset: var(--space-1);
}

.legal dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 760px) {
  .legal dl {
    grid-template-columns: var(--dl-label) minmax(0, 1fr);
    column-gap: var(--space-8);
  }
}

.legal dt {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  line-height: var(--text-leading);
  color: var(--ink-muted);
}

.legal dd { margin-bottom: var(--space-3); }

.legal p.legal-note {
  margin: var(--space-12) 0 0;
  font-family: var(--font-mono);
  font-size: var(--label-size);
  line-height: var(--label-leading);
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: reduce) {
  .wordmark-rise { animation: none; }
  .arrow-icon { transition: none; }
}

@keyframes wordmark-rise {
  from { transform: translateY(var(--rise-hero)); }
  to { transform: translateY(0); }
}
