@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-void: #000000;
  --bg-primary: #050505;
  --bg-elevated: #0a0a0a;
  --bg-subtle: #111111;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6b16ed;
  --accent-bright: #8b3dff;
  --accent-glow: rgba(107, 22, 237, 0.45);
  --accent-soft: rgba(107, 22, 237, 0.16);
  --gold: #fcd34d;
  --gold-soft: rgba(252, 211, 77, 0.14);
  --success: #22c55e;
  --warning-bg: rgba(30, 41, 59, 0.6);
  --font-display: 'Chakra Petch', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.page-shell {
  position: relative;
  z-index: 1;
}

.mesh-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
  min-height: clamp(280px, 42vw, 420px);
}

.mesh-hero__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.92;
}

.mesh-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.35) 0%, rgba(5, 5, 5, 0.82) 68%, rgba(5, 5, 5, 0.96) 100%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.88) 0%, rgba(5, 5, 5, 0.35) 55%, rgba(5, 5, 5, 0.75) 100%);
  pointer-events: none;
}

.mesh-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 5vw, 3rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.display-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: var(--space-4);
}

.lead {
  color: var(--text-secondary);
  max-width: 58ch;
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-6);
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
}

.badge--accent {
  border-color: rgba(107, 22, 237, 0.35);
  background: var(--accent-soft);
  color: #d8b4fe;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-12) clamp(1rem, 4vw, 2rem) var(--space-16);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.section-copy {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 62ch;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass-elevated {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.card {
  padding: var(--space-6);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(107, 22, 237, 0.35);
  box-shadow: 0 0 30px var(--accent-glow);
}

.card-hero {
  grid-column: span 6;
  grid-row: span 2;
}

.card-wide {
  grid-column: span 6;
}

.card-tall {
  grid-column: span 4;
}

.card-art {
  width: 100%;
  border-radius: 10px;
  margin-bottom: var(--space-4);
  border: 1px solid var(--glass-border);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: var(--space-3);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: var(--space-4);
}

.card .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.btn:hover {
  background: var(--accent-bright);
  transform: scale(1.02);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  margin-top: var(--space-2);
}

.btn-secondary:hover {
  border-color: rgba(107, 22, 237, 0.45);
  background: var(--glass-hover);
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

pre {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: var(--space-4) 0;
}

code {
  font-family: var(--font-mono);
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
}

.client-grid a {
  display: block;
  padding: 0.8rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  border-radius: var(--radius-lg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.client-grid a:hover {
  transform: scale(1.02);
  border-color: rgba(107, 22, 237, 0.4);
  box-shadow: 0 0 20px rgba(107, 22, 237, 0.2);
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-8);
  font-size: 0.88rem;
}

.nav-bar a {
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-bar a:hover {
  color: var(--gold);
}

.notice {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  font-size: 0.9rem;
  color: var(--text-secondary);
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.08);
}

.notice strong {
  color: var(--success);
}

form.glass-elevated {
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

input[type='text'],
input[type='password'],
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: var(--space-4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(107, 22, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(107, 22, 237, 0.15);
}

.field-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-4);
}

.field-row input {
  width: auto;
  margin: 0;
}

.field-row label {
  margin: 0;
  font-weight: 400;
}

.output-section {
  margin-top: var(--space-8);
}

.deeplink-box {
  margin-top: var(--space-6);
}

.deeplink-box a.btn {
  word-break: break-all;
}

.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: var(--space-8) clamp(1rem, 4vw, 2rem);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--accent-bright);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

@media (max-width: 768px) {
  .card-hero,
  .card-wide,
  .card-tall {
    grid-column: span 12;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
