/* ============================================================
   STACWARE — core styles
   light/dark via [data-theme], mono + serif + sans pairing
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* LIGHT (default) — warm paper */
  --bg: oklch(0.975 0.006 85);
  --bg-2: oklch(0.955 0.008 85);
  --bg-3: oklch(0.92 0.01 85);
  --ink: oklch(0.18 0.015 280);
  --ink-2: oklch(0.35 0.015 280);
  --ink-3: oklch(0.42 0.012 280);
  --rule: oklch(0.82 0.012 280);
  --rule-2: oklch(0.88 0.01 280);
  --accent: oklch(0.55 0.23 300);
  --accent-ink: oklch(0.38 0.22 300);
  --accent-bg: oklch(0.95 0.03 300);
  --ok: oklch(0.6 0.17 150);
  --warn: oklch(0.72 0.18 60);
}

[data-theme="dark"] {
  --bg: oklch(0.14 0.012 280);
  --bg-2: oklch(0.18 0.014 280);
  --bg-3: oklch(0.22 0.016 280);
  --ink: oklch(0.96 0.008 85);
  --ink-2: oklch(0.78 0.01 85);
  --ink-3: oklch(0.68 0.012 280);
  --rule: oklch(0.32 0.018 280);
  --rule-2: oklch(0.24 0.014 280);
  --accent: oklch(0.72 0.2 300);
  --accent-ink: oklch(0.82 0.18 300);
  --accent-bg: oklch(0.22 0.06 300);
  --ok: oklch(0.75 0.18 150);
  --warn: oklch(0.82 0.19 75);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
input, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* ============================================================
   STATUS BAR — top ticker
   ============================================================ */
.statusbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.statusbar__inner {
  display: flex; align-items: center; gap: 24px;
  padding: 6px 24px;
  overflow: hidden;
  white-space: nowrap;
}
.statusbar__dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.6 0.17 150 / 0.5); }
  70% { box-shadow: 0 0 0 6px oklch(0.6 0.17 150 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.6 0.17 150 / 0); }
}
.statusbar__item { flex-shrink: 0; }
.statusbar__item strong { color: var(--ink); font-weight: 500; }
.statusbar__spacer { flex: 1; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 25px; z-index: 39;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 14px 24px;
  gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 26px; height: 26px;
  position: relative;
  display: grid; place-items: center;
}
.brand__mark svg { width: 100%; height: 100%; }
.brand__name { color: var(--ink); }
.brand__name em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 17px;
  margin-left: 1px;
}

.nav__links {
  display: flex; justify-content: center; gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
}
.nav__link {
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav__link:hover { color: var(--ink); background: var(--bg-2); }
.nav__link.active { color: var(--ink); }
.nav__link.active::before {
  content: "/ "; color: var(--accent); font-weight: 600;
}

.nav__right { display: flex; align-items: center; gap: 8px; }

.iconbtn {
  width: 32px; height: 32px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: all 0.15s;
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink-3); }

.cta {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s;
}
.cta:hover { transform: translateY(-1px); }
.cta--accent { background: var(--accent); }
.cta--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.cta--ghost:hover { background: var(--ink); color: var(--bg); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.container--tight { max-width: 1100px; }

.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }

.section__rule {
  border-top: 1px solid var(--rule);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 20px; height: 1px; background: var(--accent);
}
.eyebrow--plain::before { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.hero .container { max-width: 1640px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__headline {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink);
}
.hero__headline em {
  font-style: italic;
  color: var(--accent);
}
.hero__headline .amp {
  font-style: italic;
  color: var(--ink-3);
  font-weight: 400;
}

.hero__sub {
  margin-top: 24px;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
}
.hero__sub code {
  font-family: var(--mono);
  font-size: 14px;
  padding: 1px 6px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
}

.hero__actions {
  margin-top: 32px;
  display: flex; gap: 12px; flex-wrap: wrap;
}

.hero__meta {
  margin-top: 36px;
  display: flex; gap: 32px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.hero__meta b { color: var(--ink); font-weight: 500; }

/* ============================================================
   TERMINAL
   ============================================================ */
.terminal {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 480px;
  font-family: var(--mono);
  font-size: 13px;
  box-shadow: 0 2px 0 var(--rule);
}
.terminal__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-3);
  font-size: 11px;
  color: var(--ink-3);
}
.terminal__dots { display: flex; gap: 6px; }
.terminal__dot { width: 11px; height: 11px; border-radius: 999px; background: var(--rule); }
.terminal__dot:nth-child(1) { background: oklch(0.72 0.17 30); }
.terminal__dot:nth-child(2) { background: oklch(0.82 0.14 85); }
.terminal__dot:nth-child(3) { background: var(--ok); }
.terminal__title {
  flex: 1; text-align: center;
  letter-spacing: 0.04em;
}
.terminal__badge {
  padding: 1px 6px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 10px;
  color: var(--ink-2);
}

.terminal__body {
  flex: 1;
  padding: 14px 16px;
  overflow-y: auto;
  color: var(--ink);
  line-height: 1.55;
  max-height: 440px;
}
.terminal__body::-webkit-scrollbar { width: 6px; }
.terminal__body::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 999px; }

.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.user { color: var(--ink); }
.term-line.sys { color: var(--ink-2); }
.term-line.ok { color: var(--ok); }
.term-line.warn { color: var(--warn); }
.term-line.accent { color: var(--accent); }
.term-line.dim { color: var(--ink-3); }
.term-line.ascii {
  font-size: 10px;
  line-height: 1.1;
  color: var(--accent);
}

.term-prompt {
  color: var(--accent);
  user-select: none;
}

.terminal__input {
  display: flex; align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
  gap: 8px;
}
.terminal__input input {
  flex: 1;
  background: transparent;
  border: 0; outline: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  caret-color: var(--accent);
}
.terminal__hint {
  font-size: 10px;
  color: var(--ink-3);
  padding-left: 4px;
}

.blink::after {
  content: "▋"; color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   SERVICES / MODES
   ============================================================ */
.modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 900px) { .modes { grid-template-columns: 1fr; } }

.mode {
  padding: 40px 32px 36px;
  border-right: 1px solid var(--rule);
  position: relative;
  transition: background 0.2s;
  cursor: pointer;
}
.mode:last-child { border-right: 0; }
@media (max-width: 900px) {
  .mode { border-right: 0; border-bottom: 1px solid var(--rule); }
  .mode:last-child { border-bottom: 0; }
}
.mode:hover { background: var(--bg-2); }
.mode__num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.mode__title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.mode__title em { font-style: italic; color: var(--accent); }
.mode__sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.mode__desc { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.mode__list {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  list-style: none;
  display: grid; gap: 4px;
}
.mode__list li::before {
  content: "→ "; color: var(--accent);
}

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
  padding: 40px 0 16px;
}
@media (max-width: 700px) { .manifesto { grid-template-columns: 1fr; gap: 20px; } }

.manifesto__label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.manifesto__label b { display: block; color: var(--ink); font-weight: 500; margin-top: 4px; }

.manifesto__rules {
  display: grid; gap: 24px;
}
.manifesto__rule {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--rule);
}
.manifesto__rule:last-child { border-bottom: 0; }
.manifesto__rule__n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 6px;
}
.manifesto__rule h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.manifesto__rule h3 em { font-style: italic; color: var(--accent); }
.manifesto__rule p { color: var(--ink-2); max-width: 62ch; }

/* ============================================================
   WORK
   ============================================================ */
.work {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.work__item {
  grid-column: span 3;
  padding: 32px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 0.2s;
}
.work__item:nth-child(3n) { border-right: 0; }
.work__item.span-2 { grid-column: span 3; }
.work__item.span-wide { grid-column: span 6; border-right: 0; }
@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; }
  .work__item { grid-column: span 1 !important; border-right: 0 !important; }
}
.work__item:hover { background: var(--bg-2); }
.work__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.work__head b { color: var(--ink); font-weight: 500; }
.work__title {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  line-height: 1.05;
}
.work__title em { font-style: italic; color: var(--accent); }
.work__desc {
  color: var(--ink-2);
  font-size: 14px;
  max-width: 48ch;
  margin-bottom: 20px;
}
.work__shot {
  margin-top: 20px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-3);
  position: relative;
}
.work__shot img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: transform 0.4s;
}
.work__item:hover .work__shot img { transform: scale(1.03); }
.work__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.work__tag {
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-3);
}

/* ============================================================
   TEAM
   ============================================================ */
.team {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 800px) { .team { grid-template-columns: 1fr; } }
.founder {
  padding: 40px;
  border-right: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: start;
}
.founder:last-child { border-right: 0; }
@media (max-width: 800px) {
  .founder { border-right: 0; border-bottom: 1px solid var(--rule); }
  .founder:last-child { border-bottom: 0; }
}
.founder__photo {
  width: 120px; height: 120px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--rule);
}
.founder__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.3) contrast(1.02); }
.founder__name {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.founder__role {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin: 4px 0 14px;
  text-transform: uppercase;
}
.founder__bio { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.founder__specs {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  display: grid; gap: 3px;
}
.founder__specs b { color: var(--ink-2); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--rule);
  padding: 48px 0 80px;
  margin-top: 80px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer__big {
  font-family: var(--serif);
  font-size: 72px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.footer__big em { font-style: italic; color: var(--accent); }
.footer__col h4 {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer__col a, .footer__col li {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  padding: 3px 0;
  list-style: none;
}
.footer__col a:hover { color: var(--accent); }

.footer__meta {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  flex-wrap: wrap; gap: 16px;
}

/* ============================================================
   ASCII DIVIDER
   ============================================================ */
.ascii-div {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.1;
  color: var(--ink-2);
  text-align: center;
  padding: 24px 0;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}
.ascii-div.accent { color: var(--accent); opacity: 0.85; }

/* ============================================================
   TOAST / ACHIEVEMENTS
   ============================================================ */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px; z-index: 80;
  display: grid; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  padding: 12px 16px;
  display: flex; gap: 12px; align-items: center;
  min-width: 280px;
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.18);
  animation: toastIn 0.3s ease-out, toastOut 0.4s ease-in 3.6s forwards;
  font-family: var(--mono);
  font-size: 12px;
  pointer-events: auto;
}
.toast__icon { font-size: 22px; }
.toast__title { font-weight: 600; }
.toast__sub { font-size: 10px; opacity: 0.7; margin-top: 2px; }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ============================================================
   PAGE: Services
   ============================================================ */
.page-head {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.page-head h1 em { font-style: italic; color: var(--accent); }
.page-head__sub {
  margin-top: 24px;
  max-width: 600px;
  font-size: 18px;
  color: var(--ink-2);
}

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }
.tier {
  padding: 40px 32px;
  border-right: 1px solid var(--rule);
}
.tier:last-child { border-right: 0; }
@media (max-width: 900px) {
  .tier { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tier:last-child { border-bottom: 0; }
}
.tier--featured { background: var(--bg-2); position: relative; }
.tier--featured::before {
  content: "// most requested";
  position: absolute; top: 12px; right: 16px;
  font-family: var(--mono); font-size: 10px; color: var(--accent);
}
.tier__name {
  font-family: var(--serif); font-size: 36px; font-weight: 400;
  letter-spacing: -0.015em; line-height: 1.05;
}
.tier__name em { font-style: italic; color: var(--accent); }
.tier__tag {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  margin: 6px 0 18px; letter-spacing: 0.04em;
}
.tier__price {
  font-family: var(--mono); font-size: 22px; color: var(--ink);
  padding: 12px 0; border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule);
  margin-bottom: 20px;
}
.tier__price small { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.tier__list {
  list-style: none; display: grid; gap: 8px;
  font-size: 14px; color: var(--ink-2);
}
.tier__list li { display: flex; gap: 10px; }
.tier__list li::before {
  content: "✓"; color: var(--accent); font-weight: 600;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact__col {
  padding: 40px 40px 48px;
  border-right: 1px solid var(--rule);
}
.contact__col:last-child { border-right: 0; }
@media (max-width: 900px) {
  .contact__col { border-right: 0; border-bottom: 1px solid var(--rule); }
  .contact__col:last-child { border-bottom: 0; }
}
.contact h2 {
  font-family: var(--serif); font-size: 48px; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 16px;
}
.contact h2 em { font-style: italic; color: var(--accent); }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  transition: border 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--accent);
}
.field textarea { min-height: 120px; resize: vertical; }

.radiopills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.radiopills label {
  font-family: var(--mono); font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-2);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0;
}
.radiopills input { display: none; }
.radiopills input:checked + span {
  color: var(--bg);
}
.radiopills label:has(input:checked) {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}

/* ============================================================
   ACHIEVEMENTS PANEL
   ============================================================ */
.ach-btn {
  position: fixed; bottom: 20px; left: 20px; z-index: 50;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  display: flex; gap: 8px; align-items: center;
  box-shadow: 0 2px 0 var(--rule);
  transition: transform 0.15s;
}
.ach-btn:hover { transform: translateY(-1px); color: var(--ink); }
.ach-btn__badge {
  background: var(--accent); color: white;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
}

.ach-panel {
  position: fixed; bottom: 60px; left: 20px; z-index: 50;
  width: 320px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 12px 40px oklch(0 0 0 / 0.2);
  padding: 16px;
  display: none;
  font-family: var(--mono);
  font-size: 12px;
}
.ach-panel.open { display: block; animation: popIn 0.2s ease-out; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px); } }
.ach-panel__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.ach-panel__head b { font-weight: 600; color: var(--ink); }
.ach-panel__head span { color: var(--ink-3); font-size: 10px; }
.ach-item {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule);
}
.ach-item:last-child { border-bottom: 0; }
.ach-item__icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 14px;
}
.ach-item.unlocked .ach-item__icon {
  background: var(--accent); color: white; border-color: var(--accent);
}
.ach-item__title { color: var(--ink); font-weight: 500; font-size: 11px; }
.ach-item__desc { color: var(--ink-3); font-size: 10px; margin-top: 2px; }
.ach-item:not(.unlocked) .ach-item__title,
.ach-item:not(.unlocked) .ach-item__desc { opacity: 0.5; }

/* GACHA */
.gacha-wrap {
  margin-top: 20px;
  padding: 14px;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  background: var(--accent-bg);
}
.gacha-wrap h4 {
  font-family: var(--mono); font-size: 11px; color: var(--accent-ink);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
}
.gacha-wrap p { font-size: 11px; color: var(--ink-2); margin-bottom: 10px; }
.gacha-btn {
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s;
}
.gacha-btn:hover { transform: translateY(-1px); }
.gacha-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* GACHA MODAL */
.gacha-modal {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0 0 0 / 0.5);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 24px;
}
.gacha-modal.open { display: grid; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } }
.gacha-card {
  width: 100%; max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 32px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gacha-card__rarity {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.gacha-card__name {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.gacha-card__name em { font-style: italic; color: var(--accent); }
.gacha-card__desc { color: var(--ink-2); margin-bottom: 20px; font-size: 14px; }
.gacha-card__glow {
  position: absolute;
  inset: -50% -10%;
  background: radial-gradient(circle, var(--accent-bg) 0%, transparent 60%);
  opacity: 0.6;
  z-index: -1;
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gacha-card__close {
  padding: 8px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* Konami hint */
.kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-2);
}

/* Utility */
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--rule-2) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.3;
  pointer-events: none;
}

.glitch { animation: glitch 0.3s; }
@keyframes glitch {
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

.fade-in { animation: fadeInUp 0.5s ease-out both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
}

/* Page transitions */
.page { display: none; }
.page.active { display: block; animation: fadeInUp 0.35s ease-out; }

/* Marquee */
.marquee {
  display: flex; gap: 48px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============================================================
   MOBILE / RESPONSIVE FALLBACKS
   last block — overrides earlier CSS + inline styles via !important
   ============================================================ */

/* Mobile menu: hidden by default, shown at phone breakpoint */
.mobile-only { display: none; }
.mobile-menu { display: none; }

/* Tablet */
@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .section--tight { padding: 48px 0; }
  .terminal { min-height: 380px; }
}

/* Small tablet / large phone */
@media (max-width: 700px) {
  /* Inline 3/4-col grids stack */
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns: repeat(3, 1fr)"] > [style*="border-right: 1px solid var(--rule)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] > [style*="border-right: 1px solid var(--rule)"] {
    border-right: 0 !important;
  }
  [style*="grid-template-columns: repeat(3, 1fr)"] > *:not(:last-child),
  [style*="grid-template-columns: repeat(4, 1fr)"] > *:not(:last-child) {
    border-bottom: 1px solid var(--rule) !important;
  }

  /* Inline big h2s / h1s scale down */
  h2[style*="clamp(40px"] { font-size: clamp(32px, 8vw, 56px) !important; }
  h2[style*="clamp(56px"] { font-size: clamp(40px, 10vw, 80px) !important; }
  h1[style*="clamp(56px"] { font-size: clamp(44px, 10vw, 84px) !important; }

  /* Hero grid 1fr already at 900px — also tighten */
  .hero__headline { font-size: clamp(40px, 9vw, 72px); }
}

/* Phone */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .section--tight { padding: 32px 0; }

  /* Status bar: keep only dot + first item */
  .statusbar__inner { gap: 12px; padding: 6px 14px; }
  .statusbar__item:nth-child(n+3) { display: none; }

  /* Nav: hide the middle links, keep brand + right cluster */
  .nav__inner { padding: 10px 14px; gap: 10px; }
  .nav__links { display: none; }
  .brand__name { font-size: 13px; }
  .cta { font-size: 11px; padding: 7px 11px; }

  /* Burger button + mobile menu panel */
  .mobile-only { display: grid; }
  .mobile-menu {
    position: fixed;
    top: 72px;
    left: 12px; right: 12px;
    z-index: 38;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: 0 6px 28px oklch(0 0 0 / 0.08);
    padding: 8px;
  }
  .mobile-menu.open {
    display: grid;
    gap: 2px;
    animation: popIn 0.2s ease-out;
  }
  .mobile-menu__link {
    display: block;
    padding: 12px 14px;
    font-family: var(--mono);
    font-size: 14px;
    color: var(--ink);
    border-radius: 4px;
  }
  .mobile-menu__link:hover,
  .mobile-menu__link.active {
    background: var(--bg-2);
    color: var(--accent);
  }

  /* Hero */
  .hero { padding: 20px 0 32px; }
  .hero__headline { font-size: 34px !important; line-height: 1.05; }
  .hero__sub { font-size: 15px; margin-top: 20px; }
  .hero__actions { margin-top: 24px; }
  .hero__meta { margin-top: 28px; gap: 14px 18px; font-size: 11px; }

  /* Terminal: compact under hero */
  .terminal { min-height: 300px; font-size: 12px; }
  .terminal__body { padding: 10px 12px; }
  .terminal__title { font-size: 10px; }
  .terminal__input input { font-size: 12px; }

  /* Page head h1 (services/work/about/contact) */
  .page-head h1 { font-size: clamp(40px, 11vw, 72px) !important; line-height: 1.02; }
  .page-head__sub { font-size: 15px; }

  /* Manifesto */
  .manifesto__rule { grid-template-columns: 36px 1fr; gap: 14px; padding-bottom: 20px; }
  .manifesto__rule h3 { font-size: 22px; }
  .manifesto__label { font-size: 11px; }

  /* Work */
  .work__item { padding: 22px; }
  .work__title { font-size: 24px; }
  .work__head { font-size: 10px; }

  /* Pricing */
  .tier { padding: 32px 22px; }
  .tier__price { font-size: 18px; padding: 10px 0; }
  .tier__list { font-size: 13px; }

  /* Team / founders */
  .founder { padding: 28px 22px; grid-template-columns: 1fr; gap: 20px; }
  .founder__photo { width: 160px; height: 160px; }
  .founder__name { font-size: 26px; }

  /* Contact */
  .contact__col { padding: 28px 20px 36px; }

  /* Footer */
  .footer { padding: 32px 0 48px; margin-top: 40px; }
  .footer__grid { grid-template-columns: 1fr !important; gap: 28px; }
  .footer__big { font-size: 44px; line-height: 1; }
  .footer__meta { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 32px; }

  /* Marquee */
  .marquee { font-size: 40px !important; }

  /* Achievement button + panel stay on-screen */
  .ach-btn { bottom: 12px; left: 12px; font-size: 10px; padding: 8px 10px; }
  .ach-panel { width: calc(100vw - 24px); max-width: 320px; left: 12px; bottom: 56px; }
  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
}
