/* Planoptx marketing site — mirrors app theme (AppTheme.swift) */

:root {
  --teal: #0b8f85;
  --teal-dark: #29c7b5;
  --coral: #f56b6b;
  --coral-dark: #fd8c8c;
  --bg: #fafaf7;
  --surface: #ffffff;
  --hairline: #ededea;
  --text: #14181e;
  --text-secondary: #76797e;
  --muted: #f2f2ef;
  --icon-bg: #1a2b2b;
  --icon-coral: #d85a30;
  --icon-teal: #5dcaa5;
  --orb-teal: rgba(11, 143, 133, 0.12);
  --orb-coral: rgba(245, 107, 107, 0.1);
  --shadow: 0 12px 40px rgba(15, 15, 17, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1120px;
  --nav-h: 64px;
}

[data-theme="dark"] {
  --teal: #29c7b5;
  --coral: #fd8c8c;
  --bg: #0f0f11;
  --surface: #1b1b1e;
  --hairline: #2c2c30;
  --text: #f5f5f5;
  --text-secondary: #9c9da0;
  --muted: #26262a;
  --orb-teal: rgba(41, 199, 181, 0.14);
  --orb-coral: rgba(253, 140, 140, 0.1);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --teal: #29c7b5;
    --coral: #fd8c8c;
    --bg: #0f0f11;
    --surface: #1b1b1e;
    --hairline: #2c2c30;
    --text: #f5f5f5;
    --text-secondary: #9c9da0;
    --muted: #26262a;
    --orb-teal: rgba(41, 199, 181, 0.14);
    --orb-coral: rgba(253, 140, 140, 0.1);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

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

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

/* Atmospheric background */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.page-bg::before,
.page-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.page-bg::before {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -80px;
  background: var(--orb-teal);
}
.page-bg::after {
  width: 360px;
  height: 360px;
  bottom: 10%;
  left: -100px;
  background: var(--orb-coral);
}

/* Layout */
.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--teal);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.theme-toggle:hover { border-color: var(--teal); }

.nav-toggle {
  display: none;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.25rem;
}

main { padding-bottom: 4rem; }

/* Typography */
h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin: 0 0 0.75rem; }
h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.5rem; }

.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--hairline);
}
.btn-ghost:hover { border-color: var(--teal); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.glass-card {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-mark {
  width: 72px;
  height: 72px;
  margin-bottom: 1.25rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.app-store-badge img {
  height: 44px;
  width: auto;
}

/* Hero globe + paper plane (canvas) */
.hero-globe {
  position: relative;
  width: 100%;
  max-width: min(440px, 92vw);
  aspect-ratio: 1;
  margin-inline: auto;
  touch-action: pan-y;
}
.hero-globe canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Phone mockup */
.phone-mockup {
  position: relative;
  max-width: 280px;
  margin-inline: auto;
}
.phone-frame {
  background: var(--icon-bg);
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow), 0 0 0 1px var(--hairline);
}
.phone-screen {
  background: var(--bg);
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  display: flex;
  flex-direction: column;
}
.mock-header {
  padding: 1rem 1rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mock-header img { width: 28px; height: 28px; }
.mock-header span {
  font-size: 0.75rem;
  font-weight: 600;
}
.mock-body {
  flex: 1;
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mock-pill {
  font-size: 0.65rem;
  padding: 0.35rem 0.6rem;
  background: var(--muted);
  border-radius: 999px;
  color: var(--text-secondary);
  width: fit-content;
}
.mock-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  font-size: 0.7rem;
}
.mock-card strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.mock-card span { color: var(--text-secondary); }
.mock-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid var(--teal);
  border-right-color: var(--coral);
  margin: 0.5rem auto;
}

/* Sections */
.section {
  --section-fade: var(--bg);
  padding: 4rem 0;
}
.section-alt {
  --section-fade: color-mix(in srgb, var(--muted) 50%, var(--bg));
  background: var(--section-fade);
  border-block: 1px solid var(--hairline);
}
.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.feature-card-major {
  grid-column: 1 / -1;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--teal) 8%, var(--surface)),
    color-mix(in srgb, var(--coral) 6%, var(--surface))
  );
  border-color: color-mix(in srgb, var(--teal) 28%, var(--hairline));
}
.feature-detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 52rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}
.feature-detail-list strong {
  color: var(--text);
  font-weight: 600;
}
.feature-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.feature-icon--coral {
  background: color-mix(in srgb, var(--coral) 16%, transparent);
  color: var(--coral);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--teal) 15%, transparent);
  display: grid;
  place-items: center;
  color: var(--teal);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.feature-icon .sf-svg,
.sf-icon-inline .sf-svg {
  display: block;
}
.sf-icon-inline {
  display: inline-flex;
  vertical-align: middle;
  color: var(--teal);
  margin-right: 0.35rem;
}
.compare-table .sf-icon-inline {
  margin-right: 0;
  justify-content: center;
}
.mock-card-icon {
  display: inline-flex;
  color: var(--teal);
  margin-right: 0.35rem;
  vertical-align: -2px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.price-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.featured {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal), var(--shadow);
}
.popular-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.price-tier {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.price {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}
.price-period {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.price-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.1rem;
  min-height: 2.5em;
}
.price-cta {
  width: 100%;
  margin-bottom: 1.1rem;
}
.price-features {
  list-style: none;
  margin: 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}
.price-features li .sf-icon-inline {
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.price-features li.feat-lead {
  color: var(--text-secondary);
  font-weight: 600;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare-table th,
.compare-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}
.compare-table th { font-weight: 600; }
.check {
  color: var(--teal);
  text-align: center;
}
.dash { color: var(--text-secondary); text-align: center; }

/* Screenshots row */
.screenshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.screenshot-item .phone-mockup { max-width: 200px; }
.screenshot-item p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* Legal / prose */
.prose {
  max-width: 42rem;
}
.prose h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}
.prose h3 {
  margin-top: 1.5rem;
}
.prose ul, .prose ol {
  padding-left: 1.25rem;
}
.prose li { margin-bottom: 0.35rem; }
.prose p { margin: 0 0 1rem; }
.legal-page {
  padding: 2.5rem 0 4rem;
}
.legal-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item h3 { margin: 0 0 0.35rem; }
.faq-item p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  max-width: 28rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
}
.footer-grid h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 12%, var(--surface)), color-mix(in srgb, var(--coral) 8%, var(--surface)));
  border: 1px solid var(--hairline);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-globe { max-width: min(320px, 78vw); }
  .phone-mockup { max-width: 240px; }
  .screenshots { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    padding: 1rem;
    align-items: stretch;
  }
  .nav-links.is-open { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Helix hero, real screenshots, scroll reveals (added)
   ============================================================ */

/* Gentle float on hero globe */
@media (prefers-reduced-motion: no-preference) {
  .hero-visual .hero-globe { animation: floaty 7s ease-in-out infinite; }
  @keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
}

/* Gradient headline accent */
.grad-text {
  background: linear-gradient(120deg, var(--teal), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Real screenshots — infinite marquee */
.screens-marquee-outer {
  width: 100%;
  position: relative;
  margin-top: 2rem;
  overflow: hidden;
}
.screens-marquee-outer::before,
.screens-marquee-outer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2rem, 8vw, 5rem);
  z-index: 2;
  pointer-events: none;
}
.screens-marquee-outer::before {
  left: 0;
  background: linear-gradient(90deg, var(--section-fade) 30%, transparent);
}
.screens-marquee-outer::after {
  right: 0;
  background: linear-gradient(270deg, var(--section-fade) 30%, transparent);
}
.screens-marquee {
  overflow: hidden;
  width: 100%;
}
.screens-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: screens-marquee 48s linear infinite;
}
.screens-marquee-track--slow {
  animation-duration: 56s;
}
.screens-marquee:hover .screens-marquee-track,
.screens-marquee:focus-within .screens-marquee-track {
  animation-play-state: paused;
}
.screens-marquee-set {
  display: flex;
  gap: 1.25rem;
  padding-inline: 1.25rem;
  flex-shrink: 0;
}
@keyframes screens-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .screens-marquee { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .screens-marquee-track {
    animation: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  .screens-marquee-set:last-child { display: none; }
}
.real-shot {
  flex: 0 0 auto;
  width: clamp(200px, 38vw, 240px);
  text-align: center;
}
.shot-title {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
}
.shot-desc {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-secondary);
}
.real-shot .device {
  background: var(--icon-bg);
  border-radius: 32px;
  padding: 8px;
  box-shadow: var(--shadow), 0 0 0 1px var(--hairline);
  max-width: none;
  width: 100%;
  margin-inline: auto;
}
.real-shot img {
  border-radius: 26px;
  display: block;
  width: 100%;
}
.real-shot > p:not(.shot-desc) {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.real-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

/* Scroll reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.in { opacity: 1; transform: none; }
  .reveal-delay-1 { transition-delay: 0.08s; }
  .reveal-delay-2 { transition-delay: 0.16s; }
  .reveal-delay-3 { transition-delay: 0.24s; }
}

/* Real screenshot video (crafting clip) reuses the device frame */
.real-shot video {
  border-radius: 26px;
  display: block;
  width: 100%;
  background: #0c0f12;
}

/* Crafting video spotlight: phone beside copy */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  max-width: 880px;
  margin-inline: auto;
}
.spotlight .real-shot { margin: 0; }
.spotlight-copy {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.spotlight-copy li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.spotlight-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--teal), var(--coral));
}
.spotlight-copy strong { color: var(--text); }

@media (max-width: 720px) {
  .spotlight {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .spotlight .real-shot .device { max-width: 220px; }
}
