/* Nasral Labs — studio pages (home, site legal, 404). Game pages have their own CSS. */
:root {
  --ink: #0b0a0f;
  --ink-2: #141219;
  --ink-3: #1d1a24;
  --line: rgba(255, 255, 255, .09);
  --paper: #f3efe6;
  --muted: #9a94a6;
  --acid: #d7ff3c;
  --acid-ink: #1a2200;
  --pink: #ff5ea8;
  --cyan: #4be3ff;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 16px/1.6 var(--body); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--acid); color: var(--acid-ink); }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--acid); color: var(--acid-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07;
  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 baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 14px var(--pad);
  background: linear-gradient(var(--ink) 30%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 15px/1 var(--display); letter-spacing: .02em; }
.brand svg { width: 34px; height: 34px; }
.bar nav { margin-left: auto; display: flex; gap: 4px; }
.bar nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.bar nav a:hover { color: var(--paper); background: var(--ink-3); }
.pill-btn {
  font: 700 12px/1 var(--mono); letter-spacing: .08em; color: var(--paper);
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 12px; cursor: pointer; min-width: 44px; min-height: 36px;
}
.pill-btn:hover { border-color: var(--acid); color: var(--acid); }
@media (max-width: 720px) { .bar nav { display: none; } .bar .pill-btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100svh, 920px); display: grid; align-items: end; padding: 120px 0 56px; overflow: hidden; isolation: isolate; }
#goo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::before { /* lab grid */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
.hero-tag { display: inline-flex; align-items: center; gap: 10px; color: var(--acid); margin-bottom: 22px; }
.hero-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px var(--acid); animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hero h1 {
  margin: 0; font: 900 clamp(48px, 11.5vw, 176px)/.86 var(--display); letter-spacing: -.045em;
  text-transform: uppercase;
}
/* filled with ink + stroke painted under the fill: hides the font's overlapping contours */
.hero h1 .out { color: var(--ink); -webkit-text-stroke: 4px var(--paper); paint-order: stroke fill; }
.hero h1 .acid { color: var(--acid); }
.hero-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; margin-top: 36px; align-items: end; }
.hero-row p { margin: 0; max-width: 520px; font-size: clamp(17px, 1.6vw, 20px); color: #d6d1de; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 800 15px/1 var(--body); padding: 17px 24px; border-radius: 999px; border: 0;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-acid { background: var(--acid); color: var(--acid-ink); }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--paper); }
.hero-foot { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); gap: 16px; flex-wrap: wrap; }
@media (max-width: 720px) { .hero { min-height: auto; padding-top: 120px; } }
@media (max-width: 820px) { .hero-row { grid-template-columns: 1fr; } .hero-cta { justify-content: flex-start; } }

/* ---------- section heads ---------- */
section { position: relative; }
.sec { padding: clamp(80px, 12vw, 150px) 0 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font: 800 clamp(34px, 5.6vw, 76px)/.95 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.sec-head p { margin: 0; max-width: 380px; color: var(--muted); }
.idx { color: var(--acid); display: block; margin-bottom: 14px; }

/* ---------- specimens (project cards) ---------- */
.specimens { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.spec {
  position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  border-radius: 28px; text-decoration: none; min-height: 520px; padding: 26px;
  transition: transform .5s cubic-bezier(.2, .9, .2, 1), box-shadow .5s;
  view-transition-name: none;
}
.spec:hover { transform: translateY(-6px) rotate(-.4deg); }
.spec-1 { grid-column: span 7; }
.spec-2 { grid-column: span 5; }
.spec-3 { grid-column: span 12; min-height: 300px; }
@media (max-width: 900px) { .spec-1, .spec-2, .spec-3 { grid-column: span 12; } .spec { min-height: 460px; } }
.spec-label { display: flex; justify-content: space-between; gap: 12px; font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.spec-label b { padding: 7px 10px; border-radius: 999px; }
.spec h3 { margin: auto 0 8px; position: relative; z-index: 2; }
.spec p { margin: 0; max-width: 440px; position: relative; z-index: 2; padding-right: 72px; }
.spec .go {
  position: absolute; right: 22px; bottom: 22px; z-index: 3; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
.spec:hover .go { transform: rotate(-45deg) scale(1.08); }

/* Cozy Bakery card — speaks in its own voice */
.spec-bakery { background: radial-gradient(circle at 70% 20%, #fff7e6, #f6dfb6 55%, #e9bd84); color: #5a3418; }
.spec-bakery .spec-label b { background: #5a3418; color: #fff2da; }
.spec-bakery h3 { font: 400 clamp(40px, 5vw, 64px)/.95 "Lilita One", var(--display); color: #fff; -webkit-text-stroke: 0; text-shadow: 0 3px 0 #8a4a1c, 0 6px 0 #5a3418, 0 12px 22px rgba(90, 52, 24, .35); }
.spec-bakery p { font-weight: 700; }
.spec-bakery .go { background: #49c46b; color: #fff; box-shadow: 0 5px 0 #23864a; }
.spec-bakery p { max-width: 54%; }
@media (max-width: 560px) { .spec-bakery p { max-width: none; } .spec-bakery .cat { width: 62% !important; top: 40px !important; } }
.spec-bakery .cat { position: absolute; right: 0; top: 50px; width: min(44%, 320px); z-index: 1; filter: drop-shadow(0 18px 24px rgba(90, 52, 24, .3)); transition: transform .6s cubic-bezier(.2, .9, .2, 1); }
.spec-bakery:hover .cat { transform: translate(-8px, -6px) rotate(-3deg); }
.spec-bakery .tiles img { position: absolute; width: 74px; z-index: 0; filter: drop-shadow(0 8px 10px rgba(90, 52, 24, .25)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(6deg); } }

/* Foam & Fenders card */
.spec-foam { background: linear-gradient(#8fd8ff 0 46%, #ffe7b8 46% 100%); color: #2b1d16; }
.spec-foam .spec-label b { background: #c8462f; color: #fff; }
.spec-foam h3 { font: 400 clamp(36px, 4.4vw, 54px)/.95 "Lilita One", var(--display); color: #fff; text-shadow: 0 3px 0 #c8462f, 0 6px 0 #7a2618, 0 10px 18px rgba(0,0,0,.2); }
.spec-foam p { font-weight: 700; }
.spec-foam .go { background: #ffcf3a; color: #2b1d16; box-shadow: 0 5px 0 #c99511; }
.spec-foam { background: #ffe7b8; }
.spec-foam .garage { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 60%; object-fit: cover; object-position: center 70%; z-index: 0; }
.spec-foam .spec-label { position: relative; z-index: 2; }
.spec-foam .car { position: absolute; width: 46%; left: -60%; top: calc(60% - 22%); z-index: 1; transition: left 1.2s cubic-bezier(.2, .9, .2, 1); }
.spec-foam:hover .car, .spec-foam.seen .car { left: 6%; }
.spec-foam .bubbles span { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,.35) 60%, rgba(255,255,255,.1)); border: 1px solid rgba(255,255,255,.8); z-index: 2; animation: rise 6s linear infinite; }
@keyframes rise { from { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(-240px); opacity: 0; } }

/* Revive VPN card */
.spec-vpn { background: #06141a; color: #bff7ea; box-shadow: inset 0 0 0 1px rgba(56, 255, 200, .18); flex-direction: row; align-items: flex-end; gap: 24px; }
.spec-vpn > div { position: relative; z-index: 2; }
.spec-vpn .spec-label { position: absolute; top: 26px; left: 26px; right: 26px; }
.spec-vpn .spec-label b { background: rgba(56, 255, 200, .14); color: #38ffc8; }
.spec-vpn h3 { font: 700 clamp(34px, 4.4vw, 58px)/1 "Space Grotesk", var(--body); letter-spacing: -.04em; color: #effffb; margin-top: 90px; }
.spec-vpn .go { background: #38ffc8; color: #06141a; }
.spec-vpn svg.pulse { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.spec-vpn .pulse path { stroke: #38ffc8; stroke-width: 2.5; fill: none; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 4s cubic-bezier(.5, 0, .2, 1) infinite; filter: drop-shadow(0 0 8px #38ffc8); }
@keyframes draw { 60%, 100% { stroke-dashoffset: 0; } }

/* portal transition */
.portal { position: fixed; z-index: 60; pointer-events: none; border-radius: 28px; transition: all .6s cubic-bezier(.7, 0, .2, 1); }

/* ---------- manifesto ---------- */
.manifesto { padding: clamp(90px, 12vw, 160px) 0; }
.manifesto blockquote { margin: 0; font: 800 clamp(30px, 5.4vw, 80px)/1 var(--display); letter-spacing: -.04em; text-transform: uppercase; }
.manifesto blockquote em { font-style: normal; color: var(--acid); }
.manifesto .small { margin-top: 28px; max-width: 620px; color: #cfc9d8; font-size: 18px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 64px; }
.principles div { background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.principles h4 { margin: 14px 0 8px; font: 700 20px/1.2 var(--display); letter-spacing: -.02em; }
.principles p { margin: 0; color: var(--muted); }
.principles .mono { color: var(--acid); }
@media (max-width: 820px) { .principles { grid-template-columns: 1fr; } }

/* ---------- ticker ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; white-space: nowrap; padding: 18px 0; }
.ticker div { display: inline-flex; gap: 40px; animation: tick 40s linear infinite; font: 800 clamp(22px, 3vw, 38px)/1 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.ticker span:nth-child(even) { color: var(--ink); -webkit-text-stroke: 2.4px var(--muted); paint-order: stroke fill; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- lab log ---------- */
.log { display: grid; gap: 0; border-top: 1px solid var(--line); }
.log-row { display: grid; grid-template-columns: 140px 1fr 200px; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.log-row h4 { margin: 0; font: 700 clamp(20px, 2.4vw, 30px)/1.1 var(--display); letter-spacing: -.02em; }
.log-row p { margin: 4px 0 0; color: var(--muted); }
.log-row .st { justify-self: end; color: var(--acid); }
.log-row .st.dim { color: var(--muted); }
@media (max-width: 720px) { .log-row { grid-template-columns: 1fr; gap: 6px; } .log-row .st { justify-self: start; } }

/* ---------- contact ---------- */
.contact { padding: clamp(90px, 12vw, 160px) 0 60px; text-align: left; }
.contact a.mail { display: inline-block; font: 900 clamp(26px, 7.2vw, 104px)/1 var(--display); letter-spacing: -.05em; text-decoration: none; color: var(--paper); white-space: nowrap; }
.contact a.mail:hover { color: var(--acid); }
.contact p { color: var(--muted); max-width: 560px; }
.family { display: flex; align-items: center; gap: 14px; margin-top: 40px; padding: 18px 20px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; max-width: 520px; }
.family img { width: 44px; height: 44px; }
.family span { color: var(--muted); font-size: 14px; }
.family b { display: block; color: var(--paper); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s, transform .8s cubic-bezier(.2, .9, .2, 1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- legal (site privacy / terms) ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 130px var(--pad) 80px; }
.doc h1 { font: 800 clamp(34px, 6vw, 60px)/1 var(--display); letter-spacing: -.04em; margin: 12px 0 10px; text-transform: uppercase; }
.doc h2 { font: 700 21px/1.25 var(--display); margin: 44px 0 10px; letter-spacing: -.01em; }
.doc p, .doc li { color: #d9d4e0; }
.doc .meta { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--acid); font: 700 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.doc a { color: var(--acid); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.toc a { text-decoration: none; padding: 7px 12px; border-radius: 999px; background: var(--ink-3); color: var(--paper); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}
