/* DivineWalls — shared styles */

:root {
  --bg: #faf8ff;
  --bg-alt: #f1edfb;
  --surface: #ffffff;
  --text: #221c35;
  --text-muted: #5b5470;
  --border: #e4dff5;
  --primary: #6c4fd6;
  --primary-dark: #5539c0;
  --primary-light: #8f78ea;
  --accent: #f4b400;
  --accent-dark: #d99a00;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(76, 55, 143, 0.12);
  --shadow-sm: 0 4px 14px rgba(76, 55, 143, 0.08);
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14101f;
    --bg-alt: #1b1630;
    --surface: #1f1a33;
    --text: #f2eefc;
    --text-muted: #b3a9cf;
    --border: #322a4d;
    --primary: #9484e8;
    --primary-dark: #7a67d9;
    --primary-light: #ab9df0;
    --accent: #ffc94d;
    --accent-dark: #f4b400;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--primary);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
}

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

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  padding: 72px 0 48px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--bg-alt);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 46ch;
}

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

.store-badges {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.store-badge:hover {
  text-decoration: none;
  border-color: var(--primary);
}

.store-badge small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Phone mockup */
.phone-mock {
  position: relative;
  width: 260px;
  height: 540px;
  margin: 0 auto;
  border-radius: 40px;
  background: linear-gradient(160deg, #2a2340, #1a1530);
  padding: 14px;
  box-shadow: var(--shadow);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  background: #000;
}

.phone-screen .tile {
  border-radius: 10px;
}

.phone-screen .tile:nth-child(1) { background: linear-gradient(135deg, #6c4fd6, #a78bfa); }
.phone-screen .tile:nth-child(2) { background: linear-gradient(135deg, #f4b400, #ffdd8a); }
.phone-screen .tile:nth-child(3) { background: linear-gradient(135deg, #38b6a4, #9be8db); }
.phone-screen .tile:nth-child(4) { background: linear-gradient(135deg, #e0679a, #f6b9d0); }
.phone-screen .tile:nth-child(5) { background: linear-gradient(135deg, #4568dc, #b06ab3); }
.phone-screen .tile:nth-child(6) { background: linear-gradient(135deg, #ffb347, #ffcc80); }

/* Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #221c35;
  font-weight: 700;
  margin-bottom: 14px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-banner p {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.85);
}

.cta-banner .store-badges {
  justify-content: center;
}

.cta-banner .store-badge {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.cta-banner .store-badge small {
  color: rgba(255, 255, 255, 0.7);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: var(--bg-alt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 32ch;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--text);
  font-size: 0.92rem;
}

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

/* Legal / prose pages */
.page-hero {
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.page-hero .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.prose h2 {
  font-size: 1.3rem;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.prose ul {
  padding-left: 22px;
}

.prose a {
  color: var(--primary);
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 8px;
}

.toc h2 {
  margin: 0 0 12px !important;
  font-size: 1rem !important;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.contact-card {
  max-width: 760px;
  margin: 40px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.contact-card h2 {
  margin: 0 0 10px;
}

.contact-card p {
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* Responsive */
@media (max-width: 860px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero .phone-mock {
    order: -1;
  }

  .feature-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-cta {
    display: inline-flex;
    position: absolute;
    top: calc(100% + 190px);
    left: 24px;
  }

  .feature-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc ol {
    columns: 1;
  }

  .phone-mock {
    width: 220px;
    height: 460px;
  }
}
