/* === Theme tokens === */
:root {
  --color-base-beige: #F5F1EA;
  --color-text-primary: #3C3C3C;
  --color-text-inv: #F5F1EA;
  --color-bg-dark: #2C2C2C;
  --side-pad: 24px;
  --container-max: 2000px;
  --pad: max(var(--side-pad), calc((100vw - var(--container-max)) / 2));
  --content-max: 1280px;
}

/* Shared horizontal rhythm — header + every section read from --side-pad */
.side-pad { padding-left: var(--pad); padding-right: var(--pad); }
.content-wrap { max-width: var(--content-max); margin-left: auto; margin-right: auto; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-base-beige);
  color: var(--color-text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a, button { color: inherit; text-decoration: none; }
button { background: transparent; border: 0; font: inherit; padding: 0; }

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

/* Display: Editorial New (Latin) + Neue World (Cyrillic), unicode-range switched. */
.font-serif { font-family: 'Display', Georgia, serif; font-weight: 400; letter-spacing: -0.02em; }
/* display tracking — one place for the whole site */
:root { --dt-lg: -0.02em; --dt-sm: -0.01em; }
.font-serif, h1, h2, .stk-title, .wm-title, .ct-title, .cs-title, .cs-h, .cs-end-t, .cs-next-title, .hero-name, .stk-ctacard-t, .cs-quote { letter-spacing: var(--dt-lg) !important; }
.cs-hl-t, .cs-flow-text h3, .cs-learn h3, h3.font-serif { letter-spacing: var(--dt-sm) !important; }
/* display face at small sizes: open up tracking, min 22px so it doesn't look starved */
.cs-hl-t, .cs-flow-text h3, .cs-learn h3, .cs-end-t, .stk-ctacard-t { font-size: clamp(22px, 1.7vw, 26px) !important; line-height: 1.2 !important; }
.italic { font-style: italic; }

/* Process carousel — hide scrollbar, smooth scroll */
.process-track { scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; }
.process-track::-webkit-scrollbar { display: none; }

/* Smooth color transitions on tonal swaps */
* { transition: background-color 0.5s ease, color 0.5s ease; }

/* === Glass === */
.glass {
  background: rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.shadow-soft { box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.05); }
.shadow-sm   { box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.shadow-md   { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

/* === Background blobs === */
.blob-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}
.blob-1 {
  top: -10%; left: -10%;
  background: radial-gradient(circle, #D4E6F1 0%, transparent 70%);
  animation: drift 20s ease-in-out infinite;
}
.blob-2 {
  bottom: -10%; right: -10%;
  background: radial-gradient(circle, #FAD7A0 0%, transparent 70%);
  animation: drift 25s ease-in-out infinite reverse;
}

/* === Grain === */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
}

/* === Animations === */
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.05); }
  66%  { transform: translate(-20px, 15px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glass-shimmer {
  from { left: -100%; }
  to   { left: 100%; }
}

.glass-btn-shimmer { position: relative; overflow: hidden; }
.glass-btn-shimmer::before {
  content: "";
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  pointer-events: none;
}
.glass-btn-shimmer:hover::before { animation: glass-shimmer 0.6s ease forwards; }

/* === Snap scroll for case study === */
.snap-y { scroll-snap-type: y mandatory; }
.snap-start { scroll-snap-align: start; }

/* === Misc === */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Hide custom cursor on touch devices */
@media (hover: none) {
  body, a, button { cursor: auto; }
  .custom-cursor { display: none !important; }
}

/* hide native scrollbar — custom overlay one is rendered by ScrollProgress */
html { scrollbar-width: none; }
html::-webkit-scrollbar { width: 0; height: 0; }


/* ═══════════ TYPE KIT — single source of truth ═══════════
   colours:  --ink (headings) · --ink-2 (body) · --ink-3 (labels/meta)
   roles:    .t-display (serif) · .t-body · .t-label · .t-eyebrow            */
:root { --ink: #2A2A2A; --ink-2: rgba(42,42,42,0.58); --ink-3: rgba(42,42,42,0.42); --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif; }
body { color: var(--ink-2); font-family: var(--sans); }

/* display: serif headings, always dark */
.font-serif, h1, h2, h3,
.stk-title, .wm-title, .ct-title, .cs-title, .cs-h, .cs-hl-t, .cs-end-t, .cs-next-title, .hero-name, .stk-ctacard-t,
.cs-quote { color: var(--ink) !important; font-weight: 400; font-family: 'Display', Georgia, serif !important; }
.ct-title { font-size: clamp(34px, 3.6vw, 64px) !important; line-height: 1 !important; }

/* body: supporting text, one grey */
p:not(.hero-lede), li, .stk-desc, .wg-desc, .wm-desc, .ct-lede, .cs-p, .cs-hl-d, .cs-flow-text p, .cs-learn p, .cs-note,
.career-c2, .career-note, .skills-ul li, .proc-tags, .prin-d, .stk-ctacard-s, .wm-row, .Sticky, .sticky-body { color: var(--ink-2) !important; opacity: 1 !important; font-family: var(--sans); }
.cs-quote { color: var(--ink) !important; }

/* labels / meta: smallest, lightest */
.stk-tagline, .wg-meta, .wm-meta, .ct-eyebrow, .ct-details, .ct-details .ct-k,
.cs-eyebrow, .cs-meta-k, .cs-meta-v, .cs-end-k, .cs-toc-item, .cs-back,
.career-c3, .career-sub, .skills-k, .proc-n, .prin-n, .photo-card .skills-k, .stk-ctacard-k,
.hero-in-5, .ab-hint, .stk-hint, .hero-scroll, .glass-tag { color: var(--ink-3) !important; opacity: 1 !important; font-family: var(--sans); }
.cs-toc-item.is-active, .hero-scroll:hover { color: var(--ink) !important; }
.glass-tag { color: var(--ink-2) !important; font-weight: 300 !important; }
.stk-cursor { color: var(--ink) !important; font-family: var(--sans); }
.stk-cursor:not(.is-on) { opacity: 0 !important; visibility: hidden; }

/* sizes — 4 steps only */
.t-eyebrow, .cs-eyebrow, .cs-meta-k, .skills-k, .proc-n, .prin-n, .stk-ctacard-k, .cs-end-k { font-size: 12px !important; letter-spacing: 0.06em; text-transform: uppercase; }
.wg-meta, .wm-meta, .ct-details, .career-c3, .career-sub, .hero-in-5, .ab-hint, .stk-hint, .hero-scroll, .cs-toc-item, .cs-back, .cs-meta-v, .career-note, .photo-card .skills-k { font-size: 13px !important; letter-spacing: 0; text-transform: none; }
.stk-tagline { font-size: 11px !important; letter-spacing: 0.02em; text-transform: none; }
p:not(.cs-quote):not(.hero-lede), .stk-desc, .wg-desc, .wm-desc, .ct-lede, .cs-p, .cs-hl-d, .cs-flow-text p, .cs-learn p, .career-c2, .skills-ul li, .proc-tags, .prin-d, .stk-ctacard-s { font-size: 14px !important; line-height: 1.4 !important; font-weight: 400; }
.hero-lede, .ct-lede { font-size: clamp(14px, 1.2vw, 20px) !important; line-height: 1.45 !important; }
.hero-side, .hero-lede { color: var(--ink-2); opacity: 1; font-size: clamp(14px, 1.2vw, 20px); font-family: var(--sans); font-weight: 400; letter-spacing: -0.01em; }
.hero-name .hero-apos { color: var(--ink-2); opacity: 1; font-size: clamp(14px, 1.2vw, 20px); font-family: var(--sans); font-weight: 400; }

/* dark surfaces keep cream text */
/* contrast-aware header */
.site-nav, .site-nav a, .site-logo, .lang-btn { transition: background-color 350ms ease, border-color 350ms ease, color 350ms ease, box-shadow 350ms ease !important; }
.site-header.on-dark .site-nav { background: rgba(28, 24, 20, 0.42) !important; border-color: rgba(255, 255, 255, 0.18) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important; }
/* stronger base glass so either text colour stays readable while undecided */
.site-nav { background-color: rgba(245, 241, 234, 0.62) !important; }
.site-header.on-dark .site-nav a { color: #F5F1EA !important; }
.cs-end .cs-end-k { color: var(--ink-3) !important; }
/* white-on-image labels stay white */
.wm-card .stk-viewbtn, .stk-viewbtn, .stk-idx { color: #F5F1EA !important; }

.ct-details .ct-v { color: var(--ink-2) !important; }
.glass-tag { font-family: var(--sans) !important; }

/* one cursor rule for the whole site: OS cursor hidden everywhere (custom dot draws it) */
html, body, body *, .glass-host, .glass-host canvas, .stk-card, .stk-herocard, .stk-herocard * { cursor: none !important; }
@media (hover: none) { html, body, body * { cursor: auto !important; } }
