/* ============================================
   Carify — landing page
   Plain CSS, no framework. Mobile-first.
   ============================================ */

:root {
  --bg: #0A0A0B;
  --surface: #131316;
  --surface-2: #1a1a1f;
  --border: #26262c;
  --text: #fafafa;
  --muted: #9a9aa3;
  --primary: #EE2B58;
  --primary-glow: #ff5e85;
  --primary-fg: #ffffff;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-glow: 0 20px 80px -20px rgba(238, 43, 88, 0.55);
  --shadow-elegant: 0 20px 60px -25px rgba(0, 0, 0, 0.7);
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-glow) 100%);
  --gradient-hero:
    radial-gradient(1200px 600px at 80% -10%, rgba(238, 43, 88, 0.35), transparent 60%),
    radial-gradient(800px 400px at 0% 100%, rgba(238, 43, 88, 0.18), transparent 60%);

  --transition: all .4s cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image: var(--gradient-hero);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
h1,h2,h3,h4 { font-family: 'Space Grotesk', system-ui, sans-serif; letter-spacing: -.02em; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 500; font-size: 14px; cursor: pointer; border: 1px solid transparent;
  transition: var(--transition);
}
.btn-primary { background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow-glow); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { border-color: var(--border); color: var(--text); height: 56px; padding: 0 20px; border-radius: 16px; }
.btn-ghost:hover { background: var(--surface); }

.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 22px; border-radius: 16px;
  background: var(--text); color: var(--bg); font-weight: 500;
  transition: var(--transition);
}
.store-btn:hover { opacity: .9; }
.store-ico { font-size: 22px; line-height: 1; }
.store-text { display: flex; flex-direction: column; justify-content: center; gap: 2px; text-align: left; }
.store-text small { font-size: 10px; line-height: 1.2; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.store-text b { font-size: 16px; line-height: 1.2; font-weight: 600; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: var(--transition); background: transparent;
}
.nav.scrolled {
  background: rgba(10,10,11,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--gradient-primary); box-shadow: var(--shadow-glow); }
.brand-logo { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow-glow); }
.brand-name { font-family: 'Space Grotesk', sans-serif; }
.nav-links { display: none; gap: 32px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: none; }
.menu-btn { background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }
.mobile-menu { display: flex; flex-direction: column; gap: 12px; padding: 16px 24px 24px; border-top: 1px solid var(--border); background: rgba(10,10,11,.95); backdrop-filter: blur(20px); }
.mobile-menu[hidden] { display: none; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-btn { display: none; }
  .mobile-menu { display: none !important; }
}

/* ===== Hero ===== */
.hero { padding: 128px 0 80px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 160px 0 112px; } .hero-grid { grid-template-columns: 1fr 1fr; } }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(19,19,22,.6); font-size: 12px; color: var(--muted); margin-bottom: 24px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; margin-bottom: 24px; }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; margin-bottom: 32px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }

.trust { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); }

/* ===== Phone mockup ===== */
.phone-wrap { position: relative; display: flex; justify-content: center; }
@media (min-width: 1024px) { .phone-wrap { justify-content: flex-end; } }
.phone-glow {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 70% 30%, rgba(238,43,88,.45), transparent 60%);
  filter: blur(40px);
}
.phone {
  position: relative; width: 320px; height: 660px;
  border: 10px solid #f5f5f7; border-radius: 48px;
  background: var(--bg); box-shadow: var(--shadow-elegant); overflow: hidden;
}
@media (max-width: 480px) { .phone { width: 280px; height: 580px; } }
.notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; background: #f5f5f7; border-radius: 999px; z-index: 2; }
.phone-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-alt { background: rgba(19,19,22,.4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin: 0 auto 56px; text-align: center; }
.section-head.row { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: none; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .15em; color: var(--primary); font-weight: 500; }
.section-head h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 700; margin-top: 12px; }

/* ===== Cards & grids ===== */
.grid-3 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

.grid-4 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: linear-gradient(180deg, #131316 0%, #0d0d10 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; transition: var(--transition);
}
.card:hover { border-color: rgba(238,43,88,.4); }
.card h3 { font-size: 18px; font-weight: 600; margin: 16px 0 8px; }
.card p { font-size: 14px; color: var(--muted); }
.ico { width: 44px; height: 44px; border-radius: 12px; background: rgba(238,43,88,.15); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ico-grad { background: var(--gradient-primary); color: var(--primary-fg); box-shadow: var(--shadow-glow); }

.step { position: relative; padding: 32px; }
.step-num { position: absolute; top: -16px; left: 8px; font-size: 88px; font-weight: 700; color: rgba(238,43,88,.15); font-family: 'Space Grotesk', sans-serif; line-height: 1; pointer-events: none; }

.stat { text-align: center; padding: 32px; }
.stat-val { font-size: clamp(36px, 5vw, 56px); font-weight: 700; font-family: 'Space Grotesk', sans-serif; margin-bottom: 8px; }
.stat-lbl { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ===== Carousel ===== */
.carousel-controls { display: none; gap: 8px; }
@media (min-width: 768px) { .carousel-controls { display: flex; } }
.carousel-controls button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 22px; cursor: pointer; transition: var(--transition);
}
.carousel-controls button:hover { border-color: rgba(238,43,88,.4); }
.carousel {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 24px 24px; scroll-behavior: smooth;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.screen { flex: 0 0 auto; width: 280px; scroll-snap-align: start; }
.screen-body {
  aspect-ratio: 9/19; border-radius: 40px; border: 8px solid #f5f5f7;
  position: relative; overflow: hidden; box-shadow: var(--shadow-elegant);
  background: var(--bg);
}
.screen-body img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen-cap { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); }

/* ===== Testimonials ===== */
.stars { color: var(--primary); font-size: 14px; margin-bottom: 12px; letter-spacing: 2px; }
.author { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-primary); color: var(--primary-fg); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.author b { font-size: 14px; display: block; }
.author small { font-size: 12px; color: var(--muted); }

/* ===== FAQ ===== */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: linear-gradient(180deg, #131316, #0d0d10); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(238,43,88,.15); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  transition: var(--transition);
}
.faq-item[open] summary span { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 20px; color: var(--muted); font-size: 14px; }

/* ===== CTA Final ===== */
.cta-box {
  position: relative; overflow: hidden;
  border-radius: 32px; padding: 56px 32px;
  background: linear-gradient(180deg, #131316, #0d0d10);
  border: 1px solid var(--border);
  text-align: center;
}
.cta-box::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--gradient-hero); opacity: .6; }
.cta-box h2 { font-size: clamp(28px, 4vw, 48px); margin-bottom: 16px; }
.cta-box > p { color: var(--muted); max-width: 520px; margin: 0 auto 40px; }
@media (min-width: 768px) { .cta-box { padding: 80px 64px; } }

.qr-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 32px; margin-top: 40px; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr img { width: 112px; height: 112px; border-radius: 12px; background: #fff; padding: 8px; }
.qr span { font-size: 12px; color: var(--muted); }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 48px 0; margin-top: 0; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { font-size: 14px; color: var(--muted); margin-top: 12px; max-width: 320px; }
.footer h4 { font-size: 14px; margin-bottom: 12px; }
.footer ul li { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 24px; margin-top: 40px;
  font-size: 12px; color: var(--muted);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: var(--transition); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .dot { transition: none; animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============== LEGAL PAGES ============== */
.legal-main { padding-top: 120px; padding-bottom: 80px; }
.legal-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 32px; transition: color .2s; }
.legal-back:hover { color: var(--text); }
.legal-header { max-width: 760px; margin-bottom: 48px; }
.legal-eyebrow { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); margin-bottom: 16px; }
.legal-header h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 0 0 20px; font-family: 'Space Grotesk', sans-serif; }
.legal-header p { font-size: 18px; color: var(--muted); line-height: 1.6; margin: 0; }
.legal-updated { font-size: 12px; color: var(--muted); margin-top: 16px !important; }

.legal-grid { display: grid; grid-template-columns: 260px 1fr; gap: 40px; }
@media (max-width: 900px) { .legal-grid { grid-template-columns: 1fr; } }

.legal-toc { position: sticky; top: 100px; align-self: start; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 20px; max-height: calc(100vh - 120px); overflow-y: auto; }
@media (max-width: 900px) { .legal-toc { position: static; max-height: none; } }
.legal-toc h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin: 0 0 16px; }
.legal-toc nav { display: flex; flex-direction: column; gap: 6px; }
.legal-toc a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 0; transition: color .2s; line-height: 1.4; }
.legal-toc a:hover, .legal-toc a.active { color: var(--primary); }
.legal-toc .num { color: rgba(238,43,88,.6); font-family: monospace; margin-right: 8px; font-size: 12px; }

.legal-article { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 24px; padding: 48px; }
@media (max-width: 700px) { .legal-article { padding: 28px 20px; } }
.legal-section { scroll-margin-top: 100px; margin-bottom: 48px; }
.legal-section:last-child { margin-bottom: 0; }
.legal-section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.legal-section-head .num { color: var(--primary); font-family: monospace; font-size: 14px; }
.legal-section h2 { font-size: clamp(22px, 3vw, 30px); margin: 0; font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
.legal-section p, .legal-section ul { color: var(--muted); line-height: 1.7; margin: 0 0 16px; }
.legal-section ul { padding-left: 24px; }
.legal-section ul li { margin-bottom: 8px; }
.legal-section a { color: var(--primary); text-decoration: underline; }
.legal-section a:hover { opacity: .8; }
.legal-section strong { color: var(--text); font-weight: 600; }
.legal-footer-note { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; margin-top: 32px; font-size: 14px; color: var(--muted); }
