/* Icemint Lab — homepage (direction C v2). Plain CSS, no build step. */

/* Self-hosted Geist (SIL OFL, see assets/fonts/LICENSE.txt). Variable files cover every weight used. */
@font-face { font-family: 'Geist'; src: url('assets/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('assets/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #fbf6f0;
  --ink: #2c1f38;
  --ink-hover: #4a3360;
  --link-hover: #6b3fa0;
  --muted: #5e4d6c;
  --hairline: #2c1f3829;
  --lilac: #c9aef0;
  --rose: #f0a3b9;
  --mint: #9fe8d0;
  --salmon: #f7b19c;
  --term-bg: #2c1f38;
  --term-fg: #fbf6f0;
  --term-dim: #a898b4;
  --term-mid: #d9cfe2;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --pad-x: clamp(20px, 5vw, 120px);
  --fs-label: clamp(12px, 0.78vw, 17px);
  --fs-body: clamp(17px, 1.3vw, 30px);
  --fs-lead: clamp(18px, 1.4vw, 32px);
  --fs-btn: clamp(14px, 0.95vw, 20px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--font-sans); overflow-x: clip; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button { font: inherit; color: inherit; }
img { display: block; }
::selection { background: var(--lilac); color: var(--ink); }
h1, h2, h3, p { margin: 0; }

.label { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; }
.row { display: flex; flex-wrap: wrap; gap: 10px 20px; }

/* Background */
.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; background: var(--bg); }
.bg-grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .08; mix-blend-mode: multiply;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Skip link */
.skip { position: fixed; left: 16px; top: -80px; z-index: 70; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 16px; color: var(--bg); }

/* Header */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: clamp(12px, 1.4vw, 26px) var(--pad-x); }
.pill-glass { border-radius: 999px; background: #fbf6f0b3; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; min-height: 44px; padding: 8px clamp(10px, 1.2vw, 16px) 8px 10px;
  font-weight: 700; letter-spacing: .18em; font-size: clamp(12px, .8vw, 17px); }
.brand img { width: clamp(24px, 1.6vw, 36px); height: clamp(24px, 1.6vw, 36px); object-fit: contain; }
.brand span { padding-left: 10px; white-space: nowrap; }
@media (max-width: 399px) { .brand span { display: none; } }
.nav { display: flex; align-items: center; gap: 4px; padding: 6px; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; min-height: 40px; padding: 0 clamp(10px, 2.6vw, 16px); border-radius: 999px; transition: background .2s; }
.nav a:hover { background: #2c1f3714; color: var(--ink); }
.nav a.nav-cta { background: var(--ink); color: var(--bg); padding: 0 clamp(12px, 2.8vw, 18px); }
.nav a.nav-cta:hover { background: var(--ink-hover); color: var(--bg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; font-size: var(--fs-btn); font-weight: 500;
  padding: clamp(12px, .9vw, 18px) clamp(20px, 1.4vw, 30px); transition: background .2s, color .2s, border-color .2s; }
.btn-solid { background: var(--ink); color: var(--bg); padding: clamp(13px, .95vw, 20px) clamp(22px, 1.5vw, 34px); }
.btn-solid:hover { background: var(--ink-hover); color: var(--bg); }
.btn-ghost { background: #fbf6f099; border: 1px solid #2c1f3833; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-motion { cursor: pointer; background: #fbf6f099; border: 1px solid #2c1f3833; font-family: var(--font-mono); font-weight: 400;
  font-size: clamp(11px, .72vw, 15px); letter-spacing: .08em; text-transform: uppercase; padding: clamp(13px, .95vw, 20px) clamp(16px, 1.1vw, 24px); }
.btn-motion:hover { border-color: var(--ink); }

/* Hero */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(110px, 14vh, 200px) var(--pad-x) clamp(28px, 3.4vw, 72px); }
.hero-inner { display: flex; flex-direction: column; gap: clamp(22px, 2.4vw, 52px); will-change: transform, opacity; }
/* Narrow screens: the copy is a tall stack, so centre it in the viewport instead of pinning it to the bottom. */
@media (max-width: 767px) { .hero { justify-content: center; } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.hero h1 { max-width: 12ch; font-weight: 600; font-size: clamp(58px, 10.5vw, 300px); line-height: .86; letter-spacing: -.065em; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.hero-foot p { max-width: 40ch; font-size: var(--fs-body); line-height: 1.45; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Work */
.work { padding: clamp(80px, 9vw, 220px) var(--pad-x) clamp(40px, 4vw, 100px); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 40px; margin-bottom: clamp(28px, 3vw, 72px); }
.section-head h2 { font: inherit; }
.projects { display: flex; flex-direction: column; gap: clamp(96px, 10vw, 260px); }
.project { display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 140px); scroll-margin-top: 100px; }
.project-media { flex: 1 1 min(100%, 520px); display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.2vw, 28px); padding: clamp(8px, 2vw, 48px) 0; }
.project-media > * { transition: transform .9s var(--ease-out); }
.project-text { flex: 1 1 min(100%, 440px); display: flex; flex-direction: column; gap: clamp(18px, 1.8vw, 40px); }
.project-text h3 { font-weight: 600; font-size: clamp(56px, 7.4vw, 210px); letter-spacing: -.065em; line-height: .88; }
.project-text p { max-width: 32ch; font-size: var(--fs-lead); line-height: 1.4; text-wrap: pretty; }
.project-text .btn { align-self: flex-start; }

/* <picture> is the direct child of [data-tilt], so it carries the layout sizing and is what the tilt moves.
   The <img> keeps radius, shadow and the viewport-height cap, so the shadow always hugs the painted image.
   The img fills its slot only while the slot is narrower than the chosen source (720w / 1440w WebP), which holds
   up to 4K; keep regenerated screenshots at least that wide. */
.pic { display: block; }
.pic-tawen { max-width: min(64%, clamp(240px, 26vw, 900px)); }
/* HashKeep's source is 1080px wide; cap it at Tawen's 574px source width so the two single-phone shots match. */
.pic-hk { max-width: min(64%, clamp(240px, 26vw, 574px)); }
.pic-mf.side { width: 27%; margin-top: 12%; }
.pic-mf.center { width: 33%; }
.shot-tawen, .shot-hk { width: auto; height: auto; max-width: 100%; max-height: min(78svh, 1500px); margin-inline: auto;
  border-radius: clamp(22px, 2vw, 44px); box-shadow: 0 50px 100px #2c1f3838, 0 0 0 1px #2c1f3814; }
.shot-mf { width: auto; height: auto; max-width: 100%; margin-inline: auto; border-radius: clamp(16px, 1.4vw, 32px); }
.shot-mf.side { max-height: min(62svh, 1200px); box-shadow: 0 40px 80px #2c1f3830; }
.shot-mf.center { max-height: min(72svh, 1400px); box-shadow: 0 50px 100px #2c1f3838; }

.terminal { width: min(100%, clamp(300px, 36vw, 1400px)); border-radius: clamp(16px, 1.4vw, 30px); overflow: hidden;
  background: var(--term-bg); color: var(--term-fg); box-shadow: 0 50px 100px #2c1f3840;
  font-family: var(--font-mono); font-size: clamp(12px, 1.05vw, 30px); line-height: 1.9; }
.terminal-bar { display: flex; gap: 7px; padding: 14px 18px; border-bottom: 1px solid #fbf6f01f; }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; }
.terminal-body { display: flex; flex-direction: column; padding: clamp(18px, 1.8vw, 38px); }
.t-dim { color: var(--term-dim); } .t-mid { color: var(--term-mid); } .t-ok { color: var(--mint); }
.cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: middle; background: var(--mint); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* Lab */
.lab { padding: clamp(120px, 12vw, 300px) var(--pad-x) clamp(60px, 6vw, 140px); }
.lab-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: clamp(20px, 2vw, 40px); margin-bottom: clamp(36px, 4vw, 96px); border-bottom: 1px solid var(--hairline); }
.lab-head h2 { font: inherit; }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: clamp(36px, 5vw, 140px); }
.lab-statement { font-weight: 300; font-size: clamp(38px, 4.6vw, 124px); letter-spacing: -.05em; line-height: 1.02; text-wrap: balance; }
.lab-statement strong { font-weight: 600; }
.lab-copy { display: flex; flex-direction: column; gap: clamp(18px, 1.6vw, 32px); font-size: clamp(17px, 1.2vw, 27px); line-height: 1.5; }
.lab-copy p { text-wrap: pretty; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin: clamp(12px, 1.4vw, 28px) 0 0; padding-top: clamp(20px, 1.8vw, 36px);
  border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: clamp(12px, .8vw, 17px); letter-spacing: .06em; text-transform: uppercase; }
.facts div { display: flex; flex-direction: column; gap: 6px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }

/* Footer */
.footer { padding: clamp(100px, 10vw, 260px) var(--pad-x) clamp(24px, 2.4vw, 48px); }
.footer-main { display: flex; flex-direction: column; gap: clamp(16px, 1.6vw, 32px); }
.footer-main p { max-width: 36ch; font-size: var(--fs-body); line-height: 1.45; text-wrap: pretty; }
.footer-email { font-weight: 600; font-size: clamp(26px, 9.4vw, 230px); letter-spacing: -.065em; line-height: .95; white-space: nowrap; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: clamp(60px, 7vw, 160px); padding-top: 20px;
  border-top: 1px solid var(--hairline); font-size: clamp(12px, .78vw, 16px); letter-spacing: .06em; }
.footer-legal nav { display: flex; align-items: center; gap: 24px; }
.footer-legal nav a { padding: 12px 0; }

/* Reveal (JS adds .reveal-ready to <html>) */
.reveal-ready [data-reveal] { opacity: 0; transform: translate3d(0, 60px, 0); transition: opacity 1.2s var(--ease-out), transform 1.4s var(--ease-out); }
.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
}
