/* TwistedData Studios — shared styles */

:root {
  --bg: #07080d;
  --bg-elev: #0d1018;
  --bg-elev-2: #131724;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf3;
  --text-dim: #a4adbf;
  --text-mute: #6b7388;
  --accent: #7c5cff;        /* indigo-violet */
  --accent-2: #22d3ee;       /* cyan */
  --accent-3: #f97316;       /* orange (SolGlow tie-in) */
  --accent-yellow: #facc15;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --grad-warm: linear-gradient(135deg, #f97316 0%, #facc15 100%);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-lg: 22px;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI",
    Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

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

/* ----- Page chrome ----- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 600px at 75% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--bg);
}

.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 80%);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 8, 13, 0.7);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 17px;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--grad);
  position: relative;
  flex: 0 0 auto;
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.45);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}
.brand-mark::after {
  inset: 11px;
  border-color: rgba(255, 255, 255, 0.55);
  transform: rotate(45deg);
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 14px;
}

.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--grad);
  color: white !important;
  font-weight: 600;
}

.nav-cta:hover { text-decoration: none; opacity: 0.92; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ----- Typography ----- */

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}

h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: 22px; }
p  { color: var(--text-dim); }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.06);
  margin-bottom: 24px;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-warm {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.hero {
  padding: 120px 0 80px;
  position: relative;
}

.hero p.lede {
  font-size: 20px;
  max-width: 640px;
  margin-bottom: 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: rgba(255,255,255,0.3); }

.btn-primary {
  background: var(--grad);
  border: none;
  color: white;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.3);
}

.btn-primary:hover { color: white; }

.btn-warm {
  background: var(--grad-warm);
  border: none;
  color: #1a0f00;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.35);
}

.btn-warm:hover { color: #1a0f00; }

/* App Store CTA — black pill with Apple glyph and stacked label */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-radius: 14px;
  background: #000;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.btn-appstore:hover {
  text-decoration: none;
  color: white;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-appstore svg { flex: 0 0 auto; }
.btn-appstore .as-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}
.btn-appstore .as-top {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 2px;
}
.btn-appstore .as-bot {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Live status pill — used as eyebrow when announcing App Store availability */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(249, 115, 22, 0.10);
  border: 1px solid rgba(249, 115, 22, 0.4);
  margin-bottom: 24px;
}
.live-pill::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.04); }
}

/* Press / resources card */
.press-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-top: 32px;
  align-items: center;
}
@media (max-width: 760px) { .press-row { grid-template-columns: 1fr; } }

.press-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.press-card:hover {
  text-decoration: none;
  color: var(--text);
  transform: translateY(-1px);
  border-color: var(--accent);
}
.press-card .icon {
  width: 52px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: linear-gradient(180deg, #1a1d28, #0d1018);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--accent-3);
  position: relative;
}
.press-card .icon[data-label]::after {
  content: attr(data-label);
  position: absolute;
  bottom: 4px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}
.press-card .body { flex: 1; }
.press-card h4 { margin: 0 0 4px; font-size: 16px; }
.press-card p  { margin: 0; font-size: 13px; color: var(--text-dim); }
.press-card .arrow { color: var(--accent-2); font-family: var(--mono); margin-left: 8px; }

/* ----- Section ----- */

section { padding: 80px 0; }
section.tight { padding: 48px 0; }

.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}

.section-head p {
  font-size: 18px;
}

/* ----- Cards / grid ----- */

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 880px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.15);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--accent);
}

.card h3 { margin: 0 0 8px; }
.card p { margin: 0; font-size: 15px; }

/* ----- Product showcase ----- */

.product-band {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.08), rgba(34, 211, 238, 0.04));
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.product-band::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  right: -140px;
  top: -200px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18), transparent 60%);
  pointer-events: none;
}

@media (max-width: 980px) {
  .product-band {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }
}

.product-band h2 { font-size: 40px; }

.feature-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-dim);
  font-size: 15px;
}

.feature-list li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--grad-warm);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.4);
}

/* ----- Phone frame for SVG screenshots ----- */

.phones {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.phone-frame {
  width: 260px;
  flex: 0 0 auto;
  background: #000;
  border-radius: 44px;
  padding: 8px;
  border: 1px solid #1a1d28;
  box-shadow:
    0 0 0 2px #1a1d28 inset,
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(124, 92, 255, 0.12);
  position: relative;
}

.phone-screen {
  border-radius: 36px;
  overflow: hidden;
  background: #f4f5f8;
  position: relative;
  display: block;
  width: 100%;
}

.phone-screen svg { display: block; width: 100%; height: auto; }

.phone-caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 14px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* Hero phone (single, larger, floating) */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-phone {
  width: 320px;
  margin: 0 auto;
  transform: rotate(-2deg);
  transition: transform 0.6s ease;
}

.hero-phone:hover { transform: rotate(0deg) translateY(-6px); }

/* ----- Stats row ----- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--bg-elev);
}

@media (max-width: 720px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat-label {
  color: var(--text-mute);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 80px;
  color: var(--text-mute);
  font-size: 14px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-dim); }

/* ----- Doc pages (privacy / support) ----- */

.doc {
  padding: 80px 0 40px;
}

.doc-meta {
  font-family: var(--mono);
  color: var(--text-mute);
  font-size: 13px;
  margin: 12px 0 32px;
  letter-spacing: 0.05em;
}

.doc-content {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  font-size: 16px;
  color: var(--text);
}

.doc-content h1 { font-size: 36px; margin-top: 0; }
.doc-content h2 { font-size: 24px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border); }
.doc-content h2:first-of-type { border-top: none; padding-top: 0; }
.doc-content h3 { font-size: 18px; margin-top: 28px; color: var(--text); }
.doc-content p, .doc-content li { color: var(--text-dim); }
.doc-content strong { color: var(--text); }
.doc-content ul, .doc-content ol { padding-left: 22px; }
.doc-content li { margin-bottom: 6px; }
.doc-content a { color: var(--accent-2); }
.doc-content code {
  font-family: var(--mono);
  background: var(--bg-elev-2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.92em;
}

.doc-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0;
  font-size: 14.5px;
}
.doc-content th, .doc-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.doc-content th { background: var(--bg-elev-2); color: var(--text); font-weight: 600; }

.doc-toc {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 20px 0 32px;
}
.doc-toc strong { display: block; margin-bottom: 8px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.doc-toc ol { margin: 0; padding-left: 20px; }
.doc-toc a { color: var(--text-dim); font-size: 14px; }

.back-link {
  display: inline-flex;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 24px;
  color: var(--text-mute);
  font-family: var(--mono);
}
