:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --text: #f5f5f5;
  --muted: #a0a3b1;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --border-soft: rgba(255,255,255,0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(0,0,0,0.55);
  --shadow-subtle: 0 8px 24px rgba(0,0,0,0.35);
  --transition-fast: 160ms ease-out;
  --transition-med: 220ms ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 12px;
  padding: 8px 12px;
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.4);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  z-index: 10000;
  transition: top 160ms ease-out;
}

.skip-link:focus {
  top: 12px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #111827 0, #020617 52%, #020617 100%);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout */

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px clamp(18px, 4vw, 28px) 64px;
  position: relative;
  isolation: isolate;
}

/* Subtle background orbs */

.bg-orb {
  position: fixed;
  filter: blur(70px);
  opacity: 0.55;
  z-index: -2;
  pointer-events: none;
}

.bg-orb.orb-1 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #10b981 0, transparent 70%);
  top: -80px;
  left: max(0px, 8vw);
}

.bg-orb.orb-2 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, #3b82f6 0, transparent 70%);
  bottom: -60px;
  right: 4vw;
}

/* Top nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 18px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: linear-gradient(
    to bottom,
    rgba(2,6,23,0.9),
    rgba(2,6,23,0.4),
    transparent
  );
  z-index: 40;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-app-icon {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 12px;
  transition: background 0.18s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: left;
}

.logo-app-icon:hover {
  background: rgba(16, 185, 129, 0.06);
  transform: translateY(-2px);
}

.logo-app-icon:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 3px;
}

.logo-app-icon-win {
  width: 66px;
  height: 52px;
  background: #0a0e1a;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.logo-app-icon:hover .logo-app-icon-win {
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
}

.logo-app-icon-bar {
  height: 14px;
  background: linear-gradient(to bottom, #161b2e, #0d1018);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 5px;
  flex-shrink: 0;
}

.logo-app-icon-bar span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.logo-app-icon-bar span:nth-child(1) { background: #ff5f56; }
.logo-app-icon-bar span:nth-child(2) { background: #ffbd2e; }
.logo-app-icon-bar span:nth-child(3) { background: #27c93f; }

.logo-app-icon-glyph {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: #10b981;
  transition: text-shadow 0.2s ease;
}

.logo-app-icon:hover .logo-app-icon-glyph {
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.logo-app-icon-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-app-icon-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #e5e7eb;
  line-height: 1.2;
}

.logo-app-icon-cmd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(148, 163, 184, 0.65);
  transition: color 0.18s ease;
}

.logo-app-icon:hover .logo-app-icon-cmd {
  color: rgba(229, 231, 235, 0.85);
}

.logo-app-icon-prompt {
  color: #10b981;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.nav-link-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(15,23,42,0.9);
  transform: translateY(-1px);
}

.nav-cta {
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  border: 1px solid rgba(148,163,184,0.35);
  font-size: 13px;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(16,185,129,0.25), rgba(15,23,42,0.9));
  box-shadow: 0 10px 25px rgba(15,23,42,0.8);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.95);
  border-color: rgba(52,211,153,0.9);
}

.nav-cta span.chevron {
  font-size: 16px;
  transform: translateY(1px);
}

.nav-toggle {
  margin-left: 10px;
  border-radius: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  display: none;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}

.nav-toggle-prompt {
  font-family: var(--font-mono);
  color: #10b981;
  font-size: 12px;
  animation: termBlink 1s step-end infinite;
}

.nav-toggle-bars {
  display: grid;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  color: #10b981;
}

.nav-toggle-glyph {
  display: block;
  width: 12px;
  text-align: center;
}

.nav-toggle-label {
  display: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #10b981;
}

.nav.is-menu-open .nav-toggle-prompt,
.nav.is-menu-open .nav-toggle-bars {
  display: none;
}

.nav.is-menu-open .nav-toggle-label {
  display: inline-block;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: clamp(32px, 4vw, 46px);
  align-items: center;
  padding: 22px 4px 18px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 4px 9px 4px 4px;
  background: rgba(15,23,42,0.75);
  border: 1px solid rgba(148,163,184,0.35);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, #10b981, #059669);
  box-shadow: 0 0 0 6px rgba(16,185,129,0.16);
}

.hero-kicker span.highlight {
  color: #e5e7eb;
}

.hero-heading {
  margin: 18px 0 10px;
  font-size: clamp(34px, 4.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-heading span.accent {
  background: linear-gradient(120deg, #10b981, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 8px 0 22px;
  font-size: 14px;
  color: var(--muted);
  max-width: 520px;
}

.hero-sub strong {
  color: #e5e7eb;
  font-weight: 500;
}

.hero-inline-link {
  color: #6ee7b7;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag-pill {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.3);
  padding: 4px 11px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(15,23,42,0.9);
  font-family: var(--font-mono);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-end;
  margin-top: 8px;
}

.btn-primary {
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 18px 45px rgba(15,23,42,0.9);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 55px rgba(15,23,42,1);
  filter: brightness(1.1);
}

.btn-ghost {
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid rgba(148,163,184,0.4);
  background: linear-gradient(120deg, rgba(15,23,42,0.85), rgba(15,23,42,0.6));
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-ghost:hover {
  border-color: rgba(148,163,184,1);
  color: #e5e7eb;
  background: rgba(15,23,42,0.95);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.btn-ghost span.icon {
  font-size: 14px;
  transform: translateY(1px);
}

.hero-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}

/* ── Hero Dock Icons ───────────────────────────────────────────────────── */
.hero-app-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 14px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease;
}

.hero-app-icon:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.03);
}

.hero-app-icon:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 3px;
  border-radius: 14px;
}

.hero-app-icon-win {
  width: 66px;
  height: 52px;
  background: #0a0e1a;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-app-icon-win--green { --icon-glow: rgba(16, 185, 129, 0.28); }
.hero-app-icon-win--blue  { --icon-glow: rgba(96, 165, 250, 0.28); }
.hero-app-icon-win--mono  { --icon-glow: rgba(148, 163, 184, 0.2); }

.hero-app-icon:hover .hero-app-icon-win {
  box-shadow: 0 10px 28px var(--icon-glow, rgba(16, 185, 129, 0.2));
  border-color: rgba(148, 163, 184, 0.55);
}

.hero-app-icon-bar {
  height: 14px;
  background: linear-gradient(to bottom, #161b2e, #0d1018);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 5px;
  flex-shrink: 0;
}

.hero-app-icon-bar span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.hero-app-icon-bar span:nth-child(1) { background: #ff5f56; }
.hero-app-icon-bar span:nth-child(2) { background: #ffbd2e; }
.hero-app-icon-bar span:nth-child(3) { background: #27c93f; }

.hero-app-icon-glyph {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 15px;
  transition: text-shadow 0.2s ease;
}

.hero-app-icon:hover .hero-app-icon-glyph {
  text-shadow: 0 0 10px currentColor;
}

.hero-app-icon-label {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.65);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.hero-app-icon:hover .hero-app-icon-label {
  color: rgba(229, 231, 235, 0.9);
}

.hero-right {
  position: relative;
  min-height: 240px;
}

.hero-card {
  position: relative;
  border-radius: 22px;
  padding: 16px 16px 14px;
  background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(15,23,42,0.9), rgba(39,39,83,0.9));
  border: 1px solid rgba(148,163,184,0.45);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hero-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 25% 0%, #10b981, #0f172a);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 16px;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.55);
  font-family: var(--font-mono);
}

.avatar-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.avatar-name {
  font-size: 13px;
  font-weight: 500;
}

.avatar-role {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.hero-status-pill {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(52,211,153,0.4);
  color: #bbf7d0;
  background: rgba(6,78,59,0.7);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.hero-status-pill span.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.35);
}

.hero-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.hero-blurb {
  font-size: 12px;
  color: var(--muted);
}

.hero-metrics {
  display: grid;
  gap: 8px;
}

.metric {
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.35);
  padding: 6px 8px;
  background: rgba(15,23,42,0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}

.metric strong {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 500;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
}

.hero-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  gap: 10px;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-chip {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.4);
  padding: 3px 8px;
  background: rgba(15,23,42,0.85);
  font-family: var(--font-mono);
}

.hero-mini-hint {
  font-size: 10px;
  color: rgba(148,163,184,0.9);
}

/* Section wrapper */

.section {
  margin-top: 56px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
}

.section-title span.bar {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(148,163,184,0.1), rgba(148,163,184,0.9));
}

.section-subtitle {
  font-size: 13px;
  color: var(--muted);
  max-width: 420px;
}

/* Services */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 15px 14px 14px;
  background: radial-gradient(circle at top right, rgba(16,185,129,0.12), rgba(15,23,42,0.96));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
  transform-origin: center;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med), background var(--transition-med), translate var(--transition-med);
  cursor: default;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  opacity: 0;
  background: radial-gradient(circle at top, rgba(248,250,252,0.25), transparent 60%);
  transition: opacity var(--transition-med), transform var(--transition-med);
  transform: translate3d(0,0,0);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 46px rgba(15,23,42,0.95);
  border-color: rgba(148,163,184,0.75);
}

.card:hover::before {
  opacity: 1;
}

.card-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.card-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.card-body {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  border-radius: 999px;
  background: rgba(15,23,42,0.95);
  padding: 3px 7px;
  font-size: 10px;
  border: 1px solid rgba(148,163,184,0.4);
  font-family: var(--font-mono);
}

.card-link {
  font-size: 11px;
  color: #6ee7b7;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Product card (Klip) */

.product-card {
  border-radius: var(--radius-lg);
  padding: 22px 24px 28px;
  background: radial-gradient(circle at top right, rgba(59,130,246,0.14), rgba(15,23,42,0.96));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-subtle);
}

.product-card-top {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.product-card-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(29,78,216,0.35);
}

.product-card-icon img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  display: block;
}

.product-card-body {
  flex: 1 1 260px;
  min-width: 220px;
}

.product-card-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-btn {
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font-size: 12px;
  font-family: var(--font-mono);
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(148,163,184,0.4);
  color: #e5e7eb;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.product-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(110,231,183,0.7);
}

.product-btn--primary {
  background: linear-gradient(120deg, #10b981, #3b82f6);
  border-color: transparent;
  color: #0f172a;
  font-weight: 600;
}

/* Showcase: Mac window + floating iPhone */

.product-showcase {
  position: relative;
  margin: 34px 0 46px;
  padding: 0 0 0 12%;
}

.product-showcase-mac {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(148,163,184,0.35);
  border-radius: 12px;
  overflow: hidden;
  background: none;
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.product-showcase-mac:hover {
  transform: translateY(-3px);
  border-color: rgba(96,165,250,0.55);
  box-shadow: 0 22px 50px rgba(0,0,0,0.6);
}

.product-showcase-mac img {
  display: block;
  width: 100%;
  height: auto;
}

.product-showcase-phone {
  position: absolute;
  left: 0;
  bottom: -34px;
  width: 21%;
  min-width: 110px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 30px;
  transform: rotate(-9deg);
  transition: transform var(--transition-med), filter var(--transition-med);
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.55));
}

.product-showcase-phone:hover,
.product-showcase-phone:focus-visible {
  transform: rotate(0deg) translateY(-10px) scale(1.05);
}

.product-showcase-phone img {
  display: block;
  width: 100%;
  height: auto;
}

.product-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(10,14,26,0.85);
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.product-nav:hover {
  background: rgba(16,185,129,0.18);
  border-color: rgba(16,185,129,0.6);
  transform: translateY(-50%) scale(1.08);
}

.product-nav--prev {
  left: calc(12% + 10px);
}

.product-nav--next {
  right: 10px;
}

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

.product-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid rgba(148,163,184,0.4);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.product-dot:hover {
  transform: scale(1.2);
}

.product-dot.is-active {
  background: #10b981;
  border-color: #10b981;
}

.product-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(2,6,23,0.88);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.lightbox-dialog {
  position: relative;
  max-width: min(1100px, 90vw);
  max-height: 90vh;
  z-index: 1;
}

.lightbox-dialog img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148,163,184,0.3);
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148,163,184,0.4);
  background: #0a0e1a;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.lightbox-close:hover {
  border-color: rgba(16,185,129,0.7);
  background: rgba(16,185,129,0.12);
}

@media (max-width: 640px) {
  .product-card-actions {
    width: 100%;
  }
  .product-btn {
    width: 100%;
  }
  .product-showcase {
    padding-left: 22%;
    margin-bottom: 40px;
  }
  .product-showcase-phone {
    width: 32%;
    bottom: -28px;
  }
  .product-nav {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .product-nav--prev {
    right: auto;
    left: 4px;
  }
  .product-nav--next {
    right: 4px;
  }
  .product-hint {
    margin-left: 0;
    width: 100%;
  }
}

/* Stack grid */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.stack-item {
  border-radius: var(--radius-md);
  border: 1px solid rgba(148,163,184,0.35);
  padding: 8px 10px;
  background: rgba(15,23,42,0.9);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stack-item:hover {
  border-color: rgba(52,211,153,0.7);
  background: rgba(15,23,42,1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.stack-item-name {
  font-size: 12px;
  font-weight: 500;
  color: #e5e7eb;
}

.stack-item-desc {
  font-size: 10px;
  color: var(--muted);
}

/* About */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.about-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.about-text p {
  margin: 0 0 10px;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.about-list li::before {
  content: "→ ";
  color: #10b981;
}

.about-side {
  border-radius: var(--radius-lg);
  background: rgba(15,23,42,0.9);
  border: 1px solid var(--border-soft);
  padding: 12px 12px 10px;
  box-shadow: var(--shadow-subtle);
  font-size: 12px;
  color: var(--muted);
}

.about-side-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.stack-tag {
  border-radius: 999px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.4);
  padding: 3px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
}

/* Contact */

.contact-window-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-card {
  border-radius: var(--radius-lg);
  background: #0a0e1a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 460px;
  max-width: 560px;
  transition: width 0.3s ease, flex-basis 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
}

.contact-card.is-maximized {
  flex: 1 1 100%;
  max-width: 100%;
}

.faq-terminal {
  flex: 1 1 340px;
  max-width: 460px;
}

.contact-term-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(to bottom, #161b2e, #0d1018);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  flex-shrink: 0;
}

.contact-term-title {
  flex: 1;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.85);
  font-family: var(--font-mono);
  text-align: center;
}

.contact-term-body {
  flex: 1;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: #e5e7eb;
  background: #0a0e1a;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.38s ease, padding 0.38s ease, opacity 0.28s ease;
}

.contact-card.is-minimized .contact-term-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.contact-term-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.contact-term-prompt {
  color: #10b981;
  font-size: 12px;
  white-space: nowrap;
}

.contact-term-cmd {
  color: #e5e7eb;
  font-size: 12px;
}

.contact-term-output {
  color: rgba(148, 163, 184, 0.7);
  font-size: 11px;
  padding-left: 2px;
  margin-bottom: 8px;
}

.contact-term-brief {
  color: rgba(148, 163, 184, 0.92);
  font-size: 12px;
  line-height: 1.8;
  padding-left: 2px;
  margin-bottom: 2px;
}

.contact-term-hl {
  color: #10b981;
}

/* ls -l ./reach/ listing */
.contact-term-ls {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 4px;
}

.contact-term-ls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: background 0.15s;
}

.contact-term-ls-row:hover {
  background: rgba(16, 185, 129, 0.07);
}

.contact-term-ls-perm {
  color: rgba(148, 163, 184, 0.28);
  font-size: 11px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.contact-term-ls-icon {
  color: rgba(148, 163, 184, 0.6);
  font-size: 13px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.contact-term-ls-name {
  color: #10b981;
  min-width: 52px;
  flex-shrink: 0;
}

.contact-term-ls-arr {
  color: rgba(148, 163, 184, 0.35);
  font-size: 11px;
  flex-shrink: 0;
}

.contact-term-ls-val {
  color: rgba(229, 231, 235, 0.75);
  transition: color 0.15s;
}

.contact-term-ls-row:hover .contact-term-ls-val {
  color: #e5e7eb;
}

.contact-term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #10b981;
  animation: termBlink 1s step-end infinite;
  vertical-align: middle;
}

.contact-term-send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 4px;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.07);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.contact-term-send:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.85);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.contact-term-send-cursor {
  color: #e5e7eb;
  font-size: 13px;
}

/* Terminal-style contact form */

.contact-term-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-left: 2px;
}

.contact-term-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-mono);
}

.contact-term-field-label {
  flex: 0 0 auto;
  color: rgba(148, 163, 184, 0.6);
  font-size: 12px;
  padding-top: 8px;
  min-width: 70px;
}

.contact-term-field input,
.contact-term-field textarea {
  flex: 1 1 auto;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 4px;
  padding: 7px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  resize: vertical;
}

.contact-term-field input::placeholder,
.contact-term-field textarea::placeholder {
  color: rgba(148, 163, 184, 0.45);
}

.contact-term-field input:focus,
.contact-term-field textarea:focus {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.05);
}

.contact-term-field--area {
  align-items: flex-start;
}

.contact-term-form .contact-term-send {
  align-self: flex-start;
  margin-top: 2px;
  border: none;
  font: inherit;
  font-family: var(--font-mono);
}

.contact-term-formnote {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.55);
  margin: 2px 0 0;
  padding-left: 78px;
}

@media (max-width: 560px) {
  .contact-term-field {
    flex-direction: column;
    gap: 3px;
  }
  .contact-term-field-label {
    padding-top: 0;
  }
  .contact-term-formnote {
    padding-left: 0;
  }
}

/* FAQ terminal (playful prompt-style Q&A) */

.faq-term-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.faq-term-q {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(229, 231, 235, 0.8);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), padding-left var(--transition-fast);
}

.faq-term-q:hover {
  background: rgba(16, 185, 129, 0.08);
  color: #e5e7eb;
  padding-left: 12px;
}

.faq-term-q.is-active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  padding-left: 12px;
}

.faq-term-idx {
  color: #10b981;
  margin-right: 4px;
}

.faq-term-q.is-active .faq-term-idx {
  color: #6ee7b7;
}

.faq-term-answer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  animation: faqAnswerIn 0.25s ease-out;
}

.faq-term-answer p {
  color: rgba(148, 163, 184, 0.85);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  padding-left: 2px;
}

@keyframes faqAnswerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Contact terminal dot button states */
.contact-term-header .dot-min,
.contact-term-header .dot-max {
  cursor: pointer;
  transition: filter 160ms ease-out;
}

.contact-term-header .dot-min:hover,
.contact-term-header .dot-max:hover {
  filter: brightness(1.25);
}

.contact-term-header .dot-close {
  cursor: pointer;
}

/* Inactive max dot (mobile) */
.contact-term-header .dot-max.is-inactive {
  opacity: 0.28;
  cursor: not-allowed;
  filter: none;
}

/* Contact App Icon (Dock-style, shown when terminal is closed) */
.contact-app-icon {
  display: none; /* JS setzt display:flex */
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 14px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.contact-app-icon:hover {
  transform: translateY(-3px);
  background: rgba(16, 185, 129, 0.06);
}

.contact-app-icon:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 3px;
}

.contact-app-icon-win {
  width: 58px;
  height: 46px;
  background: #0a0e1a;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.18s ease;
}

.contact-app-icon:hover .contact-app-icon-win {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.18);
}

.contact-app-icon-bar {
  height: 13px;
  background: linear-gradient(to bottom, #161b2e, #0d1018);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 5px;
  flex-shrink: 0;
}

.contact-app-icon-bar span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.contact-app-icon-bar span:nth-child(1) { background: #ff5f56; }
.contact-app-icon-bar span:nth-child(2) { background: #ffbd2e; }
.contact-app-icon-bar span:nth-child(3) { background: #27c93f; }

.contact-app-icon-glyph {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.contact-app-icon-label {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.75);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* Mobile: terminal immer full-width, dot-max inaktiv */
@media (pointer: coarse), (max-width: 768px) {
  .contact-card,
  .faq-terminal {
    flex-basis: 100%;
    max-width: 100%;
  }
  .contact-term-header .dot-max {
    opacity: 0.28;
    cursor: not-allowed;
    filter: none;
  }
  .contact-term-header .dot-max:hover {
    filter: none;
  }
}

.contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.contact-title {
  font-size: 15px;
  margin-bottom: 4px;
}

.contact-body {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}

.contact-animation-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
}

#envelopeCanvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated; /* For that retro feel */
}

.contact-actions {
  display: flex;
  justify-content: flex-start; /* Or center */
}

.contact-form {
  display: none; /* Hide old form if it still exists in cached CSS */
}

.field {
  display: grid;
  gap: 3px;
  font-size: 11px;
}

.field label {
  color: var(--muted);
}

.field input,
.field textarea {
  border-radius: 11px;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.98);
  color: var(--text);
  padding: 7px 9px;
  font-size: 12px;
  resize: vertical;
  min-height: 34px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(52,211,153,0.95);
  box-shadow: 0 0 0 1px rgba(52,211,153,0.8);
  background: rgba(15,23,42,1);
}

.contact-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.contact-links {
  border-radius: var(--radius-lg);
  padding: 12px 11px;
  background: rgba(15,23,42,0.93);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-subtle);
  font-size: 12px;
  color: var(--muted);
}

.link-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 7px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.4);
  font-size: 11px;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.link-item:hover {
  background: rgba(15,23,42,1);
  border-color: rgba(148,163,184,0.85);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.link-item span.label {
  color: #e5e7eb;
}

.link-item span.value {
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Footer */

.footer {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,0.9);
  font-size: 11px;
  color: rgba(148,163,184,0.8);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.footer span.muted {
  color: rgba(148,163,184,0.8);
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms ease-out, transform 420ms ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-right {
    order: -1;
  }
  .hero-orb {
    inset: auto auto -26px 50%;
    transform: translateX(-50%);
  }
  .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .nav {
    padding-inline: 2px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(2,6,23,0.95);
    border: 1px solid rgba(148,163,184,0.2);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-cta {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-inline: 14px;
  }
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Terminal Bootscreen */
.terminal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(12px);
  animation: termFadeIn 320ms ease-out;
}

@keyframes termFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.terminal.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease-out;
}

.terminal-window {
  width: min(720px, 100%);
  max-height: min(520px, 88vh);
  border-radius: 12px;
  background: #0a0e1a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(to bottom, #161b2e, #0d1018);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: default;
  padding: 0;
  border: none;
  font: inherit;
  display: inline-block;
}

.dot-close {
  background: #ff5f56;
  cursor: pointer;
  transition: filter 160ms ease-out;
}

.dot-close:hover {
  filter: brightness(1.2);
}

.dot-min {
  background: #ffbd2e;
}

.dot-max {
  background: #27c93f;
}

.terminal-title {
  flex: 1;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.85);
  font-family: var(--font-mono);
  text-align: center;
}

.terminal-skip {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: rgba(229, 231, 235, 0.9);
  cursor: pointer;
  transition: transform 160ms ease-out, border-color 160ms ease-out;
}

.terminal-skip:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.7);
}

.terminal-body {
  flex: 1;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #e5e7eb;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0a0e1a;
}

.terminal-line {
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.terminal-prompt {
  color: #10b981;
  user-select: none;
}

.terminal-command {
  color: #e5e7eb;
}

.terminal-live {
  color: #e5e7eb;
  white-space: pre-wrap;
}

.terminal-output {
  color: #a0a3b1;
  padding-left: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-output.is-success {
  color: #6ee7b7;
}

.terminal-output.is-error {
  color: #fca5a5;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #10b981;
  animation: termBlink 1s step-end infinite;
}

@keyframes termBlink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.terminal-footer {
  padding: 8px 14px;
  background: #0d1018;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 11px;
  color: rgba(148, 163, 184, 0.75);
}

.terminal-hint code {
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: #6ee7b7;
}

.terminal-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Scrollbar */
.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

/* Mini Game App */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity 240ms ease-out;
}

.app-modal.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.app-window {
  width: min(760px, 100%);
  border-radius: 14px;
  background: #0b0f1c;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(to bottom, #151a2e, #0d1018);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.app-title {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
  font-family: var(--font-mono);
}

.app-actions {
  display: flex;
  gap: 8px;
}

.app-btn {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: rgba(229, 231, 235, 0.95);
  cursor: pointer;
  transition: transform 160ms ease-out, border-color 160ms ease-out;
}

.app-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.7);
}

.app-body {
  padding: 14px;
  display: grid;
  gap: 10px;
  justify-items: center;
  color: #e5e7eb;
  font-family: var(--font-mono);
}

.game-screen {
  position: relative;
  width: min(640px, 100%);
}

#gameCanvas {
  width: min(640px, 100%);
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #0a0e1a;
}


/* Touch Controls */
.game-controls-touch {
  display: none;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  gap: 12px;
}

.game-control-btn {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #10b981;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  border-radius: 8px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.1s;
}

.game-control-btn:active,
.game-control-btn.is-active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

/* Show on Touch/Mobile */
@media (pointer: coarse), (max-width: 1024px) {
  .game-controls-touch {
    display: flex;
  }
}

.game-start {
  position: absolute;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.92);
  color: #e5e7eb;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  z-index: 2;
}

.game-start.is-hidden {
  display: none;
}

.game-over {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 26, 0.75);
}

.game-over.is-hidden {
  display: none;
}

.game-over-grid {
  display: grid;
  gap: 1px;
  width: min(360px, 82%);
  aspect-ratio: calc(var(--cols, 23) / var(--rows, 5));
  grid-template-columns: repeat(var(--cols, 26), 1fr);
}

.game-over-pixel {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(249, 115, 22, 0.18);
  border-radius: 3px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}

.game-over-pixel.is-on {
  opacity: 1;
  transform: scale(1);
  background: #f97316;
}

.app-hint,
.app-score {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}
