/* ------------------------------------------------------------------
   Ninja Cactus — one-page site
   Theme tokens: dark is the default, light overrides via [data-theme]
------------------------------------------------------------------- */

:root {
  --green: #7cc242;
  --green-strong: #5fa82b;
  --purple: #6f52c9;
  --purple-soft: #8f78e0;

  --bg: #0f1512;
  --bg-elev: #151d18;
  --bg-card: #19231d;
  --border: #253127;
  --text: #e8ede8;
  --text-muted: #9aa69d;
  --heading: #ffffff;
  --accent: var(--green);
  --accent-contrast: #0c1a08;
  --link: #9ad666;
  --glow: rgba(124, 194, 66, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --focus: #b9e38f;

  --radius: 14px;
  --radius-sm: 10px;
  --container: 1120px;
  --gutter: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f7f4;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --border: #dfe4dc;
  --text: #1f2822;
  --text-muted: #5c6a60;
  --heading: #121a15;
  --accent: var(--green-strong);
  --accent-contrast: #ffffff;
  --link: #3f8a12;
  --glow: rgba(124, 194, 66, 0.25);
  --shadow: 0 10px 30px rgba(20, 40, 20, 0.08);
  --focus: #3f8a12;

  color-scheme: light;
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--heading); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip-link {
  position: absolute; left: 8px; top: -60px; padding: 8px 12px;
  background: var(--accent); color: var(--accent-contrast); border-radius: 8px; z-index: 100;
}
.skip-link:focus { top: 8px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700;
  color: var(--accent); margin-bottom: .75rem;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand-logo { width: auto; height: 44px; }
.brand-name { font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap; }
@media (max-width: 400px) { .brand-name { display: none; } }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--text); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--bg-elev); text-decoration: none; color: var(--heading); }

.theme-toggle {
  margin-left: 6px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--heading); }
.theme-toggle .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero-inner { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .hero-inner { grid-template-columns: 1.3fr 1fr; gap: 56px; } }
.hero-copy .lede { font-size: 1.1rem; color: var(--text); max-width: 60ch; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; display: flex; justify-content: center; order: -1; }
@media (min-width: 860px) { .hero-art { order: 0; } }
.hero-logo { position: relative; width: clamp(170px, 24vw, 280px); filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
[data-theme="light"] .hero-logo { filter: drop-shadow(0 18px 30px rgba(40,70,30,.18)); }
.hero-glow {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background-color .2s ease, border-color .2s ease;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
[data-theme="light"] .btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 42rem; margin-bottom: 40px; }

.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow); }
.card p { color: var(--text-muted); font-size: .95rem; }
.card ul { margin: auto 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--text); }
.card li { position: relative; padding-left: 18px; margin: 4px 0; }
.card li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-cta {
  background: linear-gradient(145deg, color-mix(in srgb, var(--purple) 28%, var(--bg-card)), var(--bg-card));
  border-color: color-mix(in srgb, var(--purple) 45%, var(--border));
  justify-content: center;
}
.card-cta p { color: var(--text); }
.card-cta .btn { align-self: flex-start; margin-top: 8px; }

/* Contact */
.contact-inner { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .contact-inner { grid-template-columns: 1fr 1.4fr; gap: 64px; } }
.contact-copy p { color: var(--text-muted); max-width: 38ch; }

.contact-form {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 16px;
}
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .88rem; font-weight: 700; color: var(--heading); }
.field .optional { font-weight: 500; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #d9534f; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: .92rem; color: var(--text-muted); }
.form-status.is-success { color: var(--link); }
.form-status.is-error { color: #e06b67; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: .9rem; color: var(--text-muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }

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

/* 404 page */
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.not-found { flex: 1; display: flex; align-items: center; padding: clamp(48px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.not-found-inner { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; text-align: center; }
@media (min-width: 860px) { .not-found-inner { grid-template-columns: 1fr 1.4fr; gap: 56px; text-align: left; } }
.not-found .hero-art { order: -1; }
@media (min-width: 860px) { .not-found .hero-art { order: 0; } }
.not-found-logo { width: clamp(150px, 20vw, 240px); opacity: .55; filter: grayscale(.35) drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
[data-theme="light"] .not-found-logo { filter: grayscale(.35) drop-shadow(0 18px 30px rgba(40,70,30,.18)); }
.not-found-copy .lede { font-size: 1.1rem; max-width: 50ch; margin: 0 auto 1.75rem; }
@media (min-width: 860px) { .not-found-copy .lede { margin-left: 0; } }
.not-found-copy .hero-actions { justify-content: center; }
@media (min-width: 860px) { .not-found-copy .hero-actions { justify-content: flex-start; } }

/* Footer links */
.footer-links { display: flex; gap: 20px; }

/* Prose pages (privacy, etc.) */
.page-prose { min-height: 100vh; display: flex; flex-direction: column; }
.prose-page { flex: 1; padding: clamp(48px, 7vw, 88px) 0; }
.prose { max-width: 720px; }
.prose h1 { margin-bottom: .25em; }
.prose .meta { color: var(--text-muted); font-size: .9rem; margin-bottom: 2rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.05rem; margin-top: 1.5rem; color: var(--text); }
.prose p { color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
