/* ==========================================================================
   DeepDrillStudio — shared styles
   Each page sets its accent colours on <body> via a theme class:
   .theme-studio, .theme-crateswipe, .theme-dropsight
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0a0a12;
  --bg-raised: #15151f;
  --bg-sunken: #06060c;
  --line: #24243a;
  --line-strong: #363650;
  --text: #ecebe6;
  --text-muted: #9a99a3;
  --text-faint: #6b6a74;

  --accent: #c9f24a;
  --accent-2: #7ee0c3;
  --accent-ink: #0a0a12;
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);

  /* Suite colours shared by both apps */
  --magenta: #ff2bd6;
  --cyan: #00e5ff;
  --keep: #00e676;
  --bin: #ff1744;
  --pro: #ffc400;
  --indigo: #24126b;
  --violet: #4b1592;

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 40px);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Both apps share the suite look: magenta + cyan on ink, gold for Pro.
   CrateSwipe leads with magenta, DropSight with cyan. */
.theme-crateswipe {
  --accent: var(--magenta);
  --accent-2: var(--cyan);
  --accent-ink: #14000f;
}

.theme-dropsight {
  --accent: var(--cyan);
  --accent-2: var(--magenta);
  --accent-ink: #001519;
}

.theme-crateswipe, .theme-dropsight {
  --glow: color-mix(in srgb, var(--violet) 55%, transparent);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.5vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; text-wrap: pretty; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 40em; }

.muted { color: var(--text-muted); }

.gradient-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Header / nav ---------- */

.site-header {
  top: env(safe-area-inset-top, 0px);
  position: sticky; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .brand-sub { color: var(--text-faint); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; color: var(--text-muted); font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-raised); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); color: var(--text);
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
}
.nav-toggle svg { margin: auto; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-radius: 8px; }
}

/* ---------- Buttons / badges ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 88%, white); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn svg { width: 18px; height: 18px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.status-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px dashed var(--line-strong);
  color: var(--text-muted); font-size: 0.92rem;
}
.status-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.chips li {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-muted);
}

/* ---------- Sections ---------- */

section { padding: clamp(64px, 10vw, 120px) 0; }
section + section { border-top: 1px solid var(--line); }

.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(48px, 8vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none; z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy .lede { margin-bottom: 2rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Cards / grids ---------- */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.97rem; }

.feature-icon {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.feature-icon svg { width: 22px; height: 22px; }

/* Studio app cards */
.app-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: clamp(26px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 18px;
  text-decoration: none; min-height: 420px;
  transition: border-color .2s ease, transform .2s ease;
}
.app-card:hover { border-color: var(--card-accent); transform: translateY(-3px); color: var(--text); }
.app-card::after {
  content: ""; position: absolute; right: -30%; bottom: -40%; width: 80%; aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--card-accent) 30%, transparent), transparent);
  pointer-events: none;
}
.app-card .app-name { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.app-card p { color: var(--text-muted); margin: 0; max-width: 28em; }
.app-card .card-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--card-accent); }
.app-card .app-art { position: relative; z-index: 1; height: 120px; }
.app-card--crateswipe { --card-accent: var(--magenta); }
.app-card--dropsight { --card-accent: var(--cyan); }

/* Numbered steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 26px 26px 26px 84px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 26px; top: 24px;
  font-family: var(--font-mono); font-size: 1.05rem; color: var(--accent);
}
.steps h3 { margin-bottom: 0.25em; }

/* Principles list */
.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.principles li { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.principles li:nth-child(odd) { padding-right: 40px; border-right: 1px solid var(--line); }
.principles li:nth-child(even) { padding-left: 40px; }
.principles h3 { margin-bottom: 0.3em; }
.principles p { color: var(--text-muted); margin: 0; }
@media (max-width: 720px) {
  .principles { grid-template-columns: 1fr; }
  .principles li, .principles li:nth-child(odd), .principles li:nth-child(even) { padding: 24px 0; border-right: 0; }
}

/* ---------- Comparison table ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.compare { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 0.97rem; }
.compare th, .compare td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); font-weight: 500; }
.compare thead th.pro { color: var(--pro); }
.compare td:not(:first-child), .compare th:not(:first-child) { width: 22%; }
.compare .yes { color: var(--text); }
.compare .no { color: var(--text-faint); }
.compare .yes::before { content: "✓ "; color: var(--accent); }
.compare .no::before { content: "— "; }
.pricing-note { margin-top: 16px; color: var(--text-muted); }

/* ---------- Small print / notices ---------- */

.small-print { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.small-print li { position: relative; padding-left: 22px; color: var(--text-muted); }
.small-print li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 8px; height: 2px; background: var(--accent); }

.notice {
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid color-mix(in srgb, #ffcc4d 45%, var(--line));
  background: color-mix(in srgb, #ffcc4d 7%, var(--bg-raised));
  border-radius: var(--radius); padding: 20px 22px; margin-top: 28px;
}
.notice svg { width: 24px; height: 24px; flex: none; color: #ffcc4d; margin-top: 2px; }
.notice h3 { font-size: 1.05rem; margin-bottom: 0.3em; }
.notice p { margin: 0; color: var(--text-muted); font-size: 0.97rem; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-weight: 400; font-size: 1.4rem; color: var(--accent);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-muted); margin: 0 0 22px; max-width: 46em; }
.faq-group-title { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin: 40px 0 8px; }
.faq-group-title:first-child { margin-top: 0; }

/* ---------- Closing band ---------- */

.closing { text-align: center; }
.closing h2 { max-width: 18em; margin: 0 auto 0.6em; }
.closing .btn-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--text-muted); font-size: 0.93rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; }
.footer-links a { text-decoration: none; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-social { margin-top: 24px; }
.footer-bottom { margin-top: 24px; color: var(--text-faint); font-size: 0.85rem; }

/* ---------- Device mockup ---------- */

.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 19; margin: 0 auto;
  border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #2a2a33, #111116);
  box-shadow: 0 0 0 1px #3a3a44, 0 40px 80px -20px rgba(0,0,0,.7), 0 0 120px -30px color-mix(in srgb, var(--accent) 50%, transparent);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: #050506; }
.phone-screen::before { /* camera punch-hole */
  content: ""; position: absolute; top: 12px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: #000; box-shadow: 0 0 0 1px #1d1d22; z-index: 5;
}

/* ---------- App screenshots ---------- */

.hero-shot {
  width: min(360px, 82vw); max-width: 100%; margin: 0 auto; height: auto;
  border-radius: 28px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 40px 80px -24px rgba(0,0,0,.75), 0 0 140px -30px var(--glow);
}

.shots {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 18px; margin: 0 -4px;
  scrollbar-color: var(--line-strong) transparent;
}
.shots figure { flex: 0 0 auto; width: min(240px, 62vw); margin: 0; scroll-snap-align: start; }
.shots img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-raised); }
.shots-hint { color: var(--text-faint); font-size: 0.88rem; margin-top: 4px; }

.brand img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.app-card .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 40px -10px var(--card-accent); }

/* ---------- DropSight mockup ---------- */

.ds-screen { background: #040308; }
.ds-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ds-hud { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px 18px; font-size: 11px; color: #cfd0e6; background: linear-gradient(transparent, rgba(4,3,8,.92) 40%); z-index: 2; }
.ds-hud strong { display: block; font-family: var(--font-display); font-size: 13px; color: #fff; }
.ds-hud .ds-key { font-family: var(--font-mono); font-size: 9px; color: #9fa2c4; }
.ds-progress { margin-top: 10px; height: 6px; border-radius: 3px; display: flex; overflow: hidden; gap: 2px; }
.ds-progress i { display: block; height: 100%; }
.ds-countdown {
  position: absolute; top: 9%; left: 0; right: 0; text-align: center; z-index: 2; text-shadow: 0 2px 12px rgba(0,0,0,.9);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; color: #fff;
  opacity: 0; transition: opacity .3s ease;
}
.ds-countdown b { display: block; font-family: var(--font-display); font-size: 40px; letter-spacing: 0; font-weight: 600; }
.ds-countdown.show { opacity: 1; }

/* Visualiser packs */
.pack { position: relative; overflow: hidden; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.pack::before { content: ""; position: absolute; inset: 0; opacity: .55; background: var(--pack-bg); }
.pack > * { position: relative; }
.pack .pack-count { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.pack--festival { --pack-bg: radial-gradient(120% 80% at 50% 120%, #ff2bd6 0%, transparent 55%), repeating-conic-gradient(from 200deg at 50% 110%, rgba(0,229,255,.35) 0 2deg, transparent 2deg 14deg); }
.pack--warp { --pack-bg: repeating-radial-gradient(circle at 30% 40%, #7a3dff 0 8px, #ff2bd6 8px 16px, transparent 16px 30px); }
.pack--warp::before { filter: blur(1px); opacity: .3; }
.pack--immersive { --pack-bg: radial-gradient(circle at 60% 35%, #00e5ff 0 6%, transparent 30%), radial-gradient(circle at 60% 35%, transparent 0 18%, rgba(122,61,255,.6) 19% 22%, transparent 23% 34%, rgba(0,229,255,.4) 35% 37%, transparent 38%); }
.pack--cinematic { --pack-bg: radial-gradient(60% 90% at 15% 0%, rgba(255,204,77,.55), transparent 60%), linear-gradient(160deg, transparent 40%, rgba(122,61,255,.35)), repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 4px); }
.packs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.packs > :nth-child(-n+3) { grid-column: span 2; }
.packs > :nth-child(n+4) { grid-column: span 3; }
@media (max-width: 960px) {
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packs > :nth-child(n) { grid-column: span 1; }
  .packs > :last-child { grid-column: span 2; }
}
@media (max-width: 620px) {
  .packs { grid-template-columns: 1fr; }
  .packs > :nth-child(n), .packs > :last-child { grid-column: auto; }
}
.pack--dj { --pack-bg: repeating-radial-gradient(circle at 80% 50%, #1b1b22 0 2px, #26262f 2px 4px), linear-gradient(90deg, transparent 40%, #04030800 40%); }
.pack--dj::after { content: ""; position: absolute; left: 0; right: 0; top: 14%; height: 40px; opacity: .6; background: repeating-linear-gradient(90deg, #00e5ff 0 2px, transparent 2px 5px); mask: linear-gradient(transparent, #000 30%, #000 70%, transparent); -webkit-mask: linear-gradient(transparent, #000 30%, #000 70%, transparent); }

/* Story timeline (DropSight) */
.story-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.story { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); min-width: 780px; }
.story > div { padding: 16px 16px 22px; border-right: 1px solid var(--line); background: var(--bg-raised); display: flex; flex-direction: column; gap: 12px; }
.story > div:last-child { border-right: 0; }
.story img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #000; }
.story .phase { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .12em; text-transform: uppercase; display: block; }
.story p { color: var(--text-muted); margin: 0; font-size: 0.93rem; }
.story-caption { color: var(--text-faint); font-size: 0.88rem; margin: 10px 0 0; }

/* Cue legend (CrateSwipe) */
.cue-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 18px 0 0; font-size: 0.9rem; color: var(--text-muted); }
.cue-legend li { display: inline-flex; align-items: center; gap: 8px; }
.cue-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Motion preferences ---------- */

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

@media (max-width: 1040px) { .brand .brand-sub { display: none; } }
