/* ─────────────────────────────────────────────
   MyHousehold — Apple-inspired Landing Page v4
   Dual-theme · Scroll animations · Responsive
   ───────────────────────────────────────────── */

/* ═══════════════ THEME TOKENS ═══════════════ */

:root, [data-theme="dark"] {
  --bg:              #000000;
  --bg-alt:          #0a0a0a;
  --bg-nav:          rgba(0,0,0,0.72);
  --bg-card:         rgba(255,255,255,0.04);
  --bg-card-hover:   rgba(255,255,255,0.08);
  --text:            #f5f5f7;
  --text-secondary:  #a1a1a6;
  --text-tertiary:   #6e6e73;
  --accent:          #6366f1;
  --accent-hover:    #818cf8;
  --accent-subtle:   rgba(99,102,241,0.15);
  --accent-border:   rgba(99,102,241,0.25);
  --btn-text:        #fff;
  --green:           #30d158;
  --green-subtle:    rgba(48,209,88,0.12);
  --green-border:    rgba(48,209,88,0.3);
  --amber:           #ffd60a;
  --amber-subtle:    rgba(255,214,10,0.12);
  --amber-border:    rgba(255,214,10,0.3);
  --border:          rgba(255,255,255,0.08);
  --border-strong:   rgba(255,255,255,0.14);
  --card-shadow:     0 0 0 0 transparent;
  --gradient-1:      #6366f1;
  --gradient-2:      #a855f7;
  --gradient-3:      #ec4899;
  --featured-bg:     rgba(99,102,241,0.06);
  --featured-border: rgba(99,102,241,0.2);
  --max-w:           1120px;
  --highlight-bg:    rgba(255,255,255,0.02);
}

[data-theme="light"] {
  --bg:              #ffffff;
  --bg-alt:          #f9f9fb;
  --bg-nav:          rgba(255,255,255,0.72);
  --bg-card:         #ffffff;
  --bg-card-hover:   #f5f5f7;
  --text:            #1d1d1f;
  --text-secondary:  #6e6e73;
  --text-tertiary:   #86868b;
  --accent:          #5856d6;
  --accent-hover:    #6e6ce3;
  --accent-subtle:   rgba(88,86,214,0.08);
  --accent-border:   rgba(88,86,214,0.2);
  --btn-text:        #ffffff;
  --green:           #28a745;
  --green-subtle:    rgba(40,167,69,0.08);
  --green-border:    rgba(40,167,69,0.2);
  --amber:           #bf8600;
  --amber-subtle:    rgba(191,134,0,0.08);
  --amber-border:    rgba(191,134,0,0.2);
  --border:          rgba(0,0,0,0.06);
  --border-strong:   rgba(0,0,0,0.12);
  --card-shadow:     0 2px 12px rgba(0,0,0,0.06);
  --gradient-1:      #5856d6;
  --gradient-2:      #9333ea;
  --gradient-3:      #db2777;
  --featured-bg:     rgba(88,86,214,0.04);
  --featured-border: rgba(88,86,214,0.15);
  --highlight-bg:    rgba(0,0,0,0.015);
}

/* ═══════════════ BASE ═══════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }

/* ═══════════════ ANIMATIONS ═══════════════ */

.anim {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.anim[data-anim="fade-up"]    { transform: translateY(40px); }
.anim[data-anim="fade-right"] { transform: translateX(-40px); }
.anim[data-anim="fade-left"]  { transform: translateX(40px); }
.anim.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

/* ═══════════════ NAV ═══════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: var(--bg-nav);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.nav-icon { flex-shrink: 0; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta,
.nav-cta-dash {
  font-weight: 600 !important;
}
.nav-cta {
  color: var(--accent) !important;
}
.nav-cta:hover { color: var(--accent-hover) !important; }
.nav-cta-dash {
  color: var(--green) !important;
}
.nav-cta-dash:hover { opacity: 0.8; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
[data-theme="dark"] .theme-icon-sun  { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun  { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* ═══════════════ HERO ═══════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-subtle) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Floating orbs behind hero */
.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
}
.orb-1 {
  width: 400px; height: 400px;
  background: var(--gradient-1);
  top: -10%; left: -5%;
  animation: orbFloat1 12s ease-in-out infinite;
}
.orb-2 {
  width: 300px; height: 300px;
  background: var(--gradient-2);
  top: 20%; right: -8%;
  animation: orbFloat2 15s ease-in-out infinite;
}
.orb-3 {
  width: 250px; height: 250px;
  background: var(--gradient-3);
  bottom: 5%; left: 20%;
  animation: orbFloat3 18s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(40px, 30px); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-30px, 40px); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(50px, -20px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(48px, 7.5vw, 96px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.hero-gradient {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.65;
  font-weight: 400;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}
.hero-stat strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero-stat span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.hero-stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border-strong);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-tertiary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ═══════════════ BUTTONS ═══════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.25s cubic-bezier(0.25,0.46,0.45,0.94);
  cursor: pointer;
  border: none;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--btn-text);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}
.btn-ghost:hover {
  color: var(--accent-hover);
}
.btn-arrow {
  transition: transform 0.2s;
  display: inline-block;
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}
.btn-lg {
  padding: 18px 38px;
  font-size: 17px;
}
.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════ PILLS ═══════════════ */

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-live {
  background: var(--green-subtle);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.pill-soon {
  background: var(--amber-subtle);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

/* ═══════════════ SHOWCASE HEADLINE ═══════════════ */

.showcase {
  padding: 140px 24px 80px;
  text-align: center;
}
.showcase-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.showcase-title {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}
.showcase-sub {
  font-size: clamp(16px, 2vw, 21px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* ═══════════════ HIGHLIGHT CARDS ═══════════════ */

.highlights-section {
  padding: 0 24px 100px;
}
.highlights-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.highlight-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--highlight-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 56px 48px;
  transition: all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  overflow: hidden;
}
.highlight-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -20px rgba(99,102,241,0.12);
}
.highlight-text .pill {
  margin-bottom: 14px;
}
.highlight-text h3 {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.highlight-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 440px;
  margin-bottom: 20px;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
}
.link-arrow:hover {
  gap: 8px;
  color: var(--accent-hover);
}
.link-arrow span {
  font-size: 18px;
}

/* Floating icon grid inside highlight cards */
.float-grid {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 280px;
  margin: 0 auto;
}
.float-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 22px;
  font-size: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.fi-1 { top: 8%; left: 10%; animation: floatA 6s ease-in-out infinite; }
.fi-2 { top: 5%; right: 10%; animation: floatB 7s ease-in-out infinite; }
.fi-3 { bottom: 15%; left: 5%; animation: floatC 8s ease-in-out infinite; }
.fi-4 { bottom: 10%; right: 12%; animation: floatD 6.5s ease-in-out infinite; }

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(6px, -8px) rotate(3deg); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(-8px, 6px) rotate(-3deg); }
}
@keyframes floatC {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(10px, 4px) rotate(2deg); }
}
@keyframes floatD {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(-6px, -10px) rotate(-2deg); }
}

/* ═══════════════ FEATURE TILES ═══════════════ */

.features-section {
  padding: 100px 24px;
  background: var(--bg-alt);
  transition: background 0.4s;
}
.features-header {
  max-width: var(--max-w);
  margin: 0 auto 56px;
  text-align: center;
}
.features-header h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.04em;
}
.features-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 22px;
  transition: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow: var(--card-shadow);
}
.feature-tile:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}
.feature-tile-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.feature-tile .pill {
  margin-bottom: 12px;
}
.feature-tile h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.feature-tile p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ═══════════════ PLATFORM ═══════════════ */

.platform-section {
  padding: 140px 24px;
  text-align: center;
}
.platform-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.platform-title {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.platform-sub {
  font-size: clamp(16px, 2vw, 21px);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 64px;
}
.platform-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
}
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px;
  transition: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow: var(--card-shadow);
}
.platform-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
}
.platform-card-featured {
  background: var(--featured-bg);
  border-color: var(--featured-border);
}
.platform-card-featured:hover {
  border-color: var(--accent);
}
.platform-card-glyph {
  font-size: 48px;
  margin-bottom: 20px;
}
.platform-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.platform-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ═══════════════ TECH SECTION ═══════════════ */

.tech-section {
  padding: 100px 24px;
  text-align: center;
  background: var(--bg-alt);
  transition: background 0.4s;
}
.tech-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.tech-section h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.25s;
}
.tech-pill:hover {
  border-color: var(--accent-border);
  color: var(--text);
  background: var(--accent-subtle);
}

/* ═══════════════ CTA ═══════════════ */

.cta-section {
  padding: 160px 24px;
  text-align: center;
}
.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}
.cta-section h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.cta-section p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
}

/* ═══════════════ FOOTER ═══════════════ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.8;
}
.footer-products strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 1024px) {
  .features-inner {
    grid-template-columns: repeat(3, 1fr);
  }
  .highlight-card {
    padding: 40px 32px;
  }
}

@media (max-width: 768px) {
  .nav-inner { height: 44px; }
  .nav-links a:not(.nav-cta):not(.nav-cta-dash):not(.theme-toggle) {
    display: none;
  }
  .nav-links { gap: 14px; }
  .features-inner {
    grid-template-columns: repeat(2, 1fr);
  }
  .highlight-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 28px;
  }
  .highlight-text h3 {
    font-size: 28px;
  }
  .float-grid {
    max-width: 200px;
  }
  .float-item {
    width: 60px; height: 60px;
    font-size: 28px;
    border-radius: 16px;
  }
  .platform-cards {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-stats {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-stat {
    padding: 0 16px;
  }
  .hero-stat-sep {
    height: 24px;
  }
}

@media (max-width: 480px) {
  .features-inner {
    grid-template-columns: 1fr;
  }
  .hero { padding: 100px 20px 60px; }
  .showcase { padding: 100px 20px 60px; }
  .highlights-section { padding: 0 16px 80px; }
  .features-section { padding: 80px 16px; }
  .platform-section { padding: 100px 16px; }
  .tech-section { padding: 80px 16px; }
  .cta-section { padding: 100px 16px; }
  .footer-top { flex-direction: column; gap: 16px; }
  .footer-nav { justify-content: center; }
  .highlight-card {
    padding: 28px 20px;
  }
  .hero-stat {
    padding: 0 12px;
  }
  .hero-stat strong {
    font-size: 24px;
  }
  .hero-badge {
    font-size: 12px;
    padding: 5px 12px;
  }
}
