/* ============================================================
   021 — Craft Layer
   Sits on top of styles.css + page.css. Only additive rules
   + surgical overrides. Purpose: give the site a proprietary
   identity layer (signature hero, flipboard nav, amber-forward
   moments, scroll reveals, kinetic numerals).
   ============================================================ */

/* ---------- TYPOGRAPHY REFINEMENTS ---------- */
/* Push tabular numerals into the stat numbers; subtle but precise. */
.heroA .stat .n,
.heroC-cell.stat .n,
.stat-cell .stat-n,
.tr-stat .big,
.stat-box .n,
.net-card .net-stats .v {
  font-feature-settings: 'tnum' 1, 'ss01' 1;
  font-variant-numeric: tabular-nums;
}

/* Display-weight Instrument Serif for signature moments. Given hard-lock
   on not adding new fonts, we push weight/size within the existing stack. */
.display-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

/* ---------- FLIPBOARD NAV (signature interaction #1) ---------- */
/* Each nav link becomes a flipboard: on hover, characters cycle through
   random glyphs one-by-one before settling. Purely CSS-hookable, JS-driven. */
.nav-links a {
  display: inline-flex;
  gap: 0;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.nav-links a .flap {
  display: inline-block;
  min-width: 0.55em;
  text-align: left;
  will-change: transform;
}
.nav-links a .flap.rolling {
  color: var(--accent);
}

/* ---------- CURSOR BLOB (signature interaction #2) ---------- */
/* Soft amber organic blob that follows the cursor on the hero. Lives
   behind the headline; uses blend modes so it subtly tints underlying
   ink without muddying text. */
.hero-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.cursor-blob {
  position: absolute;
  top: 0; left: 0;
  width: 520px; height: 520px;
  pointer-events: none;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0) scale(1);
  transition: transform 0.42s cubic-bezier(.2,.7,.2,1), opacity .6s ease;
  z-index: 0;
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in oklab, var(--accent) 70%, transparent) 0%,
    color-mix(in oklab, var(--accent) 30%, transparent) 30%,
    color-mix(in oklab, var(--accent) 8%, transparent) 60%,
    transparent 75%
  );
  filter: blur(40px);
  opacity: 0.85;
  mix-blend-mode: multiply;
}
[data-theme='dark'] .cursor-blob { mix-blend-mode: screen; opacity: 0.55; }
.cursor-blob.is-paused { transition: transform 1.2s cubic-bezier(.3,.6,.3,1), opacity .6s ease; }

/* Mono theme — collapse the cursor blob into a soft ink wash. Without this
   override, the multiply-blend amber blob reads as a muddy grey smudge. In
   mono we want a barely-there spotlight that suggests presence without
   coloring the page. */
[data-accent='mono'] .cursor-blob {
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in oklab, var(--ink) 28%, transparent) 0%,
    color-mix(in oklab, var(--ink) 12%, transparent) 30%,
    color-mix(in oklab, var(--ink) 4%, transparent) 60%,
    transparent 75%
  );
  opacity: 0.5;
}
[data-theme='dark'][data-accent='mono'] .cursor-blob { opacity: 0.35; }

/* Slate theme — keep the silvery-blue feel, tone down opacity since cooler
   hues read denser on cream. */
[data-accent='slate'] .cursor-blob { opacity: 0.7; }
[data-theme='dark'][data-accent='slate'] .cursor-blob { opacity: 0.6; }

/* Keep hero content above the blob */
.hero-stage > .wrap-wide,
.hero-stage > .marquee { position: relative; z-index: 1; }

/* The big wordmark "021" behind the headline — proprietary moment */
.wordmark-021 {
  position: absolute;
  right: -2vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(320px, 48vw, 720px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in oklab, var(--ink) 14%, transparent);
  pointer-events: none;
  z-index: 0;
  user-select: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
[data-theme='dark'] .wordmark-021 {
  -webkit-text-stroke: 1px color-mix(in oklab, var(--ink) 10%, transparent);
}
.wordmark-021 .zero {
  display: inline-block;
  position: relative;
}
.wordmark-021 .dot-inside {
  position: absolute;
  width: 0.04em; height: 0.04em;
  border-radius: 50%;
  background: var(--accent);
  /* Sits at the baseline to the left of "2" so the wordmark reads as "0.21"
     — the amber dot acts as the literal decimal point. */
  left: -0.06em; bottom: 0.05em;
  -webkit-text-stroke: 0;
}

/* ---------- KINETIC "ZERO TO ONE" FLIPBOARD ---------- */
/* The three-line headline gets a subtle reveal on load — like a
   split-flap board settling into its destination. */
.heroA h1 .line {
  overflow: hidden;
  /* Bottom padding leaves room for descenders (g, p, y, etc.) inside the
     overflow:hidden clip used by the flipboard reveal. Negative margin
     keeps the rendered line spacing identical so layout doesn't shift. */
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}
.heroA h1 .flip-word {
  display: inline-block;
  animation: flipIn 0.9s cubic-bezier(.2,.7,.2,1) both;
}
.heroA h1 .flip-word.d1 { animation-delay: 0.10s; }
.heroA h1 .flip-word.d2 { animation-delay: 0.22s; }
.heroA h1 .flip-word.d3 { animation-delay: 0.34s; }
@keyframes flipIn {
  0%   { transform: translateY(0.8em) rotateX(-60deg); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: translateY(0) rotateX(0);         opacity: 1; }
}

/* ---------- AMBER FULL-BLEED (break the grid) ---------- */
/* Full-bleed amber section inserted between FEATURED and HISTORY
   on the homepage. Promotes accent to identity. */
.amber-bleed {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 100px 0 110px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid color-mix(in oklab, var(--accent-ink) 18%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--accent-ink) 18%, transparent);
}
.amber-bleed .inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: end;
  position: relative;
  z-index: 1;
}
.amber-bleed .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--accent-ink) 65%, transparent);
  margin-bottom: 36px;
  display: flex; align-items: center; gap: 12px;
}
.amber-bleed .tag .line { flex: 1; height: 1px; background: color-mix(in oklab, var(--accent-ink) 25%, transparent); }
.amber-bleed h2 {
  margin: 0;
  font-size: clamp(48px, 7vw, 108px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.96;
}
.amber-bleed h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.amber-bleed h2 .strike {
  text-decoration: line-through;
  text-decoration-thickness: 4px;
  opacity: 0.45;
}
.amber-bleed .right-col {
  display: flex; flex-direction: column; gap: 20px;
  padding-bottom: 8px;
}
.amber-bleed .right-col p {
  margin: 0;
  font-size: 17px; line-height: 1.55;
  color: color-mix(in oklab, var(--accent-ink) 85%, transparent);
  max-width: 440px;
}
.amber-bleed .right-col .cta {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 16px 22px;
  background: var(--accent-ink);
  color: var(--accent);
  align-self: flex-start;
  display: inline-flex; gap: 10px;
  transition: transform .2s ease;
}
.amber-bleed .right-col .cta:hover { transform: translate(3px, -3px); }
/* big "021" stamp, etched into the amber slab */
.amber-bleed .stamp {
  position: absolute;
  right: -3vw; bottom: -20%;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(360px, 52vw, 780px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in oklab, var(--accent-ink) 14%, transparent);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  font-variant-numeric: tabular-nums;
}

/* Mono theme — the amber-bleed becomes an ink slab (or a cream slab in dark
   mode). The stroke on the 021 stamp needs to be lighter against the high-
   contrast bg so it doesn't fight the headline. */
[data-accent='mono'] .amber-bleed {
  background: var(--ink);
  color: var(--bg);
}
[data-accent='mono'] .amber-bleed .tag,
[data-accent='mono'] .amber-bleed .right-col p {
  color: color-mix(in oklab, var(--bg) 65%, transparent);
}
[data-accent='mono'] .amber-bleed .tag .line {
  background: color-mix(in oklab, var(--bg) 25%, transparent);
}
[data-accent='mono'] .amber-bleed .right-col .cta {
  background: var(--bg);
  color: var(--ink);
}
[data-accent='mono'] .amber-bleed .stamp {
  -webkit-text-stroke: 1px color-mix(in oklab, var(--bg) 12%, transparent);
}

/* ---------- SCROLL REVEAL ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- COUNT-UP NUMERALS ---------- */
/* Monospace-lined digit slot for count-up — prevents layout jitter. */
.counter { font-variant-numeric: tabular-nums; }

/* ---------- THESIS CARDS — subtle lift ---------- */
.tv-card {
  transition: padding .25s ease, background .25s ease;
  position: relative;
}
.tv-card:hover { background: var(--bg-2); }
.tv-card .tv-k::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  transform: translateY(-2px);
}

/* ---------- METHOD STEP REFINEMENT ---------- */
.method .step .n .dot {
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 40%, transparent);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent); }
}

/* ---------- FEATURED VENTURE TILES — settle-in on load ---------- */
.ventures-reel .venture {
  animation: tileSettle .7s cubic-bezier(.2,.7,.2,1) both;
}
.ventures-reel .venture:nth-child(1) { animation-delay: 0.05s; }
.ventures-reel .venture:nth-child(2) { animation-delay: 0.12s; }
.ventures-reel .venture:nth-child(3) { animation-delay: 0.19s; }
.ventures-reel .venture:nth-child(4) { animation-delay: 0.26s; }
@keyframes tileSettle {
  0%   { opacity: 0; transform: translateY(16px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.ventures-reel .venture .v-icon {
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.ventures-reel .venture:hover .v-icon {
  transform: translateY(-2px) rotate(-2deg);
}

/* ---------- NETWORK PAGE: HERO WITH IMAGERY ---------- */
.network-hero-image-host {
  position: relative;
  overflow: hidden;
}
.network-hero-image-host .hero-image {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.network-hero-image-host .hero-image img {
  position: absolute;
  right: -8%; top: 50%;
  transform: translateY(-48%);
  width: 62%;
  max-width: 860px;
  aspect-ratio: 4/3;
  object-fit: cover;
  opacity: 0.22;
  mask-image: linear-gradient(270deg, black 30%, transparent 90%);
  -webkit-mask-image: linear-gradient(270deg, black 30%, transparent 90%);
  filter: saturate(0.9);
}
[data-theme='dark'] .network-hero-image-host .hero-image img { opacity: 0.35; }
.network-hero-image-host > .wrap-wide { position: relative; z-index: 1; }

/* Vehicle cards — real imagery integration */
.vehicle-card {
  position: relative;
  overflow: hidden;
}
.vehicle-card::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 32%, transparent), transparent 70%);
  pointer-events: none;
  transition: transform .5s ease;
}
.vehicle-card:hover::after { transform: translate(-20px, -20px) scale(1.2); }

/* Experience card image placeholders — warm tinted tiles with motif */
.exp-art {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #0a0a0a;
}
.exp-art .exp-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.activation-card:hover .exp-art .exp-img { transform: scale(1.05); }
.exp-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 45%, rgba(10,10,10,0.55) 100%);
}
.exp-art .exp-tag {
  position: absolute;
  left: 16px; top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 8px;
  background: color-mix(in oklab, #0a0a0a 60%, transparent);
  color: #fff;
  backdrop-filter: blur(6px);
  z-index: 2;
}
/* Location/date stamp in corner */
.exp-art .exp-where {
  position: absolute;
  left: 16px; bottom: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  z-index: 2;
  display: flex; justify-content: space-between;
  opacity: 0.85;
}

/* Tinted backdrops — one per experience card, warm palette */
.tint-1 { background: linear-gradient(150deg, oklch(52% 0.15 52) 0%, oklch(22% 0.08 40) 100%); }
.tint-2 { background: linear-gradient(150deg, oklch(42% 0.14 260) 0%, oklch(18% 0.06 260) 100%); }
.tint-3 { background: linear-gradient(150deg, oklch(46% 0.16 20) 0%, oklch(20% 0.08 20) 100%); }
.tint-4 { background: linear-gradient(150deg, oklch(48% 0.10 140) 0%, oklch(20% 0.06 140) 100%); }
.tint-5 { background: linear-gradient(150deg, oklch(44% 0.12 300) 0%, oklch(20% 0.08 300) 100%); }
.tint-6 { background: linear-gradient(150deg, oklch(56% 0.16 60) 0%, oklch(24% 0.08 60) 100%); }
.tint-7 { background: linear-gradient(150deg, oklch(42% 0.08 240) 0%, oklch(18% 0.04 240) 100%); }

/* Faint gridded overlay so tints feel designed, not flat */
.exp-art .exp-img {
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 60px);
}

/* ---------- AMBIENT IMAGE STRIP (homepage) ---------- */
.ambient-strip {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0;
  background: #0a0a0a;
}
.ambient-strip .ambient-inner {
  position: relative;
  height: clamp(280px, 38vw, 480px);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1px;
  background: color-mix(in oklab, var(--ink) 12%, transparent);
}
.ambient-strip .tile {
  position: relative;
  overflow: hidden;
}
.ambient-strip button.tile {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.ambient-strip .tile .shot {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1.5s cubic-bezier(.2,.7,.2,1);
}
.ambient-strip .tile:hover .shot { transform: scale(1.04); }
.ambient-strip .tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 55%, rgba(10,10,10,0.6) 100%);
}
.ambient-strip .tile .caption {
  position: absolute; left: 24px; bottom: 20px;
  color: #f2efe8;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 1;
}
.ambient-strip .tile .caption .sub { color: color-mix(in oklab, #f2efe8 65%, transparent); display: block; margin-top: 4px; letter-spacing: 0.08em; }
.ambient-strip .overlay-word {
  position: absolute;
  left: 24px; top: 24px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  display: flex; gap: 12px; align-items: center;
}
.ambient-strip .overlay-word .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* Per-tile tints as placeholder until real imagery is dropped in.
   The CSS below makes the strip still feel like imagery on first load. */
.ambient-strip .tile.t1 .shot {
  background:
    radial-gradient(60% 80% at 30% 40%, oklch(72% 0.14 52) 0%, transparent 60%),
    linear-gradient(155deg, oklch(32% 0.12 52) 0%, #0a0a0a 90%);
}
.ambient-strip .tile.t2 .shot {
  background:
    radial-gradient(50% 70% at 70% 60%, oklch(45% 0.14 250) 0%, transparent 60%),
    linear-gradient(155deg, oklch(22% 0.08 250) 0%, #0a0a0a 90%);
}
.ambient-strip .tile.t3 .shot {
  background:
    radial-gradient(55% 70% at 40% 50%, oklch(40% 0.16 20) 0%, transparent 60%),
    linear-gradient(155deg, oklch(20% 0.08 20) 0%, #0a0a0a 90%);
}

/* ---------- COMPANIES page — amber treatment for featured tiles ---------- */
/* Make the glyph tiles feel more alive on load */
.venture .v-icon {
  box-shadow: 0 1px 0 color-mix(in oklab, var(--ink) 10%, transparent);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.venture:hover .v-icon {
  transform: translateY(-2px) rotate(-1.5deg);
  box-shadow: 0 6px 16px color-mix(in oklab, var(--accent) 18%, transparent);
}

/* ---------- SECTION HEAD — serif display variant ---------- */
.sec-head h2 em,
.heroA h1 em,
.network-hero h1 em,
.page-hero h1 em,
.format-header h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.035em;
}

/* Make the [ NN / SECTION ] bracket tags feel like type, not tags */
.sec-head .num,
.format-num,
.manifesto .num,
.page-hero .crumb {
  position: relative;
}
.sec-head .num::before,
.format-num::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  transform: translateY(-1px);
}

/* ---------- HISTORY section — date gutter added on left ---------- */
.tr-card { position: relative; }
.tr-card::before {
  content: '';
  position: absolute;
  left: 0; top: 40px; bottom: 40px;
  width: 1px;
  background: color-mix(in oklab, var(--accent) 40%, transparent);
  opacity: 0; transition: opacity .3s ease;
}
.tr-card:hover::before { opacity: 1; }

/* ---------- CTA BIG — dot anim + confident amber hover ---------- */
.cta-big h2 .dot {
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 40%, transparent);
  animation: pulse 2.2s ease-out infinite;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .wordmark-021 { font-size: 48vw; right: -6vw; opacity: 0.8; }
  .amber-bleed .inner { grid-template-columns: 1fr; gap: 40px; }
  .ambient-strip .ambient-inner { grid-template-columns: 1fr 1fr; }
  .ambient-strip .tile.t3 { display: none; }
}
@media (max-width: 720px) {
  .wordmark-021 { display: none; }
  .cursor-blob { display: none; }
  .network-hero-image-host .hero-image img { opacity: 0.12; }
  .ambient-strip .ambient-inner { grid-template-columns: 1fr; height: 360px; }
  .ambient-strip .tile.t2, .ambient-strip .tile.t3 { display: none; }
  .amber-bleed { padding: 72px 0 80px; }
  .amber-bleed .stamp { font-size: 72vw; bottom: -10%; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], .heroA h1 .flip-word, .ventures-reel .venture {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
  .cursor-blob { display: none; }
  .method .step .n .dot, .cta-big h2 .dot { animation: none; }
}

/* ---------- CONTACT FORM — kill native select chrome ---------- */
/* The contact form's <select> inherits the input styles (flat, bottom-border)
   but the browser still draws its own OS dropdown arrow on top, which reads
   as "shiny" against the rest of the form. Strip native appearance and draw
   a minimal mono caret instead. */
.contact-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.2' stroke-linecap='square'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
  cursor: pointer;
}
.contact-form select::-ms-expand { display: none; }
