/* =========================================================
   Grapple Flow — site styles
   Matches app design language: deep navy, coral red, amber.
   ========================================================= */

:root {
  --bg: #0a1628;
  --bg-elevated: #142239;
  --bg-card: #182a45;
  --border: #1f3050;
  --border-strong: #2a4068;

  --accent: #C41E3A;
  --accent-hover: #d62a47;
  --accent-warm: #C4872A;
  --accent-warm-hover: #d49a3e;

  --text: #f5f5f5;
  --text-secondary: #c5cdd9;
  --text-dim: #8b95a8;
  --text-faint: #5a6478;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.45);

  --max-width: 1180px;
  --content-width: 760px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Mono", "Roboto Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(196, 30, 58, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 0%, rgba(196, 135, 42, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #06101e 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

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

/* ---------- LAYOUT ---------- */

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

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

section { padding: 80px 0; }

@media (max-width: 720px) {
  section { padding: 56px 0; }
  body { font-size: 16px; }
}

/* ---------- HEADER ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #182a45 0%, #0a1628 100%);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
}
.nav-cta:hover { background: var(--accent-hover); text-decoration: none; }

@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- HERO ---------- */

.hero {
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(196, 135, 42, 0.12);
  border: 1px solid rgba(196, 135, 42, 0.32);
  color: var(--accent-warm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 20px 0 20px;
  font-weight: 800;
}
.hero h1 .accent { color: var(--accent); }

.hero p.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 520px;
  line-height: 1.5;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-elevated); color: var(--text); }

.hero-stats {
  margin-top: 40px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

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

/* ---------- HERO GRAPH ---------- */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-frame {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at center, #122140 0%, #0a1628 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 28px;
}

.graph-svg { width: 100%; height: 100%; }

.graph-edge {
  stroke: rgba(196, 30, 58, 0.5);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 4 4;
  animation: dash 14s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -200; } }

.graph-node {
  fill: #f5f5f5;
  stroke: rgba(255,255,255,0.5);
  stroke-width: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.graph-node-center {
  fill: var(--accent);
  stroke: rgba(255,255,255,0.6);
  stroke-width: 2;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); transform-origin: center; }
  50% { transform: scale(1.06); }
}

.graph-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  fill: var(--text-secondary);
  text-anchor: middle;
}
.graph-label-center {
  fill: #fff;
  font-size: 11px;
}

/* ---------- FEATURES ---------- */

.section-heading {
  text-align: center;
  margin-bottom: 56px;
}
.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 700;
}
.section-heading p {
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  font-size: 17px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(196, 30, 58, 0.14);
  border: 1px solid rgba(196, 30, 58, 0.3);
  display: grid; place-items: center;
  margin-bottom: 18px;
  color: var(--accent);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- STYLES STRIP ---------- */

.styles-strip {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}
.styles-strip-label {
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.styles-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.style-pill {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- PRICING ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (max-width: 820px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.tier {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.tier.featured {
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 1px var(--accent-warm), 0 16px 48px rgba(196, 135, 42, 0.18);
}

.tier-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-warm);
  color: #1a0e00;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.tier h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.tier .price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
  color: var(--text);
}
.tier .price small {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0;
}
.tier .billing {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 22px;
}

.tier ul {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  flex: 1;
}
.tier li {
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.tier li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.tier-note {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 14px;
  line-height: 1.4;
}

/* ---------- DOWNLOAD CTA ---------- */

.download-cta {
  text-align: center;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.18) 0%, rgba(196, 135, 42, 0.10) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.download-cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.download-cta p {
  color: var(--text-secondary);
  margin: 0 auto 32px;
  max-width: 540px;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: #000;
  color: #fff;
  border-radius: 14px;
  border: 1px solid #2a2a2a;
  transition: background 0.2s ease;
}
.app-store-badge:hover {
  background: #1a1a1a;
  text-decoration: none;
  color: #fff;
}
.app-store-badge .small-text {
  font-size: 11px;
  display: block;
  line-height: 1;
  letter-spacing: 0.02em;
}
.app-store-badge .big-text {
  font-size: 22px;
  font-weight: 600;
  display: block;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ---------- FOOTER ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: #06101e;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 14px 0 0;
  max-width: 320px;
  line-height: 1.55;
}

.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 14px;
  font-weight: 700;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  padding: 5px 0;
}
.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ---------- LEGAL / SUPPORT PAGE LAYOUT ---------- */

.page-header {
  padding: 64px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  font-weight: 800;
}
.page-header .meta {
  color: var(--text-dim);
  font-size: 14px;
}

.legal-content {
  padding: 56px 0 96px;
}
.legal-content h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  color: var(--text);
  font-weight: 700;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 17px;
  margin: 26px 0 10px;
  color: var(--text);
  font-weight: 700;
}
.legal-content p, .legal-content ul, .legal-content ol {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}
.legal-content ul, .legal-content ol {
  padding-left: 22px;
}
.legal-content li { margin: 6px 0; }
.legal-content strong { color: var(--text); }

.legal-content code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-warm);
  border: 1px solid var(--border);
}

.callout {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.callout strong { color: var(--text); }

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

.faq-list {
  margin-top: 40px;
}

.faq-item {
  border-top: 1px solid var(--border);
  padding: 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }

.faq-item summary {
  cursor: pointer;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  color: var(--accent);
  font-size: 22px;
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '−'; }

.faq-item .faq-answer {
  padding: 0 0 22px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
}
.faq-item .faq-answer p:first-child { margin-top: 0; }

.contact-card {
  margin-top: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
}
.contact-card h2 {
  margin: 0 0 8px !important;
  font-size: 24px !important;
}
.contact-card p {
  margin: 0 0 20px;
  color: var(--text-secondary);
}
.contact-card a.btn {
  background: var(--accent);
  color: #fff;
}
.contact-card a.btn:hover { background: var(--accent-hover); color: #fff; }
