/* princelabs.dev — one stylesheet. Every value is a token on :root. */
@font-face { font-family: "Outfit"; font-weight: 600; src: url("fonts/Outfit-SemiBold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Outfit"; font-weight: 700; src: url("fonts/Outfit-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; src: url("fonts/HankenGrotesk-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; src: url("fonts/HankenGrotesk-Medium.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; src: url("fonts/HankenGrotesk-SemiBold.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --grid: rgba(255, 255, 255, 0.045);
  --ink: #f2f3f7;
  --ink-dim: #a4a8b8;
  --accent: #6d5cff;
  --accent-ink: #b9b0ff;
  --tile: #12151d;
  --line: rgba(255, 255, 255, 0.09);
  --pebble: #e8a66b;
  --versed: #f0e6c8;
  --autoptz: #38bdf8;
  --display: "Outfit", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --radius: 20px;
  --radius-sm: 10px;
  --gutter: 16px;
  --max: 1100px;
  --fast: 150ms;
  --slow: 320ms;
  --slower: 650ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lift: -4px;
  --target: 44px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f7fa; --grid: rgba(0, 0, 0, 0.05); --ink: #111318; --ink-dim: #5b6070;
    --accent: #5b48ff; --accent-ink: #4a39e0; --tile: #ffffff; --line: rgba(0, 0, 0, 0.08);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px; line-height: 1.55; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); max-width: 16ch; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; z-index: 10; }

/* Page width. */
.top, main, .foot { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header: a sticky frosted pill. Phones get the wordmark and one button. */
.top { position: sticky; top: 0; z-index: 5; padding: 0.75rem 0; }
.bar { display: flex; align-items: center; gap: 1rem; padding: 0.45rem 0.45rem 0.45rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.wordmark span { color: var(--accent-ink); }
.top nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.top nav a { color: var(--ink-dim); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 0.5rem 0.8rem; min-height: var(--target); display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; }
.top nav a:hover { color: var(--ink); background: var(--line); }
.button.small { min-height: 40px; padding: 0 1rem; font-size: 0.95rem; }
.top .button { margin-left: auto; }
.top nav + .button { margin-left: 0; }
@media (max-width: 640px) { .top nav { display: none; } .bar { padding-left: 0.9rem; } .top nav + .button { margin-left: auto; } }

/* Hero. */
.hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2rem, 6vw, 4rem); }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-dim); max-width: 58ch; margin-top: 1.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.button { position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: var(--target); padding: 0 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: var(--tile); color: var(--ink); text-decoration: none; font-weight: 600; transition: transform var(--slow) var(--ease), box-shadow var(--slow) var(--ease), border-color var(--slow) var(--ease); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button:hover { transform: translateY(var(--lift)); border-color: var(--accent-ink); }
.button.primary:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent); }
.button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%); transform: translateX(-120%); transition: transform var(--slower) var(--ease); pointer-events: none; }
.button:hover::after { transform: translateX(120%); }

.band { padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--line); }

/* Product tiles. */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { position: relative; overflow: hidden; background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem 0; display: grid; grid-template-rows: auto auto auto 1fr auto auto; min-height: 560px; transition: transform var(--slow) var(--ease), border-color var(--slow) var(--ease), box-shadow var(--slow) var(--ease); --glow: var(--accent); }
.tile:hover { transform: translateY(calc(var(--lift) * 2)); border-color: color-mix(in srgb, var(--glow) 45%, var(--line)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.tile::before { content: ""; position: absolute; inset: auto -30% -40% -30%; height: 70%; background: radial-gradient(closest-side, var(--glow), transparent 70%); opacity: 0.28; pointer-events: none; transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.tile:hover::before { opacity: 0.5; transform: translateY(-6%); }
.tile.pebble { --glow: var(--pebble); }
.tile.versed { --glow: var(--versed); }
.tile.autoptz { --glow: var(--autoptz); }
.tile .icon { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 1rem; transition: transform var(--slow) var(--ease); }
.tile:hover .icon { transform: rotate(-4deg) scale(1.06); }
.tile .pitch { font-size: 1.05rem; color: var(--ink); margin-top: 0.5rem; }
.facts { list-style: none; padding: 0; margin: 0 0 1rem; color: var(--ink-dim); font-size: 0.95rem; }
.facts li { padding: 0.15rem 0; }
.tile .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-bottom: 1.2rem; }
.tile-link { font-weight: 600; min-height: var(--target); display: inline-flex; align-items: center; }
.tile .shot { position: relative; z-index: 1; width: 78%; margin: auto auto 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35); max-height: 260px; object-fit: cover; object-position: top; transition: transform var(--slow) var(--ease); }
.tile:hover .shot { transform: translateY(-10px); }
.tile .shot.wide { width: 100%; border-radius: 12px 12px 0 0; max-height: 220px; }
.tile .shot.code { width: 100%; margin: auto 0 0; border-radius: 12px 12px 0 0; max-height: none; background: #0b0d12; color: #e6e9f0; font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1rem 1.1rem 1.2rem; overflow: auto; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35); }
.tile .shot.code .c { color: #7c8699; }
.tile.mdoc { --glow: #a78bfa; }

/* Consulting: one line under the heading, then the four areas as small tiles spanning the
   full width, so the band reads like the product grid above it instead of a narrow list. */
.band-lede { color: var(--ink-dim); font-size: 1.05rem; margin: -0.4rem 0 1.5rem; max-width: 58ch; }
.services { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .services { grid-template-columns: repeat(4, 1fr); } }
.services li { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tile); transition: transform var(--slow) var(--ease), border-color var(--slow) var(--ease); }
.services li:hover { transform: translateY(var(--lift)); border-color: var(--accent); }
.services h3 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.services p { color: var(--ink-dim); font-size: 0.95rem; margin: 0; }

/* About: eyebrow + display name on the left, three facts and links on the right. */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem 3rem; align-items: start; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 0.6rem; }
.about h2 { margin-bottom: 0.6rem; font-size: clamp(2rem, 4.5vw, 3rem); }
.role { color: var(--ink-dim); margin: 0; max-width: 28ch; }
.about-facts { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink); margin: 0; display: grid; gap: 0.45rem; }
.about-facts li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.about .actions { margin-top: 1.4rem; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; gap: 1.2rem; } }

/* Footer: brand + two link columns, then a quiet legal line. */
.foot { padding: 3rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--ink-dim); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.foot-brand p { margin: 0.6rem 0 0; max-width: 28ch; }
.foot-col { display: grid; gap: 0.2rem; align-content: start; }
.foot h4 { font-family: var(--body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin: 0 0 0.5rem; }
.foot-col a { color: var(--ink-dim); text-decoration: none; min-height: var(--target); display: inline-flex; align-items: center; }
.foot-col a:hover { color: var(--ink); }
.foot-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; display: grid; gap: 0.3rem; }
.foot-legal p { margin: 0; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }


/* ---- Motion. All CSS; no script. Everything below is switched off under reduced motion. ---- */

/* Aurora: three blurred colour blobs drifting slowly behind the whole page. */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: 0.22; mix-blend-mode: screen; animation: drift 26s var(--ease) infinite alternate; }
.aurora span:nth-child(1) { background: var(--accent); top: -30vmax; left: -20vmax; }
.aurora span:nth-child(2) { background: var(--autoptz); top: 10vmax; right: -30vmax; animation-duration: 34s; animation-delay: -9s; }
.aurora span:nth-child(3) { background: var(--pebble); bottom: -35vmax; left: 20vmax; animation-duration: 40s; animation-delay: -20s; opacity: 0.14; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(12vmax, 8vmax, 0) scale(1.15); } }
@media (prefers-color-scheme: light) { .aurora span { opacity: 0.16; mix-blend-mode: multiply; } }

/* The one accent word in the headline breathes through the gradient. */
.accent-word { font-style: normal; background: linear-gradient(90deg, var(--accent-ink), var(--autoptz), var(--accent-ink)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }

/* Entrance on load: the hero rises in, staggered. */
.hero > * { animation: rise var(--slower) var(--ease) both; }
.hero h1 { animation-delay: 60ms; }
.hero .lede { animation-delay: 180ms; }
.hero .actions { animation-delay: 300ms; }
.top { animation: fade var(--slower) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Reveal on scroll, driven by the scroll position itself (no JavaScript). Browsers
   without scroll-driven animations simply show everything, already in place. */
@supports (animation-timeline: view()) {
  .band > h2, .capability, .services li, .services-h, .about-name, .about-body, .foot-grid { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  .tile { animation: tile-in linear both; animation-timeline: view(); animation-range: entry 0% entry 50%; }
  .tile:nth-child(2) { animation-range: entry 8% entry 58%; }
  .tile:nth-child(3) { animation-range: entry 16% entry 66%; }
  @media (max-width: 819px) { .tile:nth-child(2), .tile:nth-child(3) { animation-range: entry 0% entry 50%; } }
}
@keyframes tile-in { from { opacity: 0; transform: translateY(28px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .tile:hover, .tile:hover .icon, .tile:hover .shot, .services li:hover { transform: none; }
  .accent-word { color: var(--accent-ink); background: none; }
}

/* ---- Motion, second pass. ---- */

/* The grid itself drifts, very slowly. */
body { animation: grid-drift 60s linear infinite; }
@keyframes grid-drift { to { background-position: 32px 32px, 32px 32px; } }

/* Headline enters word by word. */
.hero h1 { animation: none; }
.hero h1 .w { display: inline-block; animation: rise var(--slower) var(--ease) both; }
.hero h1 .w:nth-child(1) { animation-delay: 40ms; }
.hero h1 .w:nth-child(2) { animation-delay: 120ms; }
.hero h1 .w:nth-child(3) { animation-delay: 200ms; }
.hero h1 .w:nth-child(4) { animation-delay: 280ms; }
.hero h1 .w:nth-child(5) { animation-delay: 360ms; }
.hero .lede { animation-delay: 480ms; }
.hero .actions { animation-delay: 600ms; }

/* Stack ticker: one continuous line that never stops. */
.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.9rem 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; gap: 2.5rem; width: max-content; animation: ticker 48s linear infinite; }
.ticker-track span { font-family: var(--display); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }
.ticker-track span::after { content: "\00B7"; margin-left: 2.5rem; color: var(--accent-ink); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Screenshots float while idle, each on its own beat; hover still lifts them. */
.tile .shot { animation: float 6s ease-in-out infinite; }
.tile.versed .shot { animation-delay: -2s; }
.tile.autoptz .shot { animation-duration: 7s; animation-delay: -4s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* A conic glow runs around a hovered tile's edge. */
.tile::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, var(--glow) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; opacity: 0; transition: opacity var(--slow) var(--ease); pointer-events: none; }
.tile:hover::after { opacity: 1; animation: spin 2.4s linear infinite; }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }

/* The header pill tightens as the page scrolls (scroll-driven, no script). */
@supports (animation-timeline: scroll()) {
  .bar { animation: tighten linear both; animation-timeline: scroll(); animation-range: 0 160px; }
  .about-facts li { animation: rule-in linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  .services li:nth-child(2) { animation-range: entry 10% entry 55%; }
  .services li:nth-child(3) { animation-range: entry 20% entry 65%; }
  .services li:nth-child(4) { animation-range: entry 30% entry 75%; }
}
@keyframes tighten { to { padding-top: 0.3rem; padding-bottom: 0.3rem; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); } }
@keyframes rule-in { from { opacity: 0; translate: -12px 0; } to { opacity: 1; translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  body, .ticker-track, .tile .shot, .tile::after, .bar, .hero h1 .w { animation: none !important; }
}

/* Contact block and icon buttons. */
/* Contact is its own band: what to write about on the left, the address on the right. */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem 3rem; align-items: center; }
.contact p { color: var(--ink-dim); margin: 0; max-width: 52ch; }
.contact-reach { justify-self: end; text-align: right; }
.contact-email a { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.7rem); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--accent); }
.contact-email a:hover { color: var(--accent-ink); }
.contact .actions { margin-top: 1rem; justify-content: flex-end; }
@media (max-width: 720px) { .contact { grid-template-columns: 1fr; } .contact-reach { justify-self: start; text-align: left; } .contact .actions { justify-content: flex-start; } }
.icon-button { gap: 0.55rem; }
.icon-button svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
