/* ================================================================
   Trickle Design System — Tesla × Apple Hybrid
   Full theme replacement. Read web/DESIGN_SYSTEM.md before editing.
   ================================================================ */

:root {
  --bg-deep:        #080808;
  --bg-section:     #0d0d0d;
  --bg-card:        rgba(255, 255, 255, 0.04);
  --border-glass:   rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(255, 255, 255, 0.18);
  --text-primary:   #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary:  #6e6e73;
  --accent-blue:    #0071e3;
  --accent-dim:     rgba(0, 113, 227, 0.15);
  --section-pad-x:  clamp(24px, 8vw, 120px);
  --section-pad-y:  clamp(80px, 12vh, 140px);
  --text-hero:      clamp(40px, 9vw, 96px);
  --text-h2:        clamp(28px, 5vw, 56px);
  --text-h3:        clamp(18px, 2.5vw, 26px);
  --text-body:      clamp(15px, 1.5vw, 18px);
  --ease-out:       cubic-bezier(0, 0, 0.2, 1);
  --ease-apple:     cubic-bezier(0.25, 1, 0.5, 1);
  --radius-card:    16px;
  --radius-pill:    980px;
  --radius-btn:     10px;
  --max-width:      1100px;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display',
               'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

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

/* ── Typography ── */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); letter-spacing: -0.01em; }

p { line-height: 1.65; }

/* Gradient text — kept for advanced.html compatibility */
.gradient-text {
  background: linear-gradient(to bottom, #fff 40%, rgba(255, 255, 255, 0.5));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Glassmorphism base ── */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 52px;
  padding: 0 var(--section-pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo img {
  height: 28px;
  width: auto;
  mix-blend-mode: screen;
  filter: brightness(1.2) contrast(1.6);
  clip-path: circle(48%);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.btn-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out),
              background 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
  white-space: nowrap;
}

.btn:active { transform: scale(0.98) !important; }

.btn-primary {
  background: #ffffff;
  color: #080808;
}
.btn-primary:hover {
  background: #f0f0f0;
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.12);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.02);
}

.btn-blue {
  background: var(--accent-blue);
  color: #ffffff;
}
.btn-blue:hover {
  background: #0062c4;
  transform: scale(1.02);
  box-shadow: 0 8px 28px rgba(0, 113, 227, 0.35);
}

.btn-lg {
  height: 52px;
  padding: 0 36px;
  font-size: 1rem;
  border-radius: 12px;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.badge-blue {
  background: rgba(0, 113, 227, 0.12);
  color: var(--accent-blue);
}

.badge-green {
  background: rgba(52, 199, 89, 0.1);
  color: #34c759;
}

/* ── Section Tag ── */
.section-tag {
  display: block;
  color: var(--accent-blue);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px var(--section-pad-x) 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 820px;
  z-index: 2;
}

.hero-content h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: #ffffff;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 48px;
  line-height: 1.65;
  font-weight: 400;
}

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

.hero-actions-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-footnote {
  font-size: 0.77rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* Scroll line hint */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
  z-index: 2;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.9; }
}

/* ── Trust Strip ── */
.trust-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px var(--section-pad-x);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.trust-dot {
  color: var(--accent-blue);
  font-size: 0.6rem;
}

/* ── SMC Difference Section ── */
.smc-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--section-pad-y) var(--section-pad-x);
  background: var(--bg-section);
  gap: clamp(40px, 8vw, 100px);
}

.smc-text {
  flex: 0 1 480px;
  max-width: 480px;
}

.smc-text h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 24px;
}

.smc-text > p {
  color: var(--text-secondary);
  font-size: var(--text-body);
  line-height: 1.7;
  margin-bottom: 40px;
}

.smc-visual {
  flex: 0 1 420px;
  display: flex;
  justify-content: center;
}

.smc-diagram {
  width: 100%;
  max-width: 420px;
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
}

.smc-diagram-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-tertiary);
  margin-bottom: 28px;
  text-align: center;
}

.smc-path {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.smc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.smc-row.highlight {
  background: rgba(0, 113, 227, 0.09);
  border-color: rgba(0, 113, 227, 0.35);
  color: #ffffff;
}

.smc-label {
  font-weight: 600;
  min-width: 76px;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.smc-arrow { color: var(--text-tertiary); flex-shrink: 0; font-size: 0.8rem; }

.smc-chip {
  margin-top: 18px;
  padding: 18px;
  background: rgba(0, 113, 227, 0.1);
  border: 1px solid rgba(0, 113, 227, 0.28);
  border-radius: 10px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Features Section ── */
.features {
  padding: var(--section-pad-y) var(--section-pad-x);
  max-width: calc(var(--max-width) + var(--section-pad-x) * 2);
  margin: 0 auto;
}

.features-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 72px;
}

.features-header h2 { margin-bottom: 20px; }

.features-header p {
  color: var(--text-secondary);
  font-size: var(--text-body);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 40px 32px;
  transition: transform 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: var(--border-hover);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 28px;
  display: block;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── Smart Context Section ── */
.smart-context-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-pad-y) var(--section-pad-x);
  background: radial-gradient(ellipse 70% 60% at 55% 50%,
              rgba(0, 113, 227, 0.07) 0%, transparent 70%),
              var(--bg-deep);
  text-align: center;
}

.smart-context-inner { max-width: 740px; }

.smart-context-inner h2 {
  font-size: var(--text-h2);
  margin-bottom: 22px;
}

.smart-context-inner > p {
  color: var(--text-secondary);
  font-size: var(--text-body);
  line-height: 1.7;
  margin-bottom: 56px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.smart-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.smart-step {
  flex: 1;
  min-width: 130px;
  max-width: 170px;
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.smart-step:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
}

.smart-step-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}

.smart-step-label {
  font-size: 0.79rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.45;
}

.smart-arrow {
  color: rgba(0, 113, 227, 0.45);
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Comparison Table ── */
.comparison {
  padding: var(--section-pad-y) var(--section-pad-x);
  background: var(--bg-section);
}

.comparison-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
}

.comparison-header {
  text-align: center;
  margin-bottom: 48px;
}

.comparison-header h2 { margin-bottom: 12px; }

.comparison-header p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 14px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border-glass);
}

thead th:first-child { text-align: left; }

tbody td {
  padding: 18px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
}

tbody tr:last-child td { border-bottom: none; }

tbody td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
}

.col-trickle { background: rgba(0, 113, 227, 0.05); }
.col-trickle-header {
  background: rgba(0, 113, 227, 0.08);
  color: #fff !important;
}

.check { color: #34c759; font-weight: 700; }
.cross { color: #ff453a; }

.comparison-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 44px;
}

/* ── How It Works ── */
.how-it-works {
  padding: var(--section-pad-y) var(--section-pad-x);
  max-width: calc(var(--max-width) + var(--section-pad-x) * 2);
  margin: 0 auto;
  text-align: center;
}

.how-it-works-header { margin-bottom: clamp(48px, 8vh, 80px); }
.how-it-works-header h2 { margin-bottom: 12px; }
.how-it-works-header p {
  color: var(--text-secondary);
  font-size: var(--text-body);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  text-align: left;
  margin-bottom: 56px;
}

.step-card {
  padding: 44px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
  transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.step-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
}

.step-number {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 800;
  color: var(--accent-blue);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.68;
}

/* ── FAQ ── */
.faq-section {
  padding: var(--section-pad-y) var(--section-pad-x);
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.faq-section h2 { margin-bottom: clamp(36px, 6vh, 56px); }

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  overflow: hidden;
  backdrop-filter: blur(20px);
  text-align: left;
}

.faq-item {
  padding: 28px 36px;
  border-bottom: 1px solid var(--border-glass);
}

.faq-item:last-child { border-bottom: none; }

.faq-q {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.faq-a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.72;
}

/* ── Scroll Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* ── Footer ── */
footer {
  padding: 56px var(--section-pad-x);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 24px;
  width: auto;
  mix-blend-mode: screen;
  filter: brightness(1.2) contrast(1.6);
  clip-path: circle(48%);
}

.footer-copy {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  transition: color 0.3s var(--ease-out);
}

.footer-links a:hover { color: var(--text-secondary); }

/* ── Legacy glow-spot (kept so advanced/download don't break, visually neutered) ── */
.glow-spot { display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .smc-section {
    flex-direction: column;
    min-height: auto;
    gap: 48px;
    padding-top: clamp(80px, 12vh, 120px);
    padding-bottom: clamp(80px, 12vh, 120px);
  }

  .smc-text { max-width: 100%; }

  .smart-steps { gap: 10px; }

  .smart-step {
    min-width: 110px;
    max-width: 140px;
    padding: 22px 16px;
  }

  .comparison-inner {
    padding: 36px 24px;
  }

  table { font-size: 0.82rem; }
  thead th, tbody td { padding: 14px 12px; }
}

@media (max-width: 600px) {
  nav { padding: 0 20px; }

  .hero-actions-row {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-actions-row .btn-lg {
    width: 100%;
    max-width: 320px;
  }

  .trust-strip {
    gap: 8px;
    padding: 16px 20px;
  }

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

  .comparison-ctas { flex-direction: column; align-items: center; }

  .faq-item { padding: 24px 24px; }

  .nav-links .btn-link { display: none; }
}
