/* ============================================================
   DevynHub · base — fonts, reset, layout primitives, typography
   ============================================================ */

/* Self-hosted fonts. Missing files fall back to the token stacks. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/archivo-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/notosanssc-400.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/notosanssc-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plexmono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.78;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; }

table { border-collapse: collapse; width: 100%; }

::selection { background: var(--mist); color: #fff; }

:focus-visible {
  outline: 2px solid var(--mist);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(15, 44, 56, .22);
  border-radius: 1px;
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: 96px; }
.section--tight { padding-block: 64px; }
.section--flush-top { padding-top: 0; }

.rule { height: 1px; background: var(--line); border: 0; }

/* ============================================================
   Typography
   ============================================================ */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: .96;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.lede {
  font-size: 16px;
  line-height: 1.75;
  color: rgba(15, 44, 56, .68);
  max-width: 46ch;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(15, 44, 56, .55);
}
.label i {
  width: 6px;
  height: 6px;
  background: var(--mist);
  flex: none;
}
.label--light { color: rgba(241, 243, 242, .62); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(15, 44, 56, .55);
  text-transform: none;
}
.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--mist);
  flex: none;
}
.kicker--ink { color: rgba(15, 44, 56, .55); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: .02em;
}

.muted { color: rgba(15, 44, 56, .55); }
.clay  { color: var(--clay); }
.ok    { color: var(--ok); }
.warn  { color: var(--warn); }
.bad   { color: var(--bad); }

/* ============================================================
   Scroll reveal
   ============================================================ */

.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .62s var(--ease), transform .62s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.js .reveal.in,
.js .reveal.is-in { opacity: 1; transform: none; }

/* stagger via data attribute — no inline styles */
.reveal[data-i="0"] { --i: 0; }
.reveal[data-i="1"] { --i: 1; }
.reveal[data-i="2"] { --i: 2; }
.reveal[data-i="3"] { --i: 3; }
.reveal[data-i="4"] { --i: 4; }
.reveal[data-i="5"] { --i: 5; }
.reveal[data-i="6"] { --i: 6; }
.reveal[data-i="7"] { --i: 7; }
.reveal[data-i="8"] { --i: 8; }

/* ============================================================
   Utilities
   ============================================================ */

.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;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  transform: translate(-50%, -200%);
  transition: transform var(--dur-1) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 24px; }

/* ============================================================
   Responsive base
   ============================================================ */

@media (max-width: 1080px) {
  :root { --pad: 28px; }
}

@media (max-width: 760px) {
  :root { --pad: 20px; --bar-h: 62px; }
  body { font-size: 14.5px; }
  .section { padding-block: 64px; }
}

@media (max-width: 480px) {
  :root { --pad: 16px; }
}

/* ============================================================
   Touch devices
   ============================================================ */

@media (hover: none) {
  html { -webkit-tap-highlight-color: transparent; }
}

/* ============================================================
   Reduced motion
   ============================================================ */

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