/* =============================================================================
 * Stark Allround Services — base.css (owner: main session). Alfred OS v5 "Porcelain & Lacquer" on the web.
 * Tokens, type, layout, header, footer and the static look of every section. Section motion + visual layers live in
 * stage.css / live.css / recruit.css (each owned by its builder). Do not redefine tokens there.
 * ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Latin Extended (ń ę ț ș ğ ş İ …) for the live demo's Polish, Romanian and Turkish: loaded only when such a letter appears. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Serif Display";
  src: url("../fonts/noto-serif-display-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Serif Display";
  src: url("../fonts/noto-serif-display-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* porcelain page (Alfred OS v5 light) */
  --canvas: #efeeea;
  --canvas-hi: #f8f7f4;
  --sheet: #fdfdfb;
  --glass: rgba(253, 253, 251, 0.82);
  --ink: #111111;
  --ink-2: #43423d;
  --ink-3: #66645e;   /* lowest TEXT step (5.1:1 on canvas) */
  --ink-4: #a6a49c;   /* not text: ticks, empty marks */
  --ink-5: #d2d0c8;   /* not text: idle segments, ruler base */
  --rule: rgba(20, 20, 15, 0.11);
  --rule-2: rgba(20, 20, 15, 0.22);
  --rule-3: rgba(20, 20, 15, 0.3);
  --engrave-light: rgba(255, 255, 255, 0.75); /* the groove catching light, one px under a rule */
  /* the one accent: lapis = Alfred / interactive */
  --lapis: #2433e8;
  --lapis-hover: #1a27c4;
  --lapis-wash: rgba(36, 51, 232, 0.065);
  --lapis-wash-2: rgba(36, 51, 232, 0.12);
  --lapis-ring: rgba(36, 51, 232, 0.36);
  --lapis-glow: #8f9bff;
  --ok: #17773f;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Noto Serif Display", "Iowan Old Style", "Times New Roman", serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-ui: 220ms;
  --dur-reveal: 1000ms;

  --wrap: 1280px;
  --gutter: clamp(20px, 4.4vw, 56px);
  --hdr-h: 64px;
  --section-pad: clamp(112px, 15vw, 220px);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 8px);
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(140% 70% at 50% -10%, var(--canvas-hi) 0%, rgba(248, 247, 244, 0) 62%),
    var(--canvas);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a { color: var(--lapis); text-decoration: none; }
a:hover { color: var(--lapis-hover); }
:focus-visible { outline: 2px solid var(--lapis); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--lapis-wash-2); }

p { text-wrap: pretty; }

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

.skip { position: absolute; left: -9999px; top: 10px; z-index: 50; background: var(--sheet); color: var(--ink); padding: 10px 16px; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule-2); }
.skip:focus { left: 16px; }

/* ---------- type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.018em;
  line-height: 1.02;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
  font-variation-settings: "wdth" 100;
}
.display em { font-style: italic; font-weight: 300; }
.display-xl { font-size: clamp(54px, 7.4vw, 124px); line-height: 0.98; letter-spacing: -0.024em; }
.display-lg { font-size: clamp(40px, 5.2vw, 84px); }

.eyebrow { margin: 0 0 22px; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--ink-3); letter-spacing: 0.005em; }
.lede { margin: 30px 0 0; max-width: 36em; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); letter-spacing: -0.003em; }
.fine { margin: 28px auto 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }

h3 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }

/* engraved hairline: a dark line with the groove's light one pixel below */
.rule, .engraved { position: relative; }
.engraved::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--rule-2);
  box-shadow: 0 1px 0 var(--engrave-light);
}

/* ---------- buttons + links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--lapis);
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 1px 2px rgba(20, 20, 15, 0.18);
  transition: background-color var(--dur-ui) ease, transform var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) ease;
}
.btn:hover { background: var(--lapis-hover); color: #ffffff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset; }

.link { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--lapis); }
.link::after { content: "→"; transition: transform var(--dur-ui) var(--ease-out); }
.link:hover::after { transform: translateX(4px); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 44px; }

/* ---------- header ---------- */
.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--hdr-h);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.hdr.is-scrolled {
  background: rgb(239 238 234 / 0.95);
  box-shadow: 0 1px 0 var(--rule), 0 2px 0 rgba(255, 255, 255, 0.5);
}
.hdr-in { height: 100%; display: flex; align-items: center; gap: 36px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink); white-space: nowrap; }
.mark:hover { color: var(--ink); }
.mark-orb { flex: none; color: var(--ink); }
.nav-jobs { display: none; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 6px 0; }
.nav-jobs:hover { color: var(--ink); }
.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a { position: relative; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 6px 0; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }

/* ---------- the stage (fixed WebGL layer; site-src/js/stage owns its behaviour) ---------- */
.fx-stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, .ftr { position: relative; z-index: 1; }
/* entrance motion may start outside the column: clip it inside the page (clip keeps sticky working, unlike hidden) */
main, .live { overflow-x: clip; }

/* ---------- sections: static layout ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: calc(var(--hdr-h) + 48px) 0 clamp(56px, 10vh, 120px); }
.hero-in { max-width: var(--wrap); }
.hero .display-xl { max-width: 9.5em; }
.hero .lede { max-width: 33em; }

.statement { padding: var(--section-pad) 0; }
.statement-in { display: grid; gap: 0.08em; text-align: center; justify-items: center; }

.meet { padding: var(--section-pad) 0; }
.meet-head .display-lg { max-width: 12em; }
.agents { list-style: none; margin-top: clamp(64px, 9vw, 120px); padding-top: 0; padding-bottom: 0; display: grid; gap: 0; }
.agent { padding: 34px 0 38px; max-width: 34em; }
.agent + .agent { position: relative; }
.agent + .agent::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--rule); box-shadow: 0 1px 0 var(--engrave-light); }
.agent-name { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.05; }
.agent p { margin: 12px 0 0; color: var(--ink-2); font-size: 18px; }

.live, .recruit, .careers, .contact { background: var(--canvas); }
.live { padding: var(--section-pad) 0 calc(var(--section-pad) * 0.7); position: relative; }
.live::before, .recruit::before, .careers::before, .contact::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--rule);
  box-shadow: 0 1px 0 var(--engrave-light);
}
.live-head .display-lg { max-width: 13em; }
.live-stage { margin-top: clamp(56px, 7vw, 96px); min-height: 200px; }

.recruit { position: relative; padding: var(--section-pad) 0; overflow: hidden; }
.recruit-head .display-lg { max-width: 11em; }
.steps { list-style: none; margin-top: clamp(64px, 8vw, 112px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
.step { position: relative; padding-top: 30px; }
.step::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--rule-2); box-shadow: 0 1px 0 var(--engrave-light); }
.step-num { display: block; font-size: 44px; line-height: 1; color: var(--ink-3); margin-bottom: 44px; font-variant-numeric: lining-nums tabular-nums; }
.step p { margin: 10px 0 0; color: var(--ink-2); }
.roles { margin-top: clamp(96px, 12vw, 180px); }
.roles .display { font-size: clamp(40px, 6vw, 96px); line-height: 1.12; white-space: normal; padding-inline: var(--gutter); max-width: var(--wrap); margin-inline: auto; }
.roles span { white-space: nowrap; }
.roles span:nth-child(even) { color: var(--ink-3); font-style: italic; }

.careers { position: relative; padding: var(--section-pad) 0; }
.careers-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 120px); align-items: end; }
.reqs { list-style: none; margin: 0; padding: 0; }
.reqs li { position: relative; display: grid; gap: 6px; padding: 26px 0 28px; }
.reqs li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--rule-2); box-shadow: 0 1px 0 var(--engrave-light); }
.reqs li:last-child::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--rule-2); box-shadow: 0 1px 0 var(--engrave-light); }
.req-label { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.req-value { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.15; letter-spacing: -0.012em; }

.contact { position: relative; padding: var(--section-pad) 0 calc(var(--section-pad) * 0.8); }
.contact-in .display-xl { max-width: 8em; }
.contact-rows { margin-top: clamp(56px, 7vw, 104px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 5vw, 80px); }
.contact-row { position: relative; padding-top: 24px; }
.contact-row::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--rule-2); box-shadow: 0 1px 0 var(--engrave-light); }
.contact-row p { margin: 0 0 10px; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.mail { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3vw, 46px); line-height: 1.1; letter-spacing: -0.015em; color: var(--ink); overflow-wrap: anywhere; background: linear-gradient(var(--lapis), var(--lapis)) 0 100% / 0 1px no-repeat; transition: background-size 420ms var(--ease-out), color 200ms ease; }
.mail:hover { color: var(--lapis); background-size: 100% 1px; }
.contact .fine { margin: 48px 0 0; }

.ftr { background: var(--canvas); padding: 32px 0 48px; }
.ftr-in { position: relative; padding-top: 28px; }
.ftr-in::before { content: ""; position: absolute; inset: 0 var(--gutter) auto var(--gutter); height: 1px; background: var(--rule); box-shadow: 0 1px 0 var(--engrave-light); }
.ftr p { margin: 0 0 6px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }

/* ---------- reveal (main.js adds .js-ready, and .is-in when an element enters) ----------
   opacity + a rise only: a blur filter on large type re-rasters on the GPU every frame and stalls the scroll */
[data-reveal] {
  transition:
    opacity var(--dur-reveal) var(--ease-out) calc(var(--d, 0) * 90ms),
    transform var(--dur-reveal) var(--ease-out) calc(var(--d, 0) * 90ms);
}
[data-d="1"] { --d: 1; }
[data-d="2"] { --d: 2; }
[data-d="3"] { --d: 3; }
[data-d="4"] { --d: 4; }
.js-ready [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(26px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: opacity 400ms linear; }
  .js-ready [data-reveal]:not(.is-in) { transform: none; filter: none; }
}

/* ---------- widths ---------- */
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
  .careers-in { grid-template-columns: 1fr; }
}
@media (min-width: 1000px) {
  .recruit-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px clamp(40px, 5vw, 96px); align-items: end; }
  .recruit-head .display-lg { max-width: none; }
  .recruit-head .lede { margin: 0; }
  /* careers: the headline spans the top; requirements lead on the left, the invitation answers on the right */
  .careers-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "head head" "reqs lede" "reqs cta";
    grid-template-rows: auto auto 1fr;
    align-items: start;
    row-gap: 0;
  }
  .careers-copy { display: contents; }
  .careers-copy .display-lg { grid-area: head; max-width: none; margin-bottom: clamp(48px, 6vw, 88px); }
  .careers-copy .lede { grid-area: lede; margin-top: 22px; }
  .careers-copy .cta { grid-area: cta; margin-top: 36px; }
  .careers-in .reqs { grid-area: reqs; }
}
@media (min-width: 1200px) {
  /* a narrow measure keeps the headline clear of the 3D field on its right */
  .hero .display-xl { max-width: 7.6em; font-size: clamp(54px, 6.8vw, 112px); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .nav-jobs { display: inline-block; margin-left: auto; }
  .hdr-in { gap: 18px; }
  .contact-rows { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .mark { font-size: 14px; gap: 8px; letter-spacing: 0.01em; }
  .hdr-in { gap: 14px; }
  .roles span { white-space: normal; }
  .statement .display-lg { font-size: 31px; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .step-num { margin-bottom: 20px; font-size: 36px; }
  .hero { padding-bottom: 56px; }
  .cta { margin-top: 36px; }
}
@media (max-width: 400px) {
  .mark-orb { display: none; }
  .btn-sm { padding: 0 13px; }
}
