/* ==========================================================================
   NewLine Break — tokens
   Design rule: --break (the mark's coral) appears ONLY where a break happens.
   Never as a general accent. That restraint is the system.
   ========================================================================== */

:root {
  /* Tells the UA to render native controls, scrollbars and form widgets
     light, like the page. */
  color-scheme: light;

  /* Surfaces — two strata, "above" and "below" the break. The ground is the
     putty of an instrument's casing; a raised panel is a sheet laid on it. */
  --ground:     #e3e1d9;
  --strata:     #d9d6cc;
  --raised:     #f0eee8;
  --line:       #cfccc1;
  --line-lit:   #b0ad9f;

  /* Text */
  --text:       #11130f;
  --fog:        #40453e;   /* 7.5:1 on the ground */
  --fog-dim:    #50564d;   /* 5.8:1 on the ground. Tertiary rank is carried by
                              size, case and tracking, not by dropping below AA. */

  /* Signal — structure, traces, links. The solder mask of the studio's own
     boards. "Lit" is the stronger of the two, which on a light ground is the
     darker one. */
  --signal:     #124650;
  --signal-lit: #0b333c;
  --signal-dim: rgba(18, 70, 80, 0.12);
  --on-signal:  #ffffff;   /* the label on a signal fill */

  /* Break — the mark's coral, taken down until it reads as text on a light
     ground (5.1:1). The brand's own #f97362 is 2.1:1 here. */
  --break:      #ad2b19;
  --break-dim:  rgba(173, 43, 25, 0.14);

  /* Type */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --gutter: 4.5rem;
  --shell: 1440px;
  --pad-x: clamp(1.25rem, 4vw, 3.5rem);
  --band-y: clamp(6rem, 13vh, 11rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 0.8s;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--display);
  font-variation-settings: 'wdth' 100, 'wght' 400;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

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

svg { display: block; }

/* Film grain. Breaks up the flat fills, so the ground reads as a material
   and not as a screen. Fixed layer, never on a scrolling container. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Shared type roles
   -------------------------------------------------------------------------- */

.mono {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fog-dim);
  margin-bottom: 1.75rem;
}

.lede {
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--slow) var(--ease), border-color var(--slow) var(--ease),
              color var(--slow) var(--ease), transform 0.25s var(--ease);
  transition-duration: 0.28s;
}

.btn--primary {
  background: var(--signal);
  color: var(--on-signal);
}

@media (hover: hover) {
  .btn--primary:hover {
    background: var(--signal-lit);
    transform: translateY(-2px);
  }
}

/* Tactile feedback: the control gives under the press. */
.btn:active { transform: translateY(0) scale(0.985); }

.btn--ghost {
  border-color: var(--line-lit);
  color: var(--text);
}

@media (hover: hover) {
  .btn--ghost:hover {
    border-color: var(--signal-lit);
    color: var(--signal-lit);
    transform: translateY(-2px);
  }
}

/* --------------------------------------------------------------------------
   Accessibility floor
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--signal-lit);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--signal);
  color: var(--on-signal);
  font-family: var(--mono);
  font-size: 0.8125rem;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 1rem; }

/* Present for assistive tech, absent from the layout. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Reveal — CSS-first. Hidden state only applies when JS is present,
   so the page is fully readable with scripting disabled.
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}

.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
.js .reveal[data-delay="3"] { transition-delay: 0.24s; }

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
