/* ============================================================
   GUHP — Digital studio
   style.css
   Vanilla CSS. Dark default, light theme via [data-theme].
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root,
[data-theme='dark'] {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #1a1a1a;

  /* Brand purple drives the accent (per brand decision) */
  --accent: #5b2ee0;          /* brand mark / fills / borders */
  --accent-strong: #6d3df5;   /* hover / brighter fill */
  --accent-text: #a78bff;     /* accent used on text (AA on dark) */
  --accent-soft: rgba(91, 46, 224, 0.16);
  --accent-glow: rgba(109, 61, 245, 0.35);
  --on-accent: #ffffff;

  --text-primary: #f5f5f5;
  --text-secondary: #8a8a8a;
  --border: #222222;
  --border-strong: #303030;

  --scrim: rgba(4, 4, 4, 0.72);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --grain-opacity: 0.04;

  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #f8f8f8;
  --surface: #ffffff;
  --surface-2: #f0f0f0;

  --accent: #5b2ee0;
  --accent-strong: #4a22c4;
  --accent-text: #4f23c9;     /* AA on light */
  --accent-soft: rgba(91, 46, 224, 0.08);
  --accent-glow: rgba(91, 46, 224, 0.18);
  --on-accent: #ffffff;

  --text-primary: #0a0a0a;
  --text-secondary: #666666;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;

  --scrim: rgba(255, 255, 255, 0.7);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 24px 50px -30px rgba(40, 20, 90, 0.25);
  --grain-opacity: 0.02;

  color-scheme: light;
}

/* ---------- Motion Tokens ---------- */
:root {
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 700ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);

  /* Layout scale */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(84px, 12vh, 168px);
  --radius: 16px;
  --radius-sm: 10px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --nav-h: 72px;
}

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--duration-base) ease, color var(--duration-base) ease;
}

/* Grain overlay for depth across the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

img, svg {
  display: block;
}

/* the [hidden] attribute must win over component display rules */
[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

.accent {
  color: var(--accent-text);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 1100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--duration-fast) var(--ease-out);
}
.skip-link:focus {
  top: 14px;
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) ease, background var(--duration-base) ease;
  transform: translateY(-100%);
  animation: navDrop var(--duration-slow) var(--ease-out) 0.1s forwards;
}
@keyframes navDrop {
  to { transform: translateY(0); }
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.nav__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Brand lockup: aperture mark + wordmark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-primary);
}
.brand__mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  overflow: visible;
  transition: transform var(--duration-slow) var(--ease-out);
}
.brand:hover .brand__mark {
  transform: rotate(-130deg);
}
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.nav__links {
  display: flex;
  gap: 8px;
  margin-inline-start: auto;
}
.nav__link {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color var(--duration-fast) ease;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}
.nav__link:hover { color: var(--text-primary); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active {
  color: var(--text-primary);
}
.nav__link.is-active::after { transform: scaleX(1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Theme toggle */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-primary);
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.theme-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.theme-toggle__icon {
  position: absolute;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.theme-toggle__icon--sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.theme-toggle__icon--moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme='light'] .theme-toggle__icon--sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme='light'] .theme-toggle__icon--moon { opacity: 0; transform: rotate(90deg) scale(0.4); }

/* Hamburger */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
}
.hamburger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-fast) ease;
}
.hamburger span:nth-child(1) { top: 16px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 26px; }
.hamburger.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding: var(--gutter);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out), visibility var(--duration-base);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-menu__link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 12vw, 68px);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(24px);
}
.mobile-menu.is-open .mobile-menu__link {
  animation: menuIn var(--duration-base) var(--ease-out) forwards;
  animation-delay: calc(0.08s * var(--i) + 0.12s);
}
.mobile-menu__link:active { color: var(--accent-text); }
@keyframes menuIn {
  to { opacity: 1; transform: translateY(0); }
}
.mobile-menu__foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0;
}
.mobile-menu.is-open .mobile-menu__foot {
  animation: menuIn var(--duration-base) var(--ease-out) forwards;
  animation-delay: calc(0.08s * var(--i) + 0.12s);
}
.mobile-menu__foot a { color: var(--accent-text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

/* Signature: giant slow-rotating aperture arc */
.hero__aperture {
  position: absolute;
  right: -16vw;
  top: 50%;
  width: min(86vh, 880px);
  height: min(86vh, 880px);
  translate: 0 -50%;
  color: var(--accent);
  opacity: 0.5;
  pointer-events: none;
  filter: drop-shadow(0 0 60px var(--accent-glow));
  animation: apertureSpin 60s linear infinite;
}
[data-theme='light'] .hero__aperture { opacity: 0.32; }
.hero__aperture svg { width: 100%; height: 100%; overflow: visible; }
@keyframes apertureSpin {
  to { transform: rotate(360deg); }
}

/* Slow living radial glow */
.hero__glow {
  position: absolute;
  inset: -20% -10% auto -20%;
  height: 90%;
  pointer-events: none;
  background:
    radial-gradient(60% 60% at 70% 35%, var(--accent-soft), transparent 70%),
    radial-gradient(45% 45% at 20% 80%, var(--accent-soft), transparent 70%);
  animation: glowDrift 18s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

/* Cursor-reactive colour glow (desktop pointers only) */
.hero__cursor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  mix-blend-mode: screen;
  background:
    radial-gradient(520px 520px at var(--mx, 50%) var(--my, 50%), rgba(124, 92, 255, 0.20), transparent 62%),
    radial-gradient(340px 340px at calc(var(--mx, 50%) + 7%) calc(var(--my, 50%) + 9%), rgba(214, 93, 255, 0.12), transparent 58%),
    radial-gradient(260px 260px at calc(var(--mx, 50%) - 8%) calc(var(--my, 50%) - 6%), rgba(64, 120, 255, 0.10), transparent 58%);
}
.hero.is-pointer .hero__cursor { opacity: 1; }
[data-theme='light'] .hero__cursor {
  mix-blend-mode: multiply;
  background:
    radial-gradient(520px 520px at var(--mx, 50%) var(--my, 50%), rgba(91, 46, 224, 0.12), transparent 62%),
    radial-gradient(340px 340px at calc(var(--mx, 50%) + 7%) calc(var(--my, 50%) + 9%), rgba(168, 60, 224, 0.08), transparent 58%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(40px, 8vh, 96px);
}

/* Hero entrance reveals (JS toggles .is-loaded on body) */
[data-anim] {
  opacity: 0;
}
.is-loaded [data-anim] {
  animation-fill-mode: forwards;
}
.is-loaded .hero__eyebrow { animation: fadeUp var(--duration-base) var(--ease-out) 0.15s forwards; }
.is-loaded .hero__headline { animation: fadeIn var(--duration-fast) ease 0.2s forwards; }
.is-loaded .hero__sub { animation: fadeUpBlur var(--duration-slow) var(--ease-out) 0.95s forwards; }
.is-loaded .hero__cta { animation: popIn var(--duration-base) var(--ease-out) 1.25s forwards; }
.is-loaded .hero__stats { animation: fadeUp var(--duration-base) var(--ease-out) 1.45s forwards; }
.is-loaded .hero__scroll { animation: fadeIn var(--duration-slow) ease 1.8s forwards; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUpBlur {
  from { opacity: 0; transform: translateY(18px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.hero__eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero__headline {
  font-size: clamp(48px, 8.5vw, 104px);
  font-weight: 700;
  max-width: 16ch;
  margin-bottom: 28px;
}

/* Typewriter signature */
.tw { display: inline; }
.tw__line { display: block; }
.tw__caret {
  display: inline-block;
  width: 0.06em;
  height: 0.86em;
  margin-left: 0.06em;
  background: var(--accent);
  vertical-align: -0.04em;
  translate: 0 0.06em;
  animation: caretBlink 0.9s steps(2, start) infinite;
}
@keyframes caretBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.tw.is-done .tw__caret { animation: caretBlink 0.9s steps(2, start) 3; opacity: 0; }
/* characters injected by JS */
.tw .char {
  opacity: 0;
}
.tw.is-animating .char.is-in {
  opacity: 1;
}

.hero__sub {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-secondary);
  max-width: 46ch;
  margin-bottom: 40px;
  line-height: 1.55;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

/* Stat bar */
.hero__stats {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 640px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.stat__divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  translate: -50% 0;
  width: 1px;
  height: 56px;
  overflow: hidden;
  z-index: 2;
}
.hero__scroll-line {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--accent);
  animation: scrollLine 2.2s var(--ease-in-out) infinite;
}
@keyframes scrollLine {
  0% { top: -40%; }
  100% { top: 100%; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  border-radius: 999px;
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.btn:active { transform: scale(0.97); }
.btn__arrow { transition: transform var(--duration-base) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn:hover .btn__arrow--down { transform: translateY(4px); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
/* fill sweep */
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent-strong);
  transform: translateX(-101%);
  transition: transform var(--duration-base) var(--ease-out);
}
.btn--primary:hover {
  box-shadow: 0 12px 36px -10px var(--accent-glow);
}
.btn--primary:hover::before { transform: translateX(0); }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn--ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--surface-2);
  transform: translateX(-101%);
  transition: transform var(--duration-base) var(--ease-out);
}
.btn--ghost:hover { border-color: var(--accent); }
.btn--ghost:hover::before { transform: translateX(0); }

.btn--block { width: 100%; justify-content: center; }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section {
  position: relative;
  padding-block: var(--section-y);
}
.section + .section { padding-top: 0; }

.section__kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
/* arc motif glyph (mini aperture) */
.section__kicker .arc {
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  border-right-color: transparent;
  transform: rotate(-45deg);
}

.section__title {
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 18ch;
}

/* Scroll reveal base */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.about__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.aperture-art {
  position: relative;
  width: 78%;
  height: 78%;
}
.aperture-art__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.aperture-art__svg .aa-ring {
  stroke: var(--accent);
  transform-origin: 100px 100px;
}
.aa-ring--1 { animation: ringSpin 24s linear infinite; opacity: 0.95; }
.aa-ring--2 { stroke: var(--accent-text); animation: ringSpinRev 16s linear infinite; opacity: 0.7; }
.aa-ring--3 { animation: ringSpin 9s linear infinite; opacity: 0.55; }
.aa-core { fill: var(--accent); }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes ringSpinRev { to { transform: rotate(-360deg); } }
.aperture-art__grain {
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, transparent 60%, var(--accent-soft));
  mix-blend-mode: screen;
  pointer-events: none;
}

.about__body { max-width: 46ch; }
.about__title {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 24px;
}
.about__body p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 18px;
  color: var(--text-secondary);
}
.about__body p:first-of-type {
  color: var(--text-primary);
  font-size: 19px;
}
.about__stat {
  font-family: var(--font-mono);
  font-size: 14px !important;
  letter-spacing: 0.02em;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary) !important;
}

/* ============================================================
   SERVICES
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px 28px;
  overflow: hidden;
  transition: border-color var(--duration-base) ease, transform var(--duration-base) var(--ease-out), background var(--duration-base) ease;
}
[data-theme='dark'] .card {
  background: rgba(255, 255, 255, 0.025);
}
/* accent wash that floods on hover */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 100% 0%, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-base) ease;
  pointer-events: none;
}
.service-card { outline: none; }
.service-card:hover,
.service-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.card:hover::before { opacity: 1; }

.card__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 56px;
}
.card__title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.card__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 34ch;
}
.card__arrow {
  position: absolute;
  right: 26px;
  bottom: 24px;
  font-size: 20px;
  color: var(--accent-text);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.service-card:hover .card__arrow,
.service-card:focus-visible .card__arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* CTA tile */
.service-card--cta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
[data-theme='dark'] .service-card--cta { background: var(--accent); }
.service-card--cta::before { display: none; }
.service-card--cta:hover { transform: translateY(-4px); box-shadow: 0 20px 48px -16px var(--accent-glow); }
.service-card--cta .card__title { color: #fff; }
.service-card--cta .card__desc { color: rgba(255, 255, 255, 0.82); }
.service-card__cta-mark {
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
}
.service-card__cta-mark svg { width: 100%; height: 100%; overflow: visible; transition: transform var(--duration-slow) var(--ease-out); }
.service-card--cta:hover .service-card__cta-mark svg { transform: rotate(-130deg); }
.card__link {
  margin-top: 16px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}
.card__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   WORK
   ============================================================ */
.work__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.project {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base) ease, box-shadow var(--duration-base) ease;
}
.project--feature {
  grid-column: 1 / -1;
  min-height: 420px;
}
.project__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  transition: transform var(--duration-slow) var(--ease-out);
}
.project__bg--1 {
  background:
    radial-gradient(80% 120% at 15% 10%, rgba(109, 61, 245, 0.55), transparent 55%),
    linear-gradient(135deg, #1c1130, #0c0c14 65%);
}
.project__bg--2 {
  background:
    radial-gradient(90% 120% at 85% 15%, rgba(91, 46, 224, 0.5), transparent 55%),
    linear-gradient(160deg, #161427, #0b0b12 70%);
}
.project__bg--3 {
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(140, 90, 255, 0.42), transparent 55%),
    linear-gradient(200deg, #1a1424, #0b0b11 70%);
}
[data-theme='light'] .project__bg--1 {
  background: radial-gradient(80% 120% at 15% 10%, rgba(109, 61, 245, 0.28), transparent 55%), linear-gradient(135deg, #efeafb, #ffffff 70%);
}
[data-theme='light'] .project__bg--2 {
  background: radial-gradient(90% 120% at 85% 15%, rgba(91, 46, 224, 0.24), transparent 55%), linear-gradient(160deg, #eef0fb, #ffffff 70%);
}
[data-theme='light'] .project__bg--3 {
  background: radial-gradient(90% 120% at 50% 0%, rgba(140, 90, 255, 0.22), transparent 55%), linear-gradient(200deg, #f1ecfb, #ffffff 70%);
}
/* darkening scrim for legibility */
.project::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, var(--scrim) 0%, transparent 70%);
  opacity: 0.85;
  transition: opacity var(--duration-base) ease;
}
.project:hover {
  transform: scale(1.015);
  border-color: var(--accent);
  box-shadow: 0 30px 70px -30px var(--accent-glow);
}
.project:hover .project__bg { transform: scale(1.06); }
.project:hover::after { opacity: 1; }

.project__content {
  position: relative;
  padding: clamp(24px, 3vw, 40px);
}
.project--feature .project__content { max-width: 60ch; }
.project__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}
[data-theme='light'] .project__tag { color: var(--accent); }
.project__title {
  font-size: clamp(26px, 3.5vw, 40px);
  color: #fff;
  margin-bottom: 12px;
}
[data-theme='light'] .project__title { color: #14101f; }
.project__desc {
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.74);
  max-width: 52ch;
  margin-bottom: 18px;
}
[data-theme='light'] .project__desc { color: #4a4458; }
.project__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}
[data-theme='light'] .project__link { color: #14101f; }
.project__link span {
  transition: transform var(--duration-base) var(--ease-out);
}
.project:hover .project__link span { transform: translateX(5px); }

/* ---- Showcase feature card (real screenshots + browser mockups) ---- */
.project--showcase {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: 500px;
  padding: clamp(28px, 4vw, 60px);
}
/* reversed: mockups on the left, copy on the right */
.project--showcase.project--rev { grid-template-columns: 1.08fr 0.92fr; }
.project--rev .project__mockups { order: 1; }
.project--rev .project__content { order: 2; }

/* Gold treatment — drawn from Honest Table's own brand */
.project--gold {
  --accent: #b5945a;
  --accent-text: #cdb079;
  --accent-glow: rgba(181, 148, 90, 0.42);
}
.project--gold .project__bg {
  background:
    radial-gradient(70% 90% at 12% 18%, rgba(181, 148, 90, 0.18), transparent 60%),
    linear-gradient(140deg, #16110a 0%, #0b0b0e 70%);
}
[data-theme='light'] .project--gold .project__bg {
  background:
    radial-gradient(70% 90% at 12% 18%, rgba(181, 148, 90, 0.2), transparent 60%),
    linear-gradient(140deg, #f3ecdd 0%, #fffdf8 72%);
}
/* Violet treatment — GUHP accent, also the dashboard's own UI colour */
.project--violet .project__bg {
  background:
    radial-gradient(72% 90% at 88% 16%, rgba(109, 61, 245, 0.26), transparent 60%),
    linear-gradient(140deg, #140e26 0%, #0b0b10 70%);
}
[data-theme='light'] .project--violet .project__bg {
  background:
    radial-gradient(72% 90% at 88% 16%, rgba(109, 61, 245, 0.16), transparent 60%),
    linear-gradient(140deg, #efeafb 0%, #fffdff 72%);
}
/* Rust/navy treatment — drawn from This is Props' own brand */
.project--rust {
  --accent: #b4402f;
  --accent-text: #e2917f;
  --accent-glow: rgba(180, 64, 47, 0.4);
}
.project--rust .project__bg {
  background:
    radial-gradient(72% 90% at 12% 18%, rgba(180, 64, 47, 0.2), transparent 58%),
    linear-gradient(140deg, #161a2e 0%, #0c0b0e 70%);
}
[data-theme='light'] .project--rust .project__bg {
  background:
    radial-gradient(72% 90% at 12% 18%, rgba(180, 64, 47, 0.12), transparent 58%),
    linear-gradient(140deg, #f4ece0 0%, #fffdf9 72%);
}

.project--showcase::after { display: none; }
.project--showcase .project__content { padding: 0; max-width: 44ch; }
.project--showcase .project__title { color: #fbf6ec; }
[data-theme='light'] .project--showcase .project__title { color: #1a140a; }
.project--showcase .project__desc { color: rgba(251, 246, 236, 0.72); max-width: 42ch; }
[data-theme='light'] .project--showcase .project__desc { color: #5a5142; }
.project--showcase .project__link { color: #fbf6ec; }
[data-theme='light'] .project--showcase .project__link { color: #1a140a; }
.project--showcase:hover { transform: none; box-shadow: 0 40px 90px -36px rgba(181, 148, 90, 0.3); }

.project__mockups {
  position: relative;
  align-self: stretch;
  min-height: 340px;
}
.browser {
  position: absolute;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0c0c0e;
  box-shadow: 0 36px 70px -26px rgba(0, 0, 0, 0.85);
  transition: transform var(--duration-slow) var(--ease-out);
  will-change: transform;
}
[data-theme='light'] .browser { border-color: rgba(20, 16, 8, 0.12); box-shadow: 0 36px 70px -30px rgba(40, 30, 10, 0.4); }
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme='light'] .browser__bar { background: rgba(20, 16, 8, 0.05); border-bottom-color: rgba(20, 16, 8, 0.08); }
.browser__bar i { width: 9px; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.28); flex: none; }
[data-theme='light'] .browser__bar i { background: rgba(20, 16, 8, 0.2); }
.browser__url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
[data-theme='light'] .browser__url { color: rgba(20, 16, 8, 0.45); background: rgba(20, 16, 8, 0.05); }
.browser img { width: 100%; height: auto; display: block; }

.browser--back {
  width: 60%;
  left: 0;
  top: 4%;
  transform: rotate(-4deg);
  opacity: 0.97;
  z-index: 1;
}
.browser--front {
  width: 80%;
  right: 0;
  bottom: 4%;
  transform: rotate(1.5deg);
  z-index: 2;
}
.project--showcase:hover .browser--front { transform: rotate(0deg) translateY(-6px); }
.project--showcase:hover .browser--back { transform: rotate(-6deg) translate(-10px, -2px); }

/* Directional reveal variants */
[data-reveal][data-dir='left'] { transform: translateX(-40px); }
[data-reveal][data-dir='right'] { transform: translateX(40px); }
[data-reveal][data-dir].is-visible { transform: translate(0, 0); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact__grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.contact__aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact__detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact__detail-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.contact__detail-value {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 500;
}
a.contact__detail-value:hover { color: var(--accent-text); }
.contact__note {
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}
.contact__aside-mark {
  margin-top: 12px;
  width: 84px;
  height: 84px;
  color: var(--accent);
  opacity: 0.55;
}
.contact__aside-mark svg { width: 100%; height: 100%; overflow: visible; animation: apertureSpin 40s linear infinite; }

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, background var(--duration-fast) ease;
  -webkit-appearance: none;
  appearance: none;
}
[data-theme='dark'] .field input,
[data-theme='dark'] .field textarea,
[data-theme='dark'] .field select {
  background: rgba(255, 255, 255, 0.03);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-secondary); opacity: 0.6; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field select:invalid { color: var(--text-secondary); }

.select-wrap { position: relative; }
.select-wrap__chev {
  position: absolute;
  right: 16px;
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
  color: var(--text-secondary);
  font-size: 12px;
}

/* error state */
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #ff5470;
  box-shadow: 0 0 0 4px rgba(255, 84, 112, 0.12);
}
.field__error {
  font-size: 13px;
  color: #ff5470;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--duration-fast) ease, max-height var(--duration-fast) ease;
}
.field.has-error .field__error {
  opacity: 1;
  max-height: 28px;
}

/* submit button states */
#submitBtn { margin-top: 6px; }
.btn__spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 999px;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading .btn__label { opacity: 0; }
.btn.is-loading .btn__spinner { opacity: 1; }

.form-error {
  margin-top: 4px;
  font-size: 14px;
  color: #ff5470;
  text-align: center;
}

/* Success */
.contact__success {
  grid-column: 2 / -1;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(36px, 5vw, 56px);
  text-align: center;
  animation: popIn var(--duration-base) var(--ease-out);
}
[data-theme='dark'] .contact__success { background: rgba(255, 255, 255, 0.025); }
.contact__success-mark {
  width: 64px;
  height: 64px;
  color: var(--accent);
  margin: 0 auto 20px;
}
.contact__success-mark svg { width: 100%; height: 100%; overflow: visible; animation: drawMark 0.9s var(--ease-out) forwards; }
.contact__success h3 { font-size: 30px; margin-bottom: 10px; }
.contact__success p { font-size: 17px; color: var(--text-secondary); }

@keyframes drawMark {
  from { stroke-dasharray: 220; stroke-dashoffset: 220; }
  to { stroke-dasharray: 220; stroke-dashoffset: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 48px;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.brand--footer .brand__mark { width: 34px; height: 34px; }
.brand--footer .brand__word { font-size: 24px; }
.footer__line {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.footer__copy { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about__grid { gap: 40px; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__success { grid-column: 1 / -1; }
  .contact__aside-mark { display: none; }

  /* Showcase stacks: copy above, mockups below */
  .project--showcase {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }
  .project--showcase .project__content { max-width: 60ch; margin-bottom: 18px; }
  .project__mockups { min-height: 0; height: clamp(220px, 46vw, 360px); }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .hamburger { display: block; }
  .hero__aperture { right: -34vw; opacity: 0.35; }
}

@media (max-width: 640px) {
  :root { --nav-h: 64px; }
  .cards { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .about__visual { max-width: 340px; }
  .work__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero__stats { gap: 16px; }
  .stat__divider { display: none; }
  .stat { flex-direction: row; align-items: baseline; gap: 8px; flex: 1 1 100%; }
  .hero__headline { max-width: 100%; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-anim],
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .tw .char { opacity: 1 !important; }
  .tw__caret { display: none; }
  .hero__aperture,
  .hero__glow,
  .aa-ring,
  .contact__aside-mark svg { animation: none !important; }
  .hero__cursor { display: none !important; }
}
