/* ---------------------------------------------------------------- fonts -- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens -- */
:root {
  --paper: #fff8f1;
  --paper-2: #ffefe2;
  --paper-3: #ffe6d5;
  --ink: #1a110d;
  --ink-2: #3e2b23;
  --muted: #7c6559;
  --line: rgba(26, 17, 13, .12);
  --line-strong: rgba(26, 17, 13, .22);
  --coral: #ff5a36;
  --coral-ink: #c7361c;
  --amber: #ffb020;
  --rose: #f0468a;
  --plum: #7a2e6e;
  --grad: linear-gradient(105deg, #ffb020 0%, #ff7a1a 30%, #ff4d6e 66%, #8a3ffc 100%);
  --grad-warm: linear-gradient(100deg, #ff7a1a 0%, #ff4d6e 60%, #b03a8b 100%);
  --grad-soft: linear-gradient(145deg, #fff3e4 0%, #ffe8d9 52%, #ffe0ec 100%);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 50px -26px rgba(120, 60, 30, .42);
  --shadow-soft: 0 14px 34px -22px rgba(120, 60, 30, .35);
  --font-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ----------------------------------------------------------------- base -- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: #ffd3a8; color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 750; line-height: 1.05; letter-spacing: -.035em; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 6px; }
[hidden] { display: none !important; }
.skip { position: fixed; left: 16px; top: -90px; z-index: 200; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.narrow { max-width: 820px; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
}
main, .site-header, .site-footer { position: relative; z-index: 2; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-warm { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0; font-family: var(--font-mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--coral); flex: 0 0 auto; }
.card-label { display: block; font-family: var(--font-mono); font-size: .64rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.muted { font-size: .86rem; color: var(--muted); }
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--coral); }
.live-dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid var(--coral); border-radius: 50%; opacity: .55; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.75); opacity: 0; } }

/* --------------------------------------------------------------- header -- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 241, .76);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.site-header.is-scrolled { border-color: var(--line); background: rgba(255, 248, 241, .9); box-shadow: 0 18px 40px -34px rgba(80, 40, 20, .55); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 750; font-size: 1.02rem; letter-spacing: -.025em; }
.brand-sun { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(255, 90, 54, .12); }
.brand-sun::after { content: ""; position: absolute; left: 7px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .75); }
.brand-role { padding-left: 12px; border-left: 1px solid var(--line); font-family: var(--font-mono); font-size: .58rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: .84rem; font-weight: 650; }
.site-nav a { position: relative; padding-block: 6px; }
.site-nav a:not(.nav-contact)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--coral); transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.site-nav a:not(.nav-contact):hover::after { transform: scaleX(1); transform-origin: left; }
.site-nav form { margin: 0; }
.nav-contact { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 17px !important; transition: background .25s, color .25s, border-color .25s, transform .25s; }
.nav-contact:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-1px); }
.text-button { border: 0; background: none; padding: 6px 2px; color: var(--ink); font-weight: 650; }
.text-button:hover { color: var(--coral-ink); }

/* ----------------------------------------------------------------- hero -- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(28px, 4vw, 64px); align-items: center;
  padding-block: clamp(56px, 8vw, 110px) clamp(40px, 6vw, 78px);
}
.hero::before {
  content: ""; position: absolute; z-index: 0; inset: -18% -14% auto -8%; height: 128%; pointer-events: none;
  background:
    radial-gradient(48% 52% at 76% 34%, rgba(255, 176, 32, .3), transparent 70%),
    radial-gradient(38% 44% at 94% 8%, rgba(240, 70, 138, .18), transparent 72%),
    radial-gradient(42% 42% at 8% 82%, rgba(255, 122, 26, .12), transparent 72%);
}
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.hero-hello { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 650; color: var(--muted); letter-spacing: .01em; }
.hero-title { margin: 18px 0 22px; font-size: clamp(3.4rem, 7.4vw, 7rem); font-weight: 800; line-height: .9; letter-spacing: -.058em; }
.hero-title .grad { display: inline-block; padding-bottom: .06em; }
.hero .lead { max-width: 34rem; font-size: clamp(1.04rem, 1.35vw, 1.2rem); line-height: 1.65; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; font-family: var(--font-mono); font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero-meta > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.meta-sep { opacity: .45; }

/* --------------------------------------------------------------- buttons -- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: .87rem; font-weight: 700; letter-spacing: -.01em;
  transition: transform .25s, background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.button:hover { background: var(--grad); border-color: transparent; color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px -16px rgba(255, 90, 54, .7); }
.button .arrow { transition: transform .25s; }
.button:hover .arrow { transform: translate(2px, 2px); }
.button.secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.button.secondary:hover { background: var(--paper-2); border-color: var(--ink); color: var(--ink); box-shadow: none; }
.button.small { min-height: 40px; padding: 8px 16px; font-size: .79rem; }
.button.full { width: 100%; justify-content: center; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: .83rem; font-weight: 700; color: var(--coral-ink); }
.text-link:hover { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.back-link:hover { color: var(--coral-ink); }

/* ----------------------------------------------------------- hero tiles -- */
.hero-visual { min-height: clamp(460px, 50vw, 620px); perspective: 1200px; --mx: 0px; --my: 0px; }
.sun {
  position: absolute; left: 50%; top: 50%; width: 78%; aspect-ratio: 1; transform: translate(-50%, -52%);
  border-radius: 50%; opacity: .9; pointer-events: none;
  background: radial-gradient(circle at 38% 32%, #ffe7a8 0%, #ffc06a 24%, #ff8a5c 48%, rgba(255, 90, 110, .82) 66%, rgba(255, 90, 110, 0) 75%);
  filter: blur(.5px);
}
.sun::after { content: ""; position: absolute; inset: -6%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55); }
.hero-deck { position: absolute; inset: 0; transform-style: preserve-3d; }
.game-tile {
  position: absolute; display: block; width: 56%; aspect-ratio: 16 / 10;
  transform: translate3d(calc(var(--mx) * var(--depth, 1)), calc(var(--my) * var(--depth, 1)), 0) rotate(var(--r, 0deg));
  transition: transform .55s cubic-bezier(.2, .7, .2, 1);
  will-change: transform; z-index: var(--z, 1);
}
.tile-1 { --r: -9deg; --depth: 1; --z: 1; top: 2%; left: 0; }
.tile-2 { --r: 7deg; --depth: -1.4; --z: 2; top: 23%; right: 0; }
.tile-3 { --r: -3deg; --depth: 1.7; --z: 3; bottom: 2%; left: 17%; width: 62%; }
.tile-bob { display: block; height: 100%; animation: float 8s ease-in-out infinite; }
.tile-1 .tile-bob { animation-delay: -1s; }
.tile-2 .tile-bob { animation-delay: -3.2s; }
.tile-3 .tile-bob { animation-delay: -5.4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-13px); } }
.tile-card {
  position: relative; display: block; height: 100%; overflow: hidden; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .7); background: #fff; box-shadow: 0 28px 56px -22px rgba(90, 40, 20, .5);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s;
}
.game-tile:hover .tile-card { transform: translateY(-10px) scale(1.035); box-shadow: 0 36px 66px -22px rgba(90, 40, 20, .6); }
.tile-card img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.tile-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(20, 10, 8, .68)); }
.tile-verb { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 5px 9px; border-radius: 999px; background: rgba(255, 248, 241, .94); font-family: var(--font-mono); font-size: .58rem; font-weight: 700; letter-spacing: .16em; color: var(--ink); }
.tile-play { position: absolute; z-index: 2; top: 11px; right: 11px; padding: 5px 10px; border-radius: 999px; background: var(--grad); color: #fff; font-size: .68rem; font-weight: 750; opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; }
.game-tile:hover .tile-play, .game-tile:focus-visible .tile-play { opacity: 1; transform: none; }
.tile-title { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; color: #fff; font-family: var(--font-display); font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
.hero-note { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-family: var(--font-mono); font-size: .56rem; font-weight: 600; letter-spacing: .17em; color: var(--muted); }
.deck-hint { display: none; margin-top: 10px; font-family: var(--font-mono); font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------------- marquee -- */
.marquee { position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line); background: rgba(255, 255, 255, .42); }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; padding: 13px 0; font-family: var(--font-mono); font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.marquee-track span::after { content: "*"; margin: 0 26px; color: var(--coral); font-size: .55rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* -------------------------------------------------------------- sections -- */
section[id], .case { scroll-margin-top: 92px; }
.section { padding-block: clamp(66px, 9vw, 122px); position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: clamp(30px, 4vw, 52px); }
.section-head h2 { margin-top: 14px; font-size: clamp(2.3rem, 4.7vw, 3.9rem); line-height: .94; letter-spacing: -.05em; }
.note { margin-top: 18px; font-size: .9rem; color: var(--muted); }

/* ---------------------------------------------------------------- about -- */
.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: clamp(34px, 5vw, 76px); align-items: start; }
.about-lead { max-width: 36rem; font-size: clamp(1.18rem, 1.7vw, 1.48rem); line-height: 1.55; color: var(--ink-2); }
.now-card { margin-top: 30px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #fff, #fff3e9); box-shadow: var(--shadow-soft); }
.now-line { display: flex; align-items: center; gap: 9px; margin: 10px 0 8px; font-size: .98rem; }
.now-line strong { font-weight: 750; }
.now-card .muted { margin-top: 2px; }
.toolkit { padding: 26px; border: 1px solid rgba(255, 90, 54, .16); border-radius: var(--radius); background: var(--grad-soft); box-shadow: var(--shadow-soft); }
.toolkit h3 { margin: 12px 0 16px; font-size: 1.55rem; letter-spacing: -.04em; }
.toolkit .muted { margin-top: 16px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.skills span { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .72); font-size: .76rem; font-weight: 650; color: var(--ink-2); }

/* ------------------------------------------------------------- projects -- */
.projects-section { border-block: 1px solid var(--line); background: linear-gradient(180deg, transparent 0%, rgba(255, 239, 226, .62) 18%, rgba(255, 239, 226, .62) 82%, transparent 100%); }
.filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .68); }
.filters button { border: 0; background: transparent; border-radius: 999px; padding: 9px 16px; font-size: .79rem; font-weight: 650; color: var(--muted); transition: background .25s, color .25s; }
.filters button:hover { color: var(--ink); }
.filters button.active { background: var(--ink); color: var(--paper); }
.project-list { display: flex; flex-direction: column; gap: clamp(52px, 7vw, 92px); }
.project-row { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(24px, 4vw, 58px); align-items: center; }
.project-row:nth-child(even) .project-media { order: 2; }
.project-row:nth-child(even) .project-copy { order: 1; }
.project-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .65); background: var(--paper-3); box-shadow: var(--shadow); }
.project-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.project-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20, 10, 8, .48)); opacity: 0; transition: opacity .35s; }
.project-media:hover img { transform: scale(1.045); }
.project-media:hover::after { opacity: 1; }
.media-verb { position: absolute; z-index: 2; top: 16px; left: 16px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 248, 241, .94); font-family: var(--font-mono); font-size: .6rem; font-weight: 700; letter-spacing: .16em; color: var(--ink); }
.media-cta { position: absolute; z-index: 2; right: 16px; bottom: 16px; padding: 8px 13px; border-radius: 999px; background: #fff; color: var(--ink); font-size: .74rem; font-weight: 750; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.project-media:hover .media-cta, .project-media:focus-visible .media-cta { opacity: 1; transform: none; }
.project-media-empty { display: grid; place-items: center; background: var(--grad-soft); }
.empty-initial { font-family: var(--font-display); font-size: clamp(4rem, 10vw, 8rem); font-weight: 800; color: rgba(26, 17, 13, .16); }
.project-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.index { font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.verb { font-family: var(--font-mono); font-size: .64rem; font-weight: 700; letter-spacing: .16em; color: var(--coral-ink); }
.project-copy h3 { margin-bottom: 12px; font-size: clamp(1.85rem, 3vw, 2.75rem); letter-spacing: -.045em; }
.project-copy h3 a:hover { color: var(--coral-ink); }
.project-copy > p { max-width: 34rem; font-size: 1rem; color: var(--muted); }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; background: #e8f2e3; color: #2e6b3b; font-family: var(--font-mono); font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.progress { background: #ffe7d4; color: #a94215; }
.filter-empty { padding: 38px 0; color: var(--muted); }
.project-row.is-hidden { display: none; }
.empty-projects { display: flex; align-items: center; gap: 24px; padding: 36px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255, 255, 255, .55); }
.empty-symbol { display: grid; place-items: center; width: 70px; height: 70px; flex: 0 0 auto; border-radius: 18px; background: var(--grad-soft); color: var(--coral-ink); font-family: var(--font-mono); font-size: 1.55rem; font-weight: 700; }
.empty-projects h3 { margin-bottom: 6px; font-size: 1.35rem; }
.empty-projects p { color: var(--muted); }
.empty-label { margin-left: auto; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .16em; color: var(--muted); white-space: nowrap; }

/* --------------------------------------------------------------- contact -- */
.contact { border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(34px, 6vw, 84px); align-items: start; }
.contact-intro h2 { margin-top: 14px; font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: .94; letter-spacing: -.05em; }
.contact-note { max-width: 26rem; margin-top: 20px; font-size: 1.02rem; color: var(--muted); }
.contact-form { position: relative; overflow: hidden; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(150deg, #fff, #fff2e7); box-shadow: var(--shadow); }
.contact-form::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(58% 58% at 100% 0%, rgba(255, 176, 32, .22), transparent 70%); }
.contact-form > * { position: relative; }
label { display: block; margin-bottom: 16px; font-size: .78rem; font-weight: 700; letter-spacing: .01em; color: var(--ink-2); }
input:not([type=checkbox]), textarea, select { display: block; width: 100%; margin-top: 7px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255, 255, 255, .82); color: var(--ink); font: inherit; font-size: .94rem; transition: border-color .2s, box-shadow .2s, background .2s; }
input::placeholder, textarea::placeholder { color: #a68e80; }
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 90, 54, .12); background: #fff; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 4px; }
.form-bottom > span { max-width: 190px; font-size: .74rem; color: var(--muted); }
.honeypot { position: absolute; left: -10000px; }
.notice { margin-top: 20px; padding: 14px 18px; border: 1px solid #f4c7a9; border-radius: 12px; background: #fff1e5; color: var(--ink); font-size: .9rem; }
.notice.success { border-color: #bfe0c7; background: #eef8f0; }
form .notice { margin-bottom: 18px; }

/* ---------------------------------------------------------------- footer -- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(44px, 6vw, 80px) 34px; background: linear-gradient(180deg, transparent, var(--paper-2)); overflow: hidden; }
.footer-inner { display: flex; flex-direction: column; gap: 26px; }
.footer-word { font-family: var(--font-display); font-size: clamp(2.7rem, 10.5vw, 8.4rem); font-weight: 800; line-height: .84; letter-spacing: -.065em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: var(--coral-ink); }

/* ------------------------------------------------------------ case page -- */
.case { padding-block: clamp(34px, 5vw, 56px) clamp(70px, 9vw, 112px); }
.case-head { max-width: 940px; margin-top: 26px; }
.case-title { margin: 16px 0 18px; font-size: clamp(3rem, 7vw, 6rem); line-height: .9; letter-spacing: -.06em; }
.case-head .lead { max-width: 46rem; font-size: clamp(1.08rem, 1.5vw, 1.28rem); line-height: 1.6; color: var(--ink-2); }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.case-media { position: relative; margin: clamp(34px, 5vw, 62px) 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .65); border-radius: 28px; box-shadow: var(--shadow); background: var(--paper-3); }
.case-media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.case-media figcaption { padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; font-family: var(--font-mono); font-size: .6rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.case-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); align-items: start; }
.case-aside { position: sticky; top: 104px; }
.meta-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .62); box-shadow: var(--shadow-soft); }
.meta-row { display: grid; gap: 7px; padding-block: 15px; border-top: 1px solid var(--line); }
.meta-row:first-child { padding-top: 0; border-top: 0; }
.meta-row > span { font-family: var(--font-mono); font-size: .6rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.meta-row strong { font-size: 1rem; font-weight: 750; }
.meta-row .skills { margin-top: 0; }
.case-body { max-width: 740px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; line-height: 1.82; color: var(--ink-2); }
.next-case { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-top: clamp(56px, 8vw, 92px); padding-top: 26px; border-top: 1px solid var(--line); }
.next-case > span { font-family: var(--font-mono); font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.next-case a { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 750; letter-spacing: -.04em; }
.next-case a:hover { color: var(--coral-ink); }

/* ------------------------------------------------------------------ login -- */
.login { max-width: 460px; padding-block: clamp(60px, 10vw, 110px); }
.page-title { margin: 16px 0 18px; font-size: clamp(2.2rem, 4.5vw, 3.6rem); letter-spacing: -.05em; }
.login .page-title { font-size: clamp(2.4rem, 5vw, 3.2rem); }
.login form { margin-top: 26px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .6); box-shadow: var(--shadow-soft); }

/* ---------------------------------------------------------------- admin -- */
.dashboard { padding-block: clamp(34px, 5vw, 56px) 80px; }
.dashboard .page-title { margin: 8px 0 0; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 24px; margin: 26px 0 30px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .64rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.admin-nav a:hover { color: var(--coral-ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.stats > div { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .62); box-shadow: var(--shadow-soft); }
.stats span { font-family: var(--font-mono); font-size: .6rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stats strong { display: block; margin-top: 10px; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--ink); letter-spacing: -.05em; }
.panel { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .62); box-shadow: var(--shadow-soft); }
.panel h2 { margin: 0 0 8px; font-size: 1.2rem; }
.two-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 9px; height: 190px; margin-top: 22px; }
.chart-column { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.chart-count { font-family: var(--font-mono); font-size: .62rem; color: var(--muted); }
.bar-svg { width: 72%; height: 120px; margin-top: auto; overflow: visible; }
.bar-svg rect { fill: var(--coral); }
.chart-date { margin-top: 10px; font-family: var(--font-mono); font-size: .6rem; color: var(--muted); }
.stat-line { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); font-size: .86rem; }
.stat-line span { min-width: 0; overflow-wrap: anywhere; }
.admin-section { margin-top: 52px; }
.admin-section > h2, .admin-section .section-head > h2 { margin-bottom: 18px; font-size: 1.8rem; }
.admin-project { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.admin-project:first-child { padding-top: 0; }
.admin-project:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-project h3 { margin-bottom: 10px; font-size: 1.25rem; }
.admin-project .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-project .actions form { margin: 0; }
.admin-empty p { max-width: 650px; margin-top: 10px; color: var(--muted); }
.messages { display: grid; gap: 16px; }
.message .section-head { margin-bottom: 10px; }
.message time { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; color: var(--muted); }
.message .prose { margin-block: 18px; }
.message .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.message .actions form { margin: 0; }
.editor .muted { display: inline; }
.editor > p { margin: -6px 0 22px; }
.editor .form-row .muted { display: inline; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.check input { width: 18px; height: 18px; accent-color: var(--coral); }
.danger { color: #a92d22; }
.danger:hover { color: #7e1d15; }

/* ----------------------------------------------------------------- error -- */
.error-page { padding-block: clamp(70px, 12vw, 150px); }
.error-page .page-title { font-size: clamp(3rem, 8vw, 6rem); }

/* ------------------------------------------------------------- responsive -- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { min-height: 0; perspective: none; }
  .sun { position: relative; left: auto; top: auto; width: min(72%, 460px); margin: 0 auto; transform: none; }
  .hero-deck { position: relative; display: flex; gap: 16px; margin-top: -56px; padding: 8px 4px 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .game-tile { position: relative; inset: auto; flex: 0 0 74%; width: auto; transform: none !important; scroll-snap-align: center; }
  .tile-bob { animation: none; }
  .hero-note { position: static; flex-direction: row; justify-content: space-between; margin-top: 8px; }
  .deck-hint { display: block; }
  .about-grid, .contact-grid, .case-grid { grid-template-columns: 1fr; }
  .contact-grid { gap: 30px; }
  .case-aside { position: static; }
  .case-body { max-width: none; }
  .project-row, .project-row:nth-child(even) { grid-template-columns: 1fr; }
  .project-row:nth-child(even) .project-media, .project-row:nth-child(even) .project-copy { order: initial; }
  .project-row .project-media { order: 1; }
  .project-row .project-copy { order: 2; }
  .brand-role { display: none; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 66px; }
  .site-nav { gap: 16px; font-size: .78rem; }
  .site-nav a:not(.nav-contact):first-child { display: none; }
  .nav-contact { padding: 7px 13px !important; }
  .hero { padding-block: 40px 30px; }
  .hero-title { font-size: clamp(3rem, 13.5vw, 4.8rem); }
  .hero-hello { font-size: .78rem; align-items: flex-start; }
  .hero-actions .button { flex: 1 1 auto; }
  .marquee-track span { padding-block: 11px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .project-copy h3 { font-size: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-bottom { flex-direction: column; align-items: stretch; }
  .form-bottom > span { max-width: none; order: 2; }
  .stats { grid-template-columns: 1fr; }
  .two-panels { grid-template-columns: 1fr; }
  .chart { gap: 5px; }
  .chart-date { font-size: .52rem; }
  .footer-meta { flex-direction: column; align-items: flex-start; }
  .case-title { font-size: clamp(2.7rem, 12vw, 4rem); }
}
@media (max-width: 440px) {
  .game-tile { flex-basis: 84%; }
  .tile-title { font-size: .78rem; }
  .empty-projects { flex-direction: column; align-items: flex-start; }
  .empty-label { margin-left: 0; }
}

/* --------------------------------------------------------------- motion -- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .project-row.reveal:nth-child(2) { transition-delay: .07s; }
.js .project-row.reveal:nth-child(3) { transition-delay: .14s; }
.js .project-row.reveal:nth-child(4) { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .game-tile { transform: rotate(var(--r, 0deg)) !important; }
}
