/* ============================================================
   Dragman Labs — site stylesheet
   Dark, modern, privacy-studio aesthetic. No external fonts,
   no external requests: everything self-contained.
   ============================================================ */

:root {
  --bg: #0a0e13;
  --bg-soft: #0e141b;
  --surface: #121a23;
  --surface-2: #17202b;
  --border: #1f2a37;
  --border-strong: #2b3949;
  --text: #e8eef4;
  --muted: #97a6b4;
  --faint: #6b7886;
  --accent: #4ade80;
  --accent-soft: rgba(74, 222, 128, 0.12);
  --accent-ink: #062512;
  --header-bg: rgba(10, 14, 19, 0.82);
  --prose: #c4cfd9;
  --card-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --app: var(--accent);
  --app-soft: var(--accent-soft);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- light theme ---------- */

html.light {
  --bg: #f5f7fa;
  --bg-soft: #edf1f6;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --border: #dfe5ec;
  --border-strong: #c3cdd8;
  --text: #16222e;
  --muted: #52606e;
  --faint: #75828f;
  --accent: #16a34a;
  --accent-soft: rgba(22, 163, 74, 0.12);
  --accent-ink: #ffffff;
  --header-bg: rgba(245, 247, 250, 0.85);
  --prose: #36444f;
  --card-shadow: 0 14px 36px rgba(20, 35, 50, 0.12);
}

html.light .hero h1 .grad {
  background: linear-gradient(92deg, #16a34a 0%, #0d9488 55%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* per-app accents (dark default + light variant) */
.theme-stowly           { --app: #2dd4bf; --app-soft: rgba(45, 212, 191, 0.12); }
html.light .theme-stowly           { --app: #0d9488; --app-soft: rgba(13, 148, 136, 0.12); }
.theme-fold-stats       { --app: #a78bfa; --app-soft: rgba(167, 139, 250, 0.12); }
html.light .theme-fold-stats       { --app: #7c3aed; --app-soft: rgba(124, 58, 237, 0.12); }
.theme-old-school-snake { --app: #a3e635; --app-soft: rgba(163, 230, 53, 0.12); }
html.light .theme-old-school-snake { --app: #65a30d; --app-soft: rgba(101, 163, 13, 0.12); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  height: 64px;
}

.logo {
  order: 0;
  margin-right: auto;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; flex: none; margin-right: 10px; }
.logo .lab { color: var(--accent); }

.nav-links {
  order: 1;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .btn { color: var(--accent-ink); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  padding: 3px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
}
.lang-switch a:hover { color: var(--text); text-decoration: none; }
.lang-switch a.active { background: var(--surface-2); color: var(--text); }

.nav-toggle {
  order: 3;
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 7px 10px;
  cursor: pointer;
}

.theme-toggle {
  order: 2;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle .ic-sun { display: none; }
html.light .theme-toggle .ic-sun { display: block; }
html.light .theme-toggle .ic-moon { display: none; }

/* ---------- buttons & pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 0.97rem;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(74, 222, 128, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { box-shadow: none; border-color: var(--faint); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.pill.accent { color: var(--app); border-color: transparent; background: var(--app-soft); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--border);
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 12% -10%, rgba(74, 222, 128, 0.13), transparent 65%),
    radial-gradient(700px 380px at 95% 0%, rgba(45, 212, 191, 0.1), transparent 65%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 16ch;
}
.hero h1 .grad {
  background: linear-gradient(92deg, #4ade80 0%, #2dd4bf 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 30px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }

.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
}
.stat b {
  display: block;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat span { font-size: 0.85rem; color: var(--muted); }

/* ---------- sections ---------- */

section { padding: 78px 0; }
section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { margin-bottom: 42px; max-width: 680px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

/* ---------- app cards ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 18px;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.app-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: var(--app);
  box-shadow: var(--card-shadow);
}
.app-card .icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  border: 1px solid var(--border-strong);
}
.app-card h3 { margin: 0; font-size: 1.18rem; letter-spacing: -0.01em; }
.app-card p { margin: 0; color: var(--muted); font-size: 0.95rem; flex: 1; }
.app-card .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.app-card .more { font-size: 0.92rem; font-weight: 600; color: var(--app); }

.note-banner {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  color: var(--text);
  font-size: 0.97rem;
}
.note-banner svg { flex: none; margin-top: 3px; }

/* ---------- services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.service {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.service .ic {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.service h3 { margin: 0 0 8px; font-size: 1.06rem; }
.service p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- about / timeline ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: start;
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 26px 28px;
  border-left: 1px solid var(--border-strong);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5.5px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
}
.timeline .when {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.03em;
}
.timeline h3 { margin: 2px 0 4px; font-size: 1.02rem; }
.timeline p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- contact ---------- */

.contact-card {
  background:
    radial-gradient(420px 200px at 85% -20%, rgba(74, 222, 128, 0.14), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: clamp(32px, 6vw, 60px);
  text-align: center;
}
.contact-card h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.contact-card p { color: var(--muted); max-width: 52ch; margin: 0 auto 28px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-meta { margin-top: 26px; color: var(--faint); font-size: 0.9rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 52px 0 36px;
  font-size: 0.93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-grid h4 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { color: var(--muted); margin: 10px 0 0; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.84rem;
}

/* ---------- app detail pages ---------- */

.app-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.app-hero .hero-glow {
  background: radial-gradient(620px 320px at 18% -10%, var(--app-soft), transparent 65%);
}
.app-hero-inner { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.app-hero .icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.app-hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: -0.02em; }
.app-hero .tagline { color: var(--muted); font-size: 1.12rem; margin: 0 0 18px; max-width: 56ch; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 16px;
  color: #e8eef4; /* badge stays black in both themes, so text stays light */
}
.play-badge:hover { text-decoration: none; border-color: var(--faint); }
.play-badge .tri { width: 20px; height: 22px; }
.play-badge small { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: #97a6b4; line-height: 1.1; }
.play-badge b { display: block; font-size: 0.98rem; line-height: 1.15; }
.play-badge.soon { opacity: 0.85; }

.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-track { background: transparent; }
.shots::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.shots img {
  height: 460px;
  width: auto;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  scroll-snap-align: start;
  flex: none;
  background: var(--surface);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}
.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.feature svg { flex: none; margin-top: 3px; color: var(--app); }
.feature b { display: block; font-size: 0.99rem; }
.feature span { color: var(--muted); font-size: 0.92rem; }

.info-cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.panel h3 { margin: 0 0 14px; font-size: 1.1rem; }
.panel p { color: var(--muted); font-size: 0.96rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table td:first-child { color: var(--faint); width: 44%; padding-right: 12px; }
.spec-table tr:last-child td { border-bottom: none; }

.privacy-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--app-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-top: 18px;
}
.privacy-callout svg { flex: none; color: var(--app); margin-top: 2px; }
.privacy-callout p { margin: 0; font-size: 0.94rem; color: var(--text); }

/* fold-stats highlight mock (no screenshots yet) */
.mock-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.mock-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.mock-stat b {
  display: block;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  color: var(--app);
  font-family: var(--mono);
}
.mock-stat span { color: var(--muted); font-size: 0.88rem; }

/* ---------- privacy / prose pages ---------- */

.prose-wrap { padding: 64px 0 88px; }
.prose {
  max-width: 760px;
}
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin: 0 0 8px; }
.policy-meta { color: var(--faint); font-size: 0.92rem; margin-bottom: 36px; }
.policy-meta .pill { margin-left: 8px; }
.prose h2 {
  font-size: 1.32rem;
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.prose p, .prose li { color: var(--prose); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.93rem; margin-bottom: 28px; }
.back-link:hover { color: var(--text); text-decoration: none; }

.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.policy-grid .app-card { padding: 20px; flex-direction: row; align-items: center; }
.policy-grid .app-card .icon { width: 46px; height: 46px; border-radius: 12px; }
.policy-grid .app-card h3 { font-size: 1.02rem; }
.policy-grid .app-card span { color: var(--faint); font-size: 0.85rem; }

/* ---------- reveal animation ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .app-card { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .about-grid, .info-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .shots img { height: 380px; }
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 9px 0; font-size: 1.05rem; }
  .nav-links .lang-switch a { padding: 3px 11px; font-size: 0.83rem; }
  .nav-links .lang-switch { margin: 6px 0; }
  .nav-toggle { display: block; }
}

@media (max-width: 640px) {
  .hero { padding: 64px 0 56px; }
  section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .shots img { height: 320px; }
  .app-hero .icon { width: 76px; height: 76px; }
}
