@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/geist-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/geist-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/geist-mono-latin-400-normal.woff2') format('woff2'); }

:root {
  --canvas: #FBFBFA;
  --surface: #FFFFFF;
  --ink: #111111;
  --text: #2F3437;
  --muted: #787774;
  --line: #EAEAEA;
  --green-bg: #EDF3EC; --green: #346538;
  --yellow-bg: #FBF3DB; --yellow: #956400;
  --serif: 'Instrument Serif', 'Newsreader', Georgia, serif;
  --sans: 'Geist', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  --mono: 'Geist Mono', 'SF Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; }

/* One very faint warm light behind the hero, fixed so it never scrolls with content. */
.ambient {
  position: fixed; inset: -20vh -20vw auto auto; width: 80vw; height: 80vh;
  pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(214, 170, 110, 0.09), transparent);
  opacity: 0.6;
}
/* Faint grain over the page: dithers the glow's 8-bit banding and gives the canvas a paper feel. */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: 0.035;
  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");
}

.wrap { position: relative; z-index: 1; width: min(100% - 32px, 1040px); margin-inline: auto; }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 251, 250, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 500; letter-spacing: -0.01em; }
.mark svg { width: 26px; height: 26px; }
.top nav { display: flex; gap: 28px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); transition: color 150ms ease; }
.top nav a:hover { color: var(--ink); }

/* ---- hero ---- */
.hero { padding: 136px 0 104px; }
.eyebrow { font: 400 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 28px; }
h1 {
  font: 400 clamp(48px, 8.4vw, 92px)/1.02 var(--serif);
  letter-spacing: -0.03em; color: var(--ink); margin: 0; max-width: 13ch;
}
h1 em { font-style: italic; }
.lede { font-size: clamp(18px, 2vw, 20px); line-height: 1.55; max-width: 34em; margin: 32px 0 0; color: var(--text); }

/* ---- sections ---- */
section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; margin-bottom: 48px; align-items: baseline; }
h2 { font: 400 clamp(34px, 4.4vw, 46px)/1.08 var(--serif); letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 34em; }

/* ---- apps (asymmetric bento) ---- */
.apps { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 36px; display: flex; flex-direction: column; gap: 22px; min-height: 380px;
  transition: box-shadow 200ms ease;
}
.card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-icon { width: 64px; height: 64px; border-radius: 15px; border: 1px solid rgba(0, 0, 0, 0.06); }
.badge {
  font: 400 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 9999px; white-space: nowrap;
}
.badge.live { background: var(--green-bg); color: var(--green); }
.badge.soon { background: var(--yellow-bg); color: var(--yellow); }
.card h3 { font: 500 24px/1.2 var(--sans); letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.card p { margin: 0; }
.card .where { font: 400 13px/1.4 var(--mono); color: var(--muted); }
.card .spacer { flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  background: var(--ink); color: #FFFFFF; border-radius: 6px; text-decoration: none;
  font: 500 15px/1 var(--sans); transition: background 150ms ease, transform 90ms ease;
}
.btn:hover { background: #333333; }
.btn:active { transform: scale(0.98); }
.btn svg { width: 14px; height: 14px; }
.quiet { color: var(--muted); font-size: 15px; }

/* ---- about ---- */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.about-body p { margin: 0 0 20px; max-width: 36em; }
.facts { margin: 36px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); max-width: 36em; }
.facts li { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts span:first-child { font: 400 12px/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts span:last-child { text-align: right; color: var(--ink); }

/* ---- contact ---- */
.contact { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.mail { font: 400 clamp(30px, 4.6vw, 52px)/1.1 var(--serif); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color 150ms ease; }
.mail:hover { border-bottom-color: var(--ink); }
.contact-body p { margin: 24px 0 0; color: var(--muted); max-width: 34em; }
.contact-body a:not(.mail) { color: var(--text); }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer nav { display: flex; gap: 24px; }

/* ---- legal page ---- */
.legal { padding: 112px 0 96px; }
.legal h1 { font-size: clamp(44px, 7vw, 72px); max-width: none; }
.legal .updated { font: 400 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 24px 0 56px; }
.legal h2 { font-size: 28px; margin: 48px 0 12px; }
.legal p, .legal li { max-width: 38em; }
.legal ul { padding-left: 20px; }

/* ---- entry motion (only when JS runs, and never for reduced motion) ---- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- small screens ---- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top nav { gap: 18px; font-size: 14px; }
  .hero { padding: 88px 0 72px; }
  section { padding: 72px 0; }
  .section-head, .about, .contact { grid-template-columns: 1fr; gap: 16px; }
  .section-head { margin-bottom: 32px; }
  .apps { grid-template-columns: 1fr; }
  .card { padding: 28px; min-height: 0; }
  .card-foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) { .top nav a[href="#about"] { display: none; } }
