/* =============================================================================
   base.css: reset, the type roles of dna/TYPE.md (formulas as written, Inter Tight / Instrument Serif), containers, the
   focus ring, the skip link. Every colour and family is a token (tokens.css).
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  font-size: .667vw;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; height: 100vh; }
html.lenis-wheeling { pointer-events: none; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.5rem;       /* 14.4px at 1440 (the template's 1vw) */
  overflow-x: clip;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: rgba(11, 35, 64, .22); color: var(--navy); }

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

/* focus ring: two tone, so it clears a light ground and the navy surfaces without any selector knowing which it is on */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ivory); border-radius: 2px; }
.head__cta:focus-visible, .mega-mask:focus-visible { outline-color: var(--ivory); box-shadow: 0 0 0 6px var(--navy); }

.skip { position: absolute; left: 12px; top: -80px; z-index: 3000; background: var(--navy); color: var(--ivory); padding: 12px 18px; font-weight: 500; transition: top .18s ease; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- type roles (TYPE.md) */
.title { margin: 0; font-family: var(--display); font-weight: 500; color: inherit; }
.display { line-height: 1.1; position: relative; }
.display.--5xlarge { font-family: var(--serif); font-weight: 400; font-size: 37.5vw; line-height: 1.01; letter-spacing: normal; }
.display.--4xlarge { font-family: var(--serif); font-weight: 400; font-size: 16.667vw; line-height: 1.2; letter-spacing: .2em; }
.display.--3xlarge { font-size: 11.667vw; line-height: .7; letter-spacing: -.04em; }
.display.--2xlarge { font-size: 7.5vw; line-height: .85; letter-spacing: -.06em; }
.display.--xlarge { font-size: 5vw; line-height: .95; letter-spacing: -.04em; }
.display.--xlarge.--serif, .title.--serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.05em; }
.display.--large { font-size: 3.75vw; line-height: .95; letter-spacing: -.04em; }
.display.--medium { font-size: 3.333vw; line-height: .95; letter-spacing: -.04em; font-weight: 400; }
.display.--small { font-size: 2.5vw; line-height: 1; letter-spacing: -.04em; font-weight: 400; }
.display.--small.--bold { font-weight: 500; }
.display.--xsmall { font-size: 2.083vw; line-height: 1; letter-spacing: -.04em; font-weight: 400; }
.display b, .display strong, .title b { font-weight: inherit; color: var(--accent); }

.text { font-family: var(--display); font-weight: 400; letter-spacing: -.02em; position: relative; }
.text.--xlarge { font-size: 1.667vw; line-height: 1.2; }
.text.--large { font-size: 1.25vw; line-height: 1.25; }
.text.--large.--bold, .text.--bold { font-weight: 500; }
.text.--medium { font-size: 1vw; line-height: 1.2; }
.text.--small { font-size: .917vw; line-height: 1; font-weight: 500; }
.text.--xsmall { font-size: .75vw; line-height: 1.2; }
.text.--uppercase { text-transform: uppercase; font-weight: 700; }

.label { font-family: var(--display); font-size: 1vw; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; color: var(--quiet); }
.label.--small { font-size: .75vw; color: var(--navy); }

.display .word, .display .line { display: block; }
.display .word { display: inline-block; }
[data-fill] .word, [data-fill] .char { display: inline-block; }

@media (max-width: 1100px) {
  .display.--5xlarge { font-size: min(38.889vw, 154.35px); }
  .display.--4xlarge { font-size: min(38.889vw, 154.35px); }
  .display.--3xlarge { font-size: min(20vw, 79.38px); }
  .display.--2xlarge { font-size: min(15.556vw, 61.74px); }
  .display.--xlarge { font-size: min(12.222vw, 48.51px); }
  .display.--large { font-size: min(8.889vw, 35.28px); }
  .display.--medium { font-size: min(7.778vw, 30.87px); }
  .display.--small { font-size: min(6.667vw, 26.46px); line-height: 1.2; }
  .display.--xsmall { font-size: min(5.556vw, 22.05px); }
  .text.--xlarge { font-size: min(5vw, 19.845px); }
  .text.--large { font-size: min(3.889vw, 15.435px); }
  .text.--medium { font-size: min(3.889vw, 15.435px); letter-spacing: .02em; }
  .text.--small { font-size: min(3.333vw, 13.23px); }
  .text.--xsmall { font-size: min(3.056vw, 12.13px); }
  .label { font-size: min(3.889vw, 15.435px); }
  .label.--small { font-size: min(3.056vw, 12.13px); }
  body { font-size: min(3.889vw, 15.435px); }
}

/* ---------------------------------------------------------------- containers (DETAILS tokens) */
.container { width: 96.667vw; margin: 0 auto; position: relative; }
.container.--xsmall { width: 70vw; }
.container.--small { width: 80vw; }
.container.--medium { width: 90vw; }
@media (max-width: 1100px) {
  .container { width: calc(100% - min(5vw, 19.845px)); }
  .container.--medium { width: calc(100% - min(10vw, 39.69px)); }
  .container.--small { width: calc(100% - min(30vw, 119px)); }
  .container.--xsmall { width: calc(100% - min(40vw, 158.8px)); }
}

.views { position: relative; }
.view { position: relative; background: var(--ground); }
main { display: block; }

.grain { position: absolute; inset: 0; pointer-events: none; opacity: .28; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .03  0 0 0 0 .03  0 0 0 0 .3  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
