/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: #050505;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1d1d1f;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Navbar — Liquid Glass ===== */
header {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 3rem);
  max-width: 1000px;
  pointer-events: none;
}

.navbar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.25rem;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
  pointer-events: all;
}

.logo {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.15rem;
}

.nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
  transition: color 0.2s, background 0.2s, transform 0.3s ease-out;
}

.nav-links a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.14);
  transform: scale(1.1);
}

.nav-cta {
  flex-shrink: 0;
  padding: 0.45rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s ease-out, transform 0.3s ease-out;
  letter-spacing: -0.01em;
}

.nav-cta:hover {
  background: rgba(255,255,255,0.24);
  transform: scale(1.05);
}

/* Navbar — light mode (over white/gray sections) */
.navbar--light {
  background: rgba(245, 245, 247, 0.82);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
}

.navbar--light .logo { color: #1d1d1f; }

.navbar--light .nav-links a {
  color: rgba(0, 0, 0, 0.72);
}

.navbar--light .nav-links a:hover {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.07);
}

.navbar--light .nav-cta {
  background: rgba(0, 0, 0, 0.07);
  color: #1d1d1f;
  border-color: rgba(0, 0, 0, 0.1);
}

.navbar--light .nav-cta:hover {
  background: rgba(0, 0, 0, 0.13);
}

/* ===== Mobile Icon Tabs ===== */
.mobile-tabs {
  display: none;
}

.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(255,255,255,0.7);
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.mobile-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-tab span {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.mobile-tab:hover,
.mobile-tab.active {
  color: #ffffff;
  background: rgba(255,255,255,0.12);
}

/* Light mode overrides for mobile tabs */
.navbar--light .mobile-tab {
  color: rgba(0,0,0,0.55);
}

.navbar--light .mobile-tab:hover,
.navbar--light .mobile-tab.active {
  color: #1d1d1f;
  background: rgba(0,0,0,0.07);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.4s ease-out;
}

.btn:hover {
  background: #6d28d9;
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(124,58,237,0.45);
}

/* ===== App Store Button ===== */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 0.5px solid rgba(255,255,255,0.28);
  border-radius: 14px;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background 0.4s ease-out, transform 0.4s ease-out;
  text-decoration: none;
}

.store-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.store-btn .apple-icon { width: 22px; height: 22px; flex-shrink: 0; }

.store-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 600;
  font-size: 1rem;
}

.store-btn-text small {
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.65);
}

.store-btn-sm { padding: 0.5rem 1rem; }
.store-btn-sm .apple-icon { width: 18px; height: 18px; }
.store-btn-sm .store-btn-text { font-size: 0.85rem; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #050505;
  color: #f5f5f7;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 40%, rgba(124,58,237,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 780px;
  position: relative;
}

.mobile-hero-brand {
  display: none;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
  background: rgba(124,58,237,0.14);
  border: 0.5px solid rgba(167,139,250,0.3);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-size: 4.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #f5f5f7;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero-content > p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  color: #86868b;
  letter-spacing: -0.01em;
}

.hero-note {
  margin-top: 1.25rem;
  font-size: 0.8rem !important;
  color: rgba(255,255,255,0.28) !important;
  letter-spacing: 0.02em;
  margin-bottom: 0 !important;
}

/* ===== Section Typography ===== */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86868b;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 0.9rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #86868b;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== Features — Bento Grid ===== */
.features {
  padding: 7rem 2rem;
  background: #f5f5f7;
  text-align: center;
}

.features .section-title { color: #1d1d1f; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 3.5rem auto 0;
  text-align: left;
}

.bento-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 2.25rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.055);
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
  will-change: transform;
}

.bento-card:hover {
  transform: scale(1.025);
  box-shadow: 0 16px 48px rgba(0,0,0,0.13);
}

.bento-wide { grid-column: span 2; }
.bento-full { grid-column: span 3; }

.bento-card .feature-icon {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
  display: block;
}

.bento-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.bento-card p {
  font-size: 0.95rem;
  color: #86868b;
  line-height: 1.65;
}

.bento-card.dark-card {
  background: #1c1c1e;
}
.bento-card.dark-card h3 { color: #f5f5f7; }
.bento-card.dark-card p  { color: #98989d; }

.bento-card.accent-card {
  background: linear-gradient(140deg, #7c3aed 0%, #4c1d95 100%);
  box-shadow: 0 8px 40px rgba(124,58,237,0.35);
}
.bento-card.accent-card h3 { color: #fff; }
.bento-card.accent-card p  { color: rgba(255,255,255,0.72); }

/* ===== How It Works ===== */
.how-it-works {
  padding: 7rem 2rem;
  background: #050505;
  color: #f5f5f7;
  text-align: center;
}

.how-it-works .section-title  { color: #f5f5f7; }
.how-it-works .section-subtitle { color: #86868b; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 3.5rem auto 0;
}

.step-card {
  padding: 2.25rem;
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out, border-color 0.4s ease-out;
  will-change: transform;
}

.step-card:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 60px rgba(124,58,237,0.22);
  border-color: rgba(167,139,250,0.35);
}

.step-number {
  font-size: 3rem;
  font-weight: 700;
  color: #7c3aed;
  opacity: 0.5;
  margin-bottom: 1rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f5f5f7;
  letter-spacing: -0.02em;
}

.step-card p {
  font-size: 0.9rem;
  color: #86868b;
}

/* ===== Community ===== */
.community {
  padding: 7rem 2rem;
  background: #0a0a0f;
  color: #f5f5f7;
  text-align: center;
}

.community .section-title   { color: #f5f5f7; }
.community .section-subtitle { color: #86868b; }

.community-content { max-width: 960px; margin: 0 auto; }

.community-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 3.5rem auto;
}

.highlight {
  padding: 2rem;
  background: rgba(255,255,255,0.04);
  border-radius: 22px;
  border: 0.5px solid rgba(255,255,255,0.08);
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out, border-color 0.4s ease-out;
  will-change: transform;
}

.highlight:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 60px rgba(124,58,237,0.2);
  border-color: rgba(167,139,250,0.28);
}

.highlight-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  display: block;
}

.highlight h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #f5f5f7;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.highlight p { font-size: 0.875rem; color: #86868b; }

.pull-quote {
  font-size: 1.45rem;
  font-style: italic;
  color: #a78bfa;
  border-left: 1.5px solid #7c3aed;
  padding-left: 1.25rem;
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
  letter-spacing: -0.02em;
  font-weight: 500;
}

/* ===== FAQ ===== */
.faq {
  padding: 7rem 2rem;
  background: #f5f5f7;
  text-align: center;
}

.faq .section-title { color: #1d1d1f; }

.faq-list {
  max-width: 680px;
  margin: 3rem auto 0;
  text-align: left;
}

.faq-item { border-bottom: 0.5px solid #d2d2d7; }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #1d1d1f;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: inherit;
  text-align: left;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.faq-question:hover { color: #7c3aed; }
.faq-question[aria-expanded="true"] { color: #7c3aed; }

.faq-icon {
  font-size: 1.25rem;
  font-weight: 300;
  flex-shrink: 0;
  color: #86868b;
  transition: transform 0.25s, color 0.2s;
  line-height: 1;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  color: #7c3aed;
}

.faq-answer {
  display: none;
  padding-bottom: 1.25rem;
  color: #86868b;
  font-size: 0.95rem;
}

.faq-answer.open { display: block; }

/* ===== Contact ===== */
.contact {
  padding: 7rem 2rem;
  background: #ffffff;
  text-align: center;
}

.contact .section-title   { color: #1d1d1f; }
.contact .section-subtitle { color: #86868b; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 480px;
  margin: 2.5rem auto 0;
}

.contact-form input,
.contact-form textarea {
  padding: 0.875rem 1.1rem;
  border: 0.5px solid #d2d2d7;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  background: #f5f5f7;
  color: #1d1d1f;
  -webkit-appearance: none;
  transition: border-color 0.2s, background 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #7c3aed;
  background: #fff;
}

/* ===== Form Status ===== */
.form-status {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.2em;
}

.form-status.success { color: #34c759; }
.form-status.error   { color: #ff3b30; }

/* ===== Footer ===== */
footer {
  background: #050505;
  color: #86868b;
  padding: 3rem 2rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 2rem;
}

.footer-brand .footer-logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f5f5f7;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.footer-brand p { font-size: 0.78rem; color: #515154; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.footer-links a {
  font-size: 0.8rem;
  color: #86868b;
  transition: color 0.2s;
}

.footer-links a:hover { color: #f5f5f7; }

.footer-store { display: flex; justify-content: flex-end; }

.footer-store .store-btn {
  background: rgba(255,255,255,0.06);
  color: #f5f5f7;
  border: 0.5px solid rgba(255,255,255,0.1);
}

.footer-store .store-btn:hover { background: rgba(255,255,255,0.12); }

.footer-store .store-btn .store-btn-text small { color: #86868b; }

.footer-disclaimer {
  text-align: center;
  font-size: 0.7rem;
  color: #515154;
  border-top: 0.5px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== Scroll Animations (CSS view-timeline) ===== */
@supports (animation-timeline: view()) {
  .bento-card,
  .step-card,
  .highlight {
    animation: appleReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 25%;
  }

  @keyframes appleReveal {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  header {
    top: 0.75rem;
    width: calc(100% - 2rem);
  }

  .navbar { padding: 0.5rem 0.75rem; }
  .logo      { display: none; }
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .mobile-tabs {
    display: flex;
    gap: 0;
    width: 100%;
    justify-content: space-around;
  }

  .hero { padding: 7rem 1.25rem 3rem; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-content > p { font-size: 1rem; }

  .mobile-hero-brand {
    display: block;
    font-size: 5.0rem;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    transform: translateY(-60px);
  }

  .section-title { font-size: 2rem; }

  .features,
  .how-it-works,
  .community,
  .faq,
  .contact {
    padding: 4rem 1.25rem;
  }

  /* Bento collapses to single column */
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide,
  .bento-full { grid-column: span 1; }

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

  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-links { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .footer-store { justify-content: center; }
  .pull-quote   { margin: 0; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 2rem; }
  .hero { padding-top: max(env(safe-area-inset-top), 5.5rem); padding-bottom: 3rem; }
}

@supports (padding: max(0px)) {
  footer { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
}

/* No hover effects on touch devices */
@media (hover: none) {
  .bento-card,
  .step-card,
  .highlight { transition: none; }

  .bento-card:hover  { transform: none; box-shadow: 0 2px 20px rgba(0,0,0,0.055); }
  .step-card:hover   { transform: none; box-shadow: none; border-color: rgba(255,255,255,0.1); }
  .highlight:hover   { transform: none; box-shadow: none; border-color: rgba(255,255,255,0.08); }

  .nav-links a:hover { transform: none; background: none; color: rgba(255,255,255,0.82); }
}
