/* ============================================================================
   StartNet Design System — LAYER 2: BASE
   Reset, typography, grid, motion primitives.
   ========================================================================== */

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

* {
  margin: 0;
}

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

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

body {
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  font-optical-sizing: auto;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

ul,
ol {
  list-style: none;
  padding: 0;
}

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

/* --------------------------------------------------------------------------
   FOCUS
   Visible, branded, and never removed. The ring uses the Signal red because
   that is the one colour on this site that always means "here".
   ----------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--sn-ink);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   THE ACCENT
   A serif italic phrase set inside a sans headline. Optically the serif runs
   smaller and sits slightly high, so it is compensated here rather than by
   eye at each call site.
   ----------------------------------------------------------------------- */
.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.005em;
  padding-inline-end: 0.04em;
}

/* --------------------------------------------------------------------------
   THE BRAND FULL STOP
   The period that ends the StartNet wordmark, reused to end a sentence the
   company is prepared to stand behind. Never more than one per screen.
   ----------------------------------------------------------------------- */
.brand-stop {
  /* An inline-block with hidden overflow takes its baseline from its bottom
     margin edge, which is exactly how a full stop sits. The period itself is
     pushed out of view but stays in the accessibility tree, so the sentence
     is still read with its punctuation. */
  display: inline-block;
  width: 0.215em;
  height: 0.215em;
  margin-inline-start: 0.075em;
  border-radius: 50%;
  background: var(--sn-signal);
  vertical-align: baseline;
  overflow: hidden;
  text-indent: 10em;
  white-space: nowrap;
}

/* A serif italic ending carries a wide right sidebearing; close it up so the
   stop reads as part of the sentence rather than a floating mark. */
.accent + .brand-stop {
  margin-inline-start: -0.02em;
}

/* Editorial deck — the human aside next to an institutional claim. */
.deck {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lead);
  font-weight: 400;
  line-height: 1.44;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  max-width: 46ch;
  text-wrap: pretty;
}

.deck .accent {
  font-size: 1em;
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.prose {
  max-width: var(--layout-text-max);
  color: var(--color-text-secondary);
}

.prose > * + * {
  margin-top: var(--space-5);
}

.prose strong {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

.lede {
  font-size: var(--text-lead);
  line-height: var(--leading-snug);
  color: var(--color-text-secondary);
  max-width: 54ch;
  text-wrap: pretty;
}

.display-1 {
  font-size: var(--text-display-1);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

.display-2 {
  font-size: var(--text-display-2);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

.title-1 {
  font-size: var(--text-title-1);
  letter-spacing: var(--tracking-title);
}

.title-2 {
  font-size: var(--text-title-2);
  letter-spacing: var(--tracking-title);
}

.title-3 {
  font-size: var(--text-title-3);
}

.label {
  font-size: var(--text-micro);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.mono-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--layout-max);
  margin-inline: auto;
  padding-inline: var(--layout-inset);
}

.main {
  display: block;
}

.section {
  position: relative;
  padding-block: var(--space-section);
  background: var(--color-surface);
  color: var(--color-text);
  isolation: isolate;
  overflow: clip;
}

.section--tight {
  padding-block: var(--space-section-tight);
}

.section--flush-top {
  padding-block-start: 0;
}

.section--flush-bottom {
  padding-block-end: 0;
}

.grid {
  display: grid;
  gap: var(--layout-gutter);
  grid-template-columns: repeat(var(--layout-columns), minmax(0, 1fr));
}

.stack > * + * {
  margin-top: var(--flow, var(--space-5));
}

/* Full-bleed gradient hairline — the seam between two sections. Reads as a
   spectrum of the five properties resolving into the brand red. */
.hairline-gradient {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--sn-prop-flywheel) 0%,
    var(--sn-prop-nooru) 24%,
    var(--sn-prop-agentic) 48%,
    var(--sn-prop-snx) 68%,
    var(--sn-prop-physical) 84%,
    var(--sn-signal) 100%
  );
  opacity: 0.9;
}

.rule {
  display: block;
  height: 1px;
  width: 100%;
  max-width: 220px;
  background: currentColor;
  opacity: 0.22;
  transform-origin: left center;
}

.rule--inset {
  max-width: 96px;
}

/* ==========================================================================
   REVEAL
   One system, three variants. Everything resolves to a legible end state if
   JavaScript never runs — the classes below only apply once .js-on is set.
   ========================================================================== */

.js-on [data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
    transform var(--duration-reveal) var(--ease-out-expo),
    clip-path var(--duration-reveal) var(--ease-out-expo);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}

.js-on [data-reveal='rise'] {
  transform: translate3d(0, 28px, 0);
}

.js-on [data-reveal='fade'] {
  transform: none;
}

.js-on [data-reveal='mask'] {
  clip-path: inset(0 0 100% 0);
  transform: translate3d(0, 12px, 0);
}

.js-on [data-reveal='rule'] {
  opacity: 0;
  transform: scaleX(0);
}

.js-on [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

.js-on [data-reveal='rule'].is-revealed {
  opacity: 0.22;
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .js-on [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.u-hide {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.u-text-secondary {
  color: var(--color-text-secondary);
}

.u-measure {
  max-width: var(--layout-text-max);
}
