/* ============================================================
   TetherFree — marketing site styles
   System font stack (San Francisco on Apple), indigo accent,
   dark mode via prefers-color-scheme. No external fonts.
   ============================================================ */

:root {
  /* Brand */
  --accent: #6C63FF;
  --accent-hover: #5b52e8;
  --accent-muted: rgba(108, 99, 255, 0.12);
  --accent-ring: rgba(108, 99, 255, 0.35);

  /* iOS semantic colors */
  --success: #34C759;
  --warning: #FF9F0A;
  --destructive: #FF3B30;

  /* Light theme */
  --bg: #FFFFFF;
  --surface: #F2F2F7;
  --surface-2: #FFFFFF;
  --text: #1C1C1E;
  --text-secondary: #8E8E93;
  --border: rgba(60, 60, 67, 0.12);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 60px rgba(28, 28, 30, 0.10);

  /* Type */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1C1C1E;
    --surface-2: #1C1C1E;
    --text: #FFFFFF;
    --text-secondary: #98989F;
    --border: rgba(255, 255, 255, 0.10);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

.section { padding: 96px 0; }
@media (max-width: 768px) { .section { padding: 64px 0; } }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.022em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--text-secondary); font-size: 1.1rem; margin-top: 14px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 8px 24px var(--accent-ring); }

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

.btn-block { display: flex; width: 100%; }

/* ---------- App Store badge (official Apple black badge) ---------- */
.appstore-badge { display: inline-block; line-height: 0; }
.appstore-badge img, .appstore-badge svg { height: 52px; width: auto; }
.appstore-badge:hover { text-decoration: none; opacity: 0.92; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .logo-mark { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav .btn-primary { padding: 10px 18px; font-size: 0.92rem; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
}

.mobile-menu {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 16px 24px 24px; }
.mobile-menu li { margin: 4px 0; }
.mobile-menu a { display: block; padding: 12px 0; color: var(--text); font-weight: 500; font-size: 1.05rem; }
.mobile-menu a:hover { text-decoration: none; }
.mobile-menu .btn { margin-top: 12px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.9rem; color: var(--text-secondary); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

/* ---------- iPhone mockup (placeholder for real screenshots) ---------- */
.phone-wrap { display: flex; justify-content: center; perspective: 1600px; }
.phone {
  position: relative;
  width: 290px;
  background: #0a0a0a;
  border-radius: 46px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s ease;
}
.hero .phone { transform: rotate(12deg); }
.hero .phone:hover { transform: rotate(8deg) translateY(-6px); }
.phone-screen {
  position: relative;
  background: var(--surface);
  border-radius: 36px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ============================================================
   FEATURE CARDS (Built for households)
   ============================================================ */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card .c-ico {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-muted);
  color: var(--accent);
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-secondary); }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.step-num {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-secondary); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* ============================================================
   FAMILY-FIRST (split section)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split .phone { transform: rotate(-8deg); }
.split .phone:hover { transform: rotate(-5deg) translateY(-6px); }
.split-text h2 { margin-bottom: 18px; }
.split-text p { color: var(--text-secondary); font-size: 1.08rem; margin-bottom: 16px; }
.split-list { list-style: none; margin-top: 20px; }
.split-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  color: var(--text);
}
.split-list .tick {
  flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-muted); color: var(--accent);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700;
  margin-top: 2px;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split .phone-wrap { order: -1; }
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  position: relative;
}
.price-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 0.74rem; font-weight: 600;
  padding: 5px 14px; border-radius: 999px;
}
.price-name { font-weight: 700; font-size: 1.15rem; }
.price-amt { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; margin: 12px 0 4px; }
.price-amt span { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); }
.price-desc { color: var(--text-secondary); font-size: 0.95rem; min-height: 42px; }
.price-feats { list-style: none; margin: 22px 0; flex: 1; }
.price-feats li { display: flex; gap: 10px; padding: 8px 0; font-size: 0.95rem; }
.price-feats .tick { color: var(--accent); font-weight: 700; flex: 0 0 auto; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ============================================================
   SECURITY
   ============================================================ */
.security { background: var(--surface); }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.sec-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.sec-item .c-ico {
  width: 48px; height: 48px; margin: 0 auto 16px;
  display: grid; place-items: center; border-radius: 14px;
  background: var(--accent-muted); color: var(--accent);
}
.sec-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.sec-item p { color: var(--text-secondary); font-size: 0.92rem; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } }

/* ============================================================
   FINAL CTA
   ============================================================ */
.final-cta { text-align: center; }
.final-cta .inner {
  background: linear-gradient(135deg, var(--accent), #8b84ff);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  color: #fff;
}
.final-cta h2 { color: #fff; margin-bottom: 14px; }
.final-cta p { color: rgba(255,255,255,0.9); max-width: 480px; margin: 0 auto 28px; font-size: 1.1rem; }
.final-cta .appstore-badge { filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25)); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 48px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { color: var(--text-secondary); font-size: 0.9rem; }

/* ============================================================
   LEGAL / DOC PAGES (privacy, support)
   ============================================================ */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.doc h1 { margin-bottom: 12px; }
.doc .doc-meta { color: var(--text-secondary); margin-bottom: 36px; }
.doc h2 { font-size: 1.4rem; margin: 36px 0 12px; }
.doc h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.doc p { color: var(--text); margin-bottom: 14px; }
.doc ul { margin: 0 0 16px 20px; }
.doc li { margin-bottom: 8px; }
.doc strong { font-weight: 600; }
.doc a { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin-bottom: 24px; }

/* ---------- Support / FAQ ---------- */
.support-hero { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.support-hero p { color: var(--text-secondary); font-size: 1.1rem; margin-top: 14px; }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}
.contact-card .c-ico {
  width: 52px; height: 52px; margin: 0 auto 16px;
  display: grid; place-items: center; border-radius: 14px;
  background: var(--accent-muted); color: var(--accent);
}
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { color: var(--text-secondary); margin-bottom: 20px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none; border: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px;
  font-family: var(--font);
  font-size: 1.08rem; font-weight: 600;
  color: var(--text); text-align: left; cursor: pointer;
}
.faq-q .chev { flex: 0 0 auto; transition: transform 0.2s ease; color: var(--accent); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.28s ease;
  color: var(--text-secondary);
}
.faq-a > div { padding: 0 4px 22px; }
.faq-item.open .faq-a { max-height: 360px; }

/* ============================================================
   OAUTH REDIRECT
   ============================================================ */
.oauth {
  min-height: 100vh;
  display: grid; place-items: center; text-align: center; padding: 24px;
}
.oauth-inner { max-width: 420px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 28px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.oauth h1 { font-size: 1.5rem; margin-bottom: 12px; }
.oauth p { color: var(--text-secondary); }

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

/* ---------- 404 ---------- */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.notfound .big { font-size: 6rem; font-weight: 700; color: var(--accent); letter-spacing: -0.04em; line-height: 1; }
.notfound h2 { margin: 8px 0 12px; }
.notfound p { color: var(--text-secondary); margin-bottom: 28px; }
