/* ==========================================================================
   Silva Ventures — styles
   ========================================================================== */

/* Self-hosted fonts (no third-party requests) */
@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-tight-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-regular.woff2") format("woff2");
}

:root {
  --bg: #000;
  --cream: #F3E9C6;
  --cream-dim: rgba(243, 233, 198, .72);
  --grey: #8c8a84;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --orange: #f0782d;
  --cols: 6;
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 56px);
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Playfair Display", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--cream); color: #000; }
:focus-visible { outline: 1px solid var(--cream); outline-offset: 4px; border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--cream); color: #000; padding: 8px 14px; border-radius: 999px; font-size: 13px;
}
.skip:focus { top: 16px; }

/* ---------- Layout primitives ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }

/* Fixed architectural grid lines */
.gridlines {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
}
.gridlines__inner {
  height: 100%;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr);
}
.gridlines__inner i { border-left: 1px solid var(--line); }
.gridlines__inner i:nth-child(6) { border-right: 1px solid var(--line); }

/* ---------- Type ---------- */
.meta {
  font-size: 12.5px; line-height: 1.4; color: var(--grey);
  letter-spacing: .005em; font-weight: 400;
}
.meta--warm { color: rgba(243, 233, 198, .55); }

.display {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .98;
  color: var(--cream);
}
.display em, .card__name em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.015em;
  font-size: 1.1em;
  line-height: .8;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 50;
  top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 22px;
  background: rgba(22, 21, 20, .62);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  white-space: nowrap;
}
.nav__brand {
  font-weight: 700; letter-spacing: -.035em; font-size: 17px; margin-right: 28px;
}
.nav__brand { display: flex; align-items: center; padding: 6px 0; }
.nav__brand img { display: block; height: 19px; width: auto; }
.nav__links { display: flex; gap: 4px; }
.nav__links a, .nav__cta {
  font-size: 13px; color: rgba(255, 255, 255, .82);
  padding: 8px 12px; border-radius: 999px;
  transition: color .25s, background-color .25s;
}
.nav__links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav__cta {
  margin-left: 6px; color: #fff;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 8px 14px;
}
.nav__cta:hover { background: rgba(255, 255, 255, .22); }
.nav__cta span { display: inline-block; transition: transform .3s var(--ease); }
.nav__cta:hover span { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(150px, 26vh, 280px);
  padding-bottom: clamp(40px, 6vh, 64px);
  row-gap: 22px;
  align-items: end;
}
.hero__m1 { grid-column: 1; grid-row: 1; }
.hero__m2 { grid-column: 2; grid-row: 1; }
.hero__m3 { grid-column: 3; grid-row: 1; }
.hero__title { grid-column: 1 / 4; grid-row: 2; font-size: clamp(44px, 5.6vw, 80px); padding-bottom: 6px; }
.hero__rule { grid-column: 1 / 4; grid-row: 3; height: 1px; background: var(--line-strong); align-self: start; }
.hero__sub {
  grid-column: 4 / 6; grid-row: 3 / 5; align-self: start;
  font-size: clamp(40px, 4.8vw, 68px);
  margin-top: 18px;
}
.hero__side {
  grid-column: 5 / 7; grid-row: 3 / 5;
  display: flex; flex-direction: column; align-items: flex-end; gap: 28px;
  padding-top: clamp(16px, 4vw, 48px);
}

.line { display: block; overflow: hidden; padding: 0 .12em .1em 0; margin-bottom: -.1em; }
.line > span { display: inline-block; }

/* "Let's talk" pill */
.talk {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px 11px 16px;
  background: #fff; color: #111;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .7),
    0 0 18px 3px rgba(255, 196, 80, .55),
    0 0 52px 10px rgba(255, 80, 30, .35);
  transition: box-shadow .5s var(--ease), transform .5s var(--ease);
}
.talk:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .9),
    0 0 24px 5px rgba(255, 196, 80, .7),
    0 0 72px 16px rgba(255, 80, 30, .45);
}
.talk__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.talk__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e;
  animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.talk__arrow { transition: transform .3s var(--ease); }
.talk:hover .talk__arrow { transform: translateX(3px); }

/* Project logo row */
.logos {
  display: flex; gap: 22px; padding-inline: 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}
.logo {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 11px; font-weight: 700; letter-spacing: -.02em;
  border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .4s var(--ease), border-color .3s;
}
a.logo:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .4); }
.logo--sp { background: radial-gradient(circle at 30% 20%, #2a2a28, #060606 70%); color: #f2f2ef; box-shadow: 0 0 18px rgba(240, 120, 45, .35); }
.logo--p2 { background: radial-gradient(circle at 30% 25%, #fff6dc, #d9c79a 60%, #8a7a52); color: #1d1a10; }
.logo--p3 { background: radial-gradient(circle at 30% 25%, #4a4a4a, #1a1a1a); color: var(--cream); }
.logo--ghost { background: #151515; }
.logo--lg { width: 56px; height: 56px; font-size: 15px; }

/* ---------- Glow panel ---------- */
.glow {
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(440px, 76vh, 800px);
  background: linear-gradient(180deg,
    #b2440d 0%, #9a2e09 18%, #741304 38%, #4a0402 58%, #1c0100 78%, #000 100%);
}
.glow__bloom, .glow__bloom::after {
  position: absolute; inset: -12% -8% 25%;
  pointer-events: none; transform-origin: 50% 0;
}
.glow__bloom {
  background:
    radial-gradient(28% 58% at 26% 10%, rgba(255, 214, 178, 1), rgba(252, 160, 100, .75) 38%, rgba(240, 110, 40, .25) 62%, transparent 78%),
    radial-gradient(26% 52% at 70% 10%, rgba(255, 196, 150, .95), rgba(245, 135, 65, .6) 40%, rgba(230, 100, 30, .2) 64%, transparent 78%);
  filter: blur(6px);
  animation: breathe 9s ease-in-out infinite alternate;
}
.glow__bloom::after {
  content: ""; inset: 0;
  background: radial-gradient(60% 70% at 50% 0%, rgba(235, 120, 40, .45), transparent 70%);
  animation: breathe 13s ease-in-out -4s infinite alternate-reverse;
}
@keyframes breathe {
  0% { opacity: .78; transform: scale(1) translateY(0); }
  100% { opacity: 1; transform: scale(1.07) translateY(1.5%); }
}
.grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: var(--grain); background-size: 220px;
  opacity: .22; mix-blend-mode: overlay;
}
.chart {
  position: absolute; z-index: 3;
  top: 2.5%; right: 2.5%;
  width: min(60%, 760px); height: auto; overflow: visible;
  filter: drop-shadow(0 0 10px rgba(255, 220, 170, .25));
}
.glow__caption {
  position: absolute; z-index: 3; left: 24px; bottom: 22px;
  display: flex; gap: 28px;
}

/* ---------- Sections ---------- */
.section { padding-top: clamp(110px, 14vw, 190px); }
.section__head { margin-bottom: clamp(40px, 6vw, 72px); align-items: baseline; row-gap: 14px; }
.section__label { grid-column: 1; }
.section__title { grid-column: 2 / 6; font-size: clamp(40px, 5.4vw, 76px); }

/* Projects */
.cards { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card {
  grid-column: span 2;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: clamp(360px, 34vw, 460px);
  padding: 28px 26px 26px;
  transition: box-shadow .6s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 55% at var(--mx, 50%) 0%, rgba(255, 200, 150, .9), rgba(240, 115, 45, .5) 40%, transparent 75%),
    linear-gradient(180deg, #a83a0c 0%, #6a0d04 40%, #1c0100 78%, #000 100%);
  opacity: 0; transition: opacity .6s var(--ease);
}
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); background-size: 220px;
  mix-blend-mode: overlay; opacity: 0; transition: opacity .6s var(--ease);
}
.card:hover::before, .card:focus-within::before { opacity: 1; }
.card:hover::after, .card:focus-within::after { opacity: .25; }
.card:hover { box-shadow: 0 30px 80px -30px rgba(240, 100, 30, .55); }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.card__name {
  margin-top: auto; padding-top: 48px;
  font-size: clamp(28px, 2.6vw, 38px); font-weight: 700; letter-spacing: -.04em; line-height: 1;
}
.card__desc { margin-top: 12px; max-width: 30ch; color: var(--cream-dim); font-size: 16px; transition: color .4s; }
.card:hover .card__desc { color: var(--cream); }
.card__link {
  margin-top: 28px; align-self: flex-start;
  font-size: 13px; color: var(--cream);
  padding-bottom: 2px; border-bottom: 1px solid rgba(243, 233, 198, .35);
}
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link--muted { color: var(--grey); border-bottom-color: transparent; }
.card__link--muted::after { content: none; }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid; background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--live { color: #86efac; border-color: rgba(134, 239, 172, .3); }
.status--live::before { box-shadow: 0 0 8px #22c55e; }
.status--beta { color: #fcd34d; border-color: rgba(252, 211, 77, .3); }
.status--soon { color: #b5b2aa; border-color: rgba(181, 178, 170, .28); }

/* About */
.about { align-items: center; row-gap: 56px; }
.about__text { grid-column: 2 / 5; display: grid; gap: 22px; padding-right: 24px; }
.about__text > p { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--cream-dim); letter-spacing: -.01em; }
.about__text > p:first-child { color: var(--cream); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.facts dd { font-size: 14px; margin-top: 4px; }
.about__orb { grid-column: 5 / 7; display: grid; place-items: center; }
.orb {
  position: relative; isolation: isolate; overflow: hidden;
  width: min(100%, 380px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #ffe0bd 0%, #f6a060 16%, #e0601e 34%, #9a220a 55%, #3a0402 78%, #000 100%);
  box-shadow: 0 0 120px 10px rgba(230, 90, 30, .28);
  animation: orb 10s ease-in-out infinite alternate;
}
.orb__core {
  position: absolute; inset: -20%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 210, 160, .35), transparent 30%, rgba(120, 10, 0, .5), transparent 65%, rgba(255, 150, 70, .3), transparent);
  filter: blur(28px); mix-blend-mode: soft-light;
  animation: spin 24s linear infinite;
}
@keyframes orb { 0% { transform: scale(.97) translateY(6px); } 100% { transform: scale(1.03) translateY(-6px); } }
@keyframes spin { to { transform: rotate(1turn); } }

/* Build log timeline */
.timeline { position: relative; }
.timeline::before {
  /* sits exactly on the 3rd grid line (2 of 6 columns in) */
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(100% / 3); width: 1px;
  background: linear-gradient(180deg, var(--cream), var(--orange) 55%, rgba(240, 120, 45, .25));
  transform: scaleY(var(--p, 0)); transform-origin: top;
}
.tl { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding-block: 30px; }
.tl::before {
  content: ""; position: absolute; top: 36px; left: calc(100% / 3); z-index: 1;
  width: 9px; height: 9px; border-radius: 50%; translate: -4px 0;
  background: #000; border: 1px solid rgba(243, 233, 198, .45);
  transition: background-color .5s, box-shadow .5s, border-color .5s;
}
.tl.is-in::before { background: var(--cream); border-color: var(--cream); box-shadow: 0 0 14px rgba(255, 170, 90, .8); }
.tl__date { grid-column: 1 / 3; text-align: right; padding-right: 32px; padding-top: 2px; }
.tl__body { grid-column: 3 / 6; padding-left: 32px; }
.tl__body h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; margin-top: 8px; }
.tl__body p { color: var(--cream-dim); margin-top: 8px; max-width: 46ch; }
.tl__body a { border-bottom: 1px solid rgba(243, 233, 198, .4); }
.tl__tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.tl__tag--hot { color: var(--orange); }

/* Contact */
.contact { padding-bottom: clamp(90px, 12vw, 160px); }
.contact .section__label { grid-column: 1 / -1; margin-bottom: 24px; }
.contact__title { grid-column: 1 / -1; font-size: clamp(56px, 11.5vw, 172px); letter-spacing: -.055em; line-height: .92; }
.contact__links {
  grid-column: 4 / 7; margin-top: clamp(40px, 6vw, 72px);
  display: flex; flex-direction: column; gap: 22px;
}
.contact__email {
  align-self: flex-start;
  font-size: clamp(22px, 2.4vw, 32px); font-weight: 500; letter-spacing: -.03em;
  border-bottom: 1px solid rgba(243, 233, 198, .4); padding-bottom: 4px;
  transition: border-color .3s, color .3s;
}
.contact__email:hover { border-color: var(--cream); color: #fff; }
.socials { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.socials a { font-size: 13px; color: var(--grey); transition: color .25s; }
.socials a:hover { color: var(--cream); }

/* Footer */
.footer { border-top: 1px solid var(--line-strong); padding: 28px 0 40px; }
.footer .meta { display: flex; flex-wrap: wrap; gap: 6px 0; }
.footer .meta > * + *::before { content: "·"; margin: 0 10px; color: #444; }
.footer a:hover { color: var(--cream); }

/* ---------- Motion: reveal ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Headline lines slide up from behind a mask instead */
.js .line[data-reveal] { opacity: 1; transform: none; }
.js .line[data-reveal] > span {
  transform: translateY(105%); opacity: 0;
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.js .line[data-reveal].is-in > span { transform: none; opacity: 1; }

/* Chart draws itself (dash values set in JS) */
.chart__line, .chart__head { will-change: stroke-dashoffset; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__title { grid-column: 1 / 5; }
  .hero__rule { grid-column: 1 / 5; }
  .about__text { grid-column: 1 / 5; }
  .about__orb { grid-column: 5 / 7; }
}

@media (max-width: 768px) {
  :root { --cols: 2; }
  .gridlines__inner i:nth-child(n+3) { display: none; }
  .gridlines__inner i:nth-child(2) { border-right: 1px solid var(--line); }

  .nav { padding-left: 18px; gap: 4px; }
  .nav__brand { margin-right: 10px; font-size: 16px; }
  .nav__brand img { height: 16px; }

  .hero { padding-top: 140px; row-gap: 18px; }
  .hero__m1 { grid-column: 1; grid-row: 1; }
  .hero__m2 { grid-column: 2; grid-row: 1; padding-left: 12px; }
  .hero__m3 { grid-column: 2; grid-row: 2; padding-left: 12px; }
  .hero__title { grid-column: 1 / -1; grid-row: 3; font-size: clamp(42px, 12vw, 64px); margin-top: 24px; }
  .hero__rule { grid-column: 1 / -1; grid-row: 4; }
  .hero__sub { grid-column: 2 / 3; grid-row: 5; margin-top: 8px; padding-left: 12px; font-size: clamp(38px, 11vw, 56px); }
  .hero__side { grid-column: 1 / -1; grid-row: 6; align-items: flex-start; padding-top: 36px; gap: 24px; }

  .glow { height: clamp(380px, 70vh, 560px); }
  .chart { width: 92%; top: 8%; right: 4%; }
  .glow__caption { left: 16px; bottom: 16px; }

  .section__label { grid-column: 1 / -1; }
  .section__title { grid-column: 1 / -1; }

  .card { grid-column: 1 / -1; min-height: 320px; border-bottom: 1px solid var(--line); }
  .card:last-child { border-bottom: 0; }

  .about__text { grid-column: 1 / -1; padding-right: 0; }
  .about__orb { grid-column: 1 / -1; }
  .orb { width: min(80%, 320px); }
  .facts { grid-template-columns: 1fr 1fr; }

  .timeline::before, .tl::before { left: 0; }
  .tl { grid-template-columns: 1fr; padding-block: 24px; }
  .tl::before { top: 27px; }
  .tl__date, .tl__body { grid-column: 1; text-align: left; padding: 0 0 0 24px; }

  .contact__links { grid-column: 1 / -1; }
  .prose { grid-column: 1 / -1; }

  .footer .meta { flex-direction: column; gap: 6px; }
  .footer .meta > * + *::before { content: none; }
}

@media (max-width: 560px) {
  .nav__links { display: none; }
  .nav { top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---------- Smooth scroll (Lenis) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Scroll progress along the last grid line ---------- */
.gridlines__inner { position: relative; }
.gridlines__progress {
  position: absolute; top: 0; right: 0; width: 1px; height: 100%;
  background: linear-gradient(180deg, var(--cream), var(--orange) 70%, #b2280a);
  box-shadow: 0 0 10px rgba(255, 150, 70, .55);
  transform: scaleY(var(--sp, 0)); transform-origin: top;
}

/* ---------- Nav language switch ---------- */
.nav__lang {
  font-size: 12px; letter-spacing: .06em; color: var(--grey);
  padding: 8px 8px; border-radius: 999px; transition: color .25s;
}
.nav__lang:hover { color: var(--cream); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 14px/1 var(--sans); letter-spacing: -.01em;
  background: #fff; color: #111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 0 16px 2px rgba(255, 196, 80, .4), 0 0 44px 8px rgba(255, 80, 30, .25);
  transition: box-shadow .5s var(--ease), transform .5s var(--ease);
}
.btn:hover { box-shadow: 0 0 0 1px #fff, 0 0 22px 4px rgba(255, 196, 80, .6), 0 0 64px 14px rgba(255, 80, 30, .4); }
.btn--ghost {
  background: transparent; color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(243, 233, 198, .3);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--cream); }

/* Input + button in one pill */
.field {
  display: flex; align-items: center; gap: 6px; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .3s;
}
.field:focus-within { border-color: rgba(243, 233, 198, .45); }
.field input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  background: transparent; border: 0; outline: 0;
  font: 400 15px var(--sans); color: var(--cream);
}
.field input::placeholder { color: #6f6d68; }
.field .btn { padding: 12px 18px; }
.field + .meta { margin-top: 12px; padding-left: 20px; }

/* ---------- Glow panel stats ---------- */
.glow__stats {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 68px;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
}
.stat { padding-left: 24px; }
.stat__num { display: block; font-size: clamp(40px, 5vw, 76px); font-weight: 700; letter-spacing: -.055em; line-height: 1; }
.stat__label { display: block; margin-top: 10px; }

/* ---------- Card previews ---------- */
.card { min-height: clamp(420px, 40vw, 520px); }
.card__preview {
  position: absolute; left: 26px; right: 26px; top: 100px; z-index: 1;
  aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16); background: #0b0b0b;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85);
  opacity: 0; transform: translateY(16px) scale(.97);
  transition: opacity .6s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}
.card:hover .card__preview, .card:focus-within .card__preview { opacity: 1; transform: none; }
.card__bar { display: flex; gap: 5px; align-items: center; height: 18px; padding: 0 8px; background: #161616; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.card__bar i { width: 6px; height: 6px; border-radius: 50%; background: #3a3a3a; }
.card__preview img { display: block; width: 100%; height: calc(100% - 18px); object-fit: cover; object-position: top; }
.card__links { margin-top: 28px; display: flex; gap: 20px; align-items: baseline; position: relative; z-index: 2; }
.card__links .card__link { margin-top: 0; }
.card__ext { position: relative; z-index: 3; font-size: 13px; color: var(--grey); transition: color .25s; }
.card__ext:hover { color: var(--cream); }
/* Abstract mock for products without screenshots yet */
.mock { height: calc(100% - 18px); padding: 10% 9%; display: grid; grid-template-rows: auto auto 1fr; gap: 8px; }
.mock b { display: block; height: 9px; border-radius: 4px; background: rgba(243, 233, 198, .16); }
.mock b:first-child { width: 55%; height: 14px; background: rgba(243, 233, 198, .4); }
.mock b:nth-child(2) { width: 38%; }
.mock span { border-radius: 6px; margin-top: 8px; }
.mock--p2 span { background: radial-gradient(80% 90% at 30% 0%, #fff1cf, #c9b27a 50%, #2a2416); }
.mock--p3 span { background: radial-gradient(80% 90% at 70% 0%, #6b6b6b, #1f1f1f 60%, #0b0b0b); }

/* ---------- StorePeek teaser ---------- */
.teaser { margin-top: clamp(80px, 9vw, 130px); align-items: end; row-gap: 28px; }
.teaser__label { grid-column: 1; align-self: start; }
.teaser__title { grid-column: 2 / 4; font-size: clamp(34px, 3.8vw, 56px); }
.teaser__form { grid-column: 4 / 7; padding-left: 24px; }

/* ---------- Built-with marquee ---------- */
.stack-wrap { margin-top: clamp(80px, 9vw, 130px); }
.stack-wrap > .meta { margin-bottom: 18px; }
.stack {
  display: flex; overflow: hidden; padding-block: 22px;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.stack__track { display: flex; flex-shrink: 0; align-items: baseline; gap: 56px; padding-right: 56px; animation: marquee 45s linear infinite; }
.stack:hover .stack__track { animation-play-state: paused; }
.stack__track span { white-space: nowrap; font-size: clamp(22px, 2.4vw, 34px); color: var(--cream-dim); }
.stack__track span:nth-child(odd) { font-weight: 700; letter-spacing: -.04em; }
.stack__track span:nth-child(even) { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.8vw, 38px); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Now ---------- */
.now {
  display: flex; gap: 12px; align-items: baseline; margin-top: 8px;
  padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .025);
  font-size: 15px; color: var(--cream);
}
.now .talk__dot { flex: none; transform: translateY(-1px); }
.now .meta { margin-left: auto; white-space: nowrap; }

/* ---------- Notes list ---------- */
.notes { border-top: 1px solid var(--line); }
.note {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start;
  padding-block: 34px; border-bottom: 1px solid var(--line);
}
.note::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 120% at var(--mx, 30%) 0%, rgba(255, 190, 140, .35), rgba(200, 70, 20, .25) 45%, transparent 80%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.note:hover::before, .note:focus-visible::before { opacity: 1; }
.note__meta { grid-column: 1; padding: 8px 20px 0 0; }
.note__body { grid-column: 2 / 6; }
.note__title { font-size: clamp(24px, 2.4vw, 34px); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.note__title em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.08em; letter-spacing: -.01em; }
.note__excerpt { margin-top: 10px; max-width: 58ch; color: var(--cream-dim); }
.note__arrow { grid-column: 6; justify-self: end; align-self: center; padding-right: 24px; font-size: 26px; transition: transform .4s var(--ease); }
.note:hover .note__arrow { transform: translate(4px, -4px); }
.notes-more { margin-top: 28px; }
.notes-more a { font-size: 13px; color: var(--cream); border-bottom: 1px solid rgba(243, 233, 198, .35); padding-bottom: 2px; }

/* ---------- Follow the build ---------- */
.follow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--line-strong); }
.follow__label { grid-column: 1 / 3; text-align: right; padding-right: 32px; }
.follow__label strong { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.03em; color: var(--cream); margin-bottom: 4px; }
.follow__form { grid-column: 3 / 6; padding-left: 32px; }
.follow__form .meta a { color: var(--cream); border-bottom: 1px solid rgba(243, 233, 198, .35); }

/* ---------- Contact actions ---------- */
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Article / page layout ---------- */
.page { padding-top: clamp(140px, 20vh, 210px); }
.crumbs { grid-column: 1 / -1; margin-bottom: 28px; }
.crumbs a:hover { color: var(--cream); }
.crumbs span[aria-hidden] { margin: 0 8px; color: #444; }
.page__title { grid-column: 2 / 6; font-size: clamp(42px, 5.8vw, 84px); }
.page__meta { grid-column: 2 / 6; display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 24px; }
.page__lede { grid-column: 2 / 6; margin-top: 32px; max-width: 46ch; font-size: clamp(20px, 2vw, 26px); line-height: 1.4; letter-spacing: -.015em; color: var(--cream); }

.prose { grid-column: 2 / 6; padding-top: 56px; font-size: 18px; line-height: 1.7; color: var(--cream-dim); }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose li { max-width: 68ch; }
.prose h2 { margin-top: 2.2em; font-size: clamp(26px, 2.6vw, 36px); font-weight: 700; letter-spacing: -.04em; line-height: 1.12; color: var(--cream); }
.prose h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.08em; letter-spacing: -.01em; }
.prose h3 { margin-top: 1.8em; font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; color: var(--cream); }
.prose strong { color: var(--cream); font-weight: 600; }
.prose a { color: var(--cream); border-bottom: 1px solid rgba(243, 233, 198, .4); transition: border-color .25s; }
.prose a:hover { border-color: var(--cream); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--orange); }
.prose blockquote {
  margin-inline: 0; padding-left: 22px; border-left: 1px solid var(--orange);
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.3; color: var(--cream);
}
.table-wrap { overflow-x: auto; margin-block: 1.6em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-strong); vertical-align: top; }
.prose thead th { color: var(--cream); font-weight: 600; }
.prose tbody th { color: var(--grey); font-weight: 400; font-size: 13px; }
.prose hr { border: 0; height: 1px; background: var(--line-strong); margin-block: 2.4em; }

/* Gradient call-to-action panel */
.cta {
  grid-column: 2 / 6; margin-top: 80px; position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  background:
    radial-gradient(60% 80% at 25% 0%, rgba(255, 205, 160, .9), rgba(240, 120, 45, .45) 45%, transparent 80%),
    linear-gradient(180deg, #a8380b 0%, #6a0d04 50%, #1c0100 100%);
}
.cta .grain { opacity: .25; }
.cta > :not(.glow__bloom):not(.grain) { position: relative; z-index: 3; }
.cta .glow__bloom { opacity: .7; }
.cta h2 { font-size: clamp(32px, 3.6vw, 52px); }
.cta p { margin-top: 14px; max-width: 46ch; color: rgba(243, 233, 198, .85); font-size: 17px; }
.cta .btn { margin-top: 26px; }

.related { grid-column: 2 / 6; margin-top: 96px; }
.related > .meta { margin-bottom: 14px; }
.related .note__body { grid-column: 1 / 6; }

/* Project page */
.shot {
  grid-column: 1 / -1; margin: 64px 0 0; overflow: hidden; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 40px 120px -30px rgba(240, 100, 30, .45);
}
.shot .card__bar { height: 30px; padding: 0 14px; gap: 7px; }
.shot .card__bar i { width: 10px; height: 10px; }
.shot img { display: block; width: 100%; height: auto; }
.facts-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 72px; border-top: 1px solid var(--line); }
.facts-grid > div { padding: 28px 26px 32px; border-bottom: 1px solid var(--line); }
.facts-grid h3 { font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.facts-grid p { margin-top: 8px; color: var(--cream-dim); font-size: 15px; }
.project-links { display: flex; flex-wrap: wrap; gap: 12px; grid-column: 2 / 6; margin-top: 36px; }

/* 404 */
.lost { min-height: 100svh; align-content: center; row-gap: 24px; }
.lost .display { grid-column: 1 / 5; font-size: clamp(52px, 8vw, 120px); }
.lost p:not(.meta) { grid-column: 1 / 4; color: var(--cream-dim); font-size: 18px; }
.lost .contact__actions { grid-column: 1 / -1; }

/* ---------- Responsive additions ---------- */
@media (hover: none), (max-width: 768px) {
  .card { min-height: 0; }
  .card__preview { position: relative; left: auto; right: auto; top: auto; margin-top: 24px; opacity: 1; transform: none; }
  .card__name { padding-top: 32px; }
}
@media (max-width: 1024px) {
  .teaser__title { grid-column: 2 / 5; }
  .teaser__form { grid-column: 2 / 7; padding-left: 0; }
}
@media (max-width: 768px) {
  .glow__stats { grid-template-columns: 1fr 1fr; row-gap: 24px; bottom: 56px; }
  .stat { padding-left: 16px; }
  .teaser__label, .teaser__title, .teaser__form { grid-column: 1 / -1; padding-left: 0; }
  .note { grid-template-columns: 1fr auto; padding-inline: 0; }
  .note__meta { grid-column: 1 / -1; padding: 0 0 10px; }
  .note__body { grid-column: 1; }
  .note__arrow { grid-column: 2; padding-right: 4px; }
  .follow { grid-template-columns: 1fr; }
  .follow__label { grid-column: 1; text-align: left; padding: 0 0 16px 24px; }
  .follow__form { grid-column: 1; padding-left: 24px; }
  .now { flex-wrap: wrap; }
  .now .meta { margin-left: 20px; }
  .page__title, .page__meta, .page__lede, .prose, .cta, .related, .project-links { grid-column: 1 / -1; }
  .facts-grid { grid-template-columns: 1fr; }
  .lost .display, .lost p:not(.meta) { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .field { flex-direction: column; align-items: stretch; border-radius: 22px; }
  .field .btn { justify-content: center; }
  .field input { height: 46px; }
}
