/* ==========================================================================
   THE TIDY APPS CORE DESIGN SYSTEM
   Modern, Empathetic, Ultra-Performant Stylesheet for:
   thetidyway.com | tidylife.me | thetidy.me
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand Palette */
  --primary: #0d9488;         /* Calming Sage / Teal */
  --primary-light: #ccfbf1;
  --primary-dark: #0f766e;
  --primary-glow: rgba(13, 148, 136, 0.2);

  --secondary: #4f46e5;       /* Intuitive Indigo */
  --secondary-light: #e0e7ff;
  --secondary-dark: #3730a3;

  --accent: #f59e0b;          /* Warm Sun Amber */
  --accent-light: #fef3c7;
  --accent-dark: #b45309;

  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  /* Neutrals & Surfaces */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #0d9488;

  /* App Module Brand Accents */
  --color-life: #4f46e5;     /* TidyLife: Cognitive Indigo */
  --color-nest: #0d9488;     /* TidyNest / Legacy: Household Teal */
  --color-family: #f97316;   /* TidyFamily: Household Coral */
  --color-kid: #10b981;      /* TidyKid: Kinetic Emerald */
  --color-cash: #059669;     /* TidyCash: Growth Emerald */
  --color-wealth: #b45309;   /* TidyWealth: Classic Gold & Navy */
  --color-cook: #ea580c;     /* TidyChef: Warm Apricot / Orange */
  --color-health: #0d9488;   /* TidyHealth: Vital Sage / Cyan */

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Geometry & Shadows */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.10), 0 4px 8px -2px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 24px rgba(13, 148, 136, 0.25);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Global Top Navigation */
.tidy-nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: all var(--transition-base);
}

.tidy-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.tidy-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.tidy-brand .brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tidy-nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.tidy-nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-body);
  transition: color var(--transition-fast);
}

.tidy-nav-link:hover {
  color: var(--primary);
}

.tidy-nav-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Cross-domain Ecosystem Switcher Bar */
.ecosystem-bar {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  padding: 0.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ecosystem-bar .sites-list {
  display: flex;
  gap: 1.25rem;
}

.ecosystem-bar a {
  color: var(--text-muted);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.ecosystem-bar a:hover,
.ecosystem-bar a.active {
  color: var(--primary);
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background-color: var(--surface-subtle);
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.825rem;
}

/* Hero Sections */
.hero-section {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.25rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin: 3.5rem 0;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* App Module Badge Tags */
.module-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.module-badge.life { background: #e0e7ff; color: #4338ca; }
.module-badge.nest { background: #ccfbf1; color: #0f766e; }
.module-badge.cash { background: #d1fae5; color: #065f46; }
.module-badge.cook { background: #ffedd5; color: #c2410c; }
.module-badge.health { background: #ffe4e6; color: #be123c; }

/* Interactive Experience Containers */
.interactive-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin: 2.5rem 0;
}

.interactive-header {
  text-align: center;
  margin-bottom: 2rem;
}

.interactive-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.interactive-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Pricing Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all var(--transition-base);
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg), 0 0 20px var(--primary-glow);
  transform: scale(1.02);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  margin: 1.5rem 0 0.5rem;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-body);
}

.pricing-features li .check {
  color: var(--primary);
  font-weight: 800;
}

/* Footer */
.tidy-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .tidy-nav-links {
    display: none;
  }
  .pricing-card.featured {
    transform: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
