/* ============================================================
   Ludumina Labs — base / reset / shared primitives.
   SHARED / READ-ONLY for section builders.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

/* ---- skip link -------------------------------------------------- */

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 500;
  transform: translate(-50%, -140%);
  background: var(--cy);
  color: #04121A;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.85em 1.6em;
  clip-path: var(--clip-both);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---- shared layout primitives ---------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--sec-pad); position: relative; }

/* ---- shared type primitives ------------------------------------ */

.display {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.005em;
}

/* Small technical label — the site's connective tissue. */
.micro {
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-40);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: clamp(1.75rem, 3.5vw, 3rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head h2 {
  font-family: var(--f-display);
  font-size: var(--t-h2);
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}
.section-head .micro { padding-bottom: 0.5rem; white-space: nowrap; }

@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .section-head .micro { padding-bottom: 0; }
}

/* ---- the clipped-corner frame, used sitewide -------------------- */

.notched { clip-path: var(--clip-both); }

/* ---- buttons ---------------------------------------------------- */

.btn {
  --btn-accent: var(--cy);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 1.05em 2.1em;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  clip-path: var(--clip-both);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
  will-change: transform;
}
.btn--solid {
  background: var(--btn-accent);
  color: #04121A;
}
.btn--solid:hover { background: #fff; }
.btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px var(--line-hot);
}

/* ---- reveal-on-scroll: opt in with [data-reveal] ---------------- */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---- page grain: one shared overlay, sits above everything ------ */

#grain {
  position: fixed;
  inset: -50%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: var(--grain-url);
  background-size: 180px;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) { #grain { animation: none; } }
