/* CookRedo Design System Tokens: Dark Mode (Default / [data-theme="dark"] / .dark) */
:root,
[data-theme='dark'],
body.dark {
  /* 60% Dominant Base Canvas */
  --bg-canvas: #0d0f14;

  /* 30% Elevated Surfaces */
  --surface-card: #161a22;
  --surface-card-hover: #1f2430;
  --surface-card-raised: #1c212c;
  --surface-glass: rgba(22, 26, 34, 0.75);

  /* Typography Colors */
  --text-main: #ffffff;
  --text-white: #ffffff;
  --text-muted: #8e98a8;
  --text-subtle: #5b6577;

  /* 10% Brand & Semantic Accents */
  --brand-flame: #ff5a36;
  --brand-text-accent: #ff5a36;
  --brand-flame-glow: rgba(255, 90, 54, 0.35);
  --brand-amber: #ff8a00;
  --brand-amber-glow: rgba(255, 138, 0, 0.35);
  --brand-violet: #8b5cf6;
  --brand-emerald: #10b981;

  /* Borders & Shadows */
  --border-card: rgba(255, 255, 255, 0.08);
  --border-copilot: rgba(255, 138, 0, 0.35);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.7);

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  /* Header & Brand Tokens */
  --header-bg: rgba(13, 15, 20, 0.88);
  --hdr-title-color: transparent;
  --hdr-title-bg: linear-gradient(180deg, #ffffff 0%, #cfd6e4 100%);
  --hdr-redo-bg: linear-gradient(180deg, #ff8c00 0%, #ff4500 100%);
  --hdr-btn-shadow: none;

  color-scheme: dark;
}

/* CookRedo Design System Tokens: Light Mode ([data-theme="light"] / body.light) */
[data-theme='light'],
body.light {
  /* 60% Dominant Base Canvas */
  --bg-canvas: #f8f9fa;

  /* 30% Elevated Surfaces */
  --surface-card: #ffffff;
  --surface-card-hover: #f1f4f9;
  --surface-card-raised: #f8fafc;
  --surface-glass: rgba(255, 255, 255, 0.85);

  /* Typography Colors */
  --text-main: #0f172a;
  --text-white: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* 10% Brand & Semantic Accents */
  --brand-flame: #ff5a36;
  --brand-text-accent: #b82d10;
  --brand-flame-glow: rgba(255, 90, 54, 0.25);
  --brand-amber: #d97706;
  --brand-amber-glow: rgba(217, 119, 6, 0.25);
  --brand-violet: #7c3aed;
  --brand-emerald: #059669;

  /* Borders & Shadows */
  --border-card: rgba(15, 23, 42, 0.07);
  --border-copilot: rgba(255, 138, 0, 0.3);
  --shadow-soft:
    0 10px 30px -4px rgba(15, 23, 42, 0.06),
    0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover:
    0 16px 36px -4px rgba(15, 23, 42, 0.1),
    0 6px 16px -2px rgba(15, 23, 42, 0.05);

  /* Header & Brand Tokens */
  --header-bg: rgba(248, 249, 250, 0.9);
  --hdr-title-color: #0f172a;
  --hdr-title-bg: none;
  --hdr-redo-bg: linear-gradient(180deg, #ff7a00 0%, #ff3d00 100%);
  --hdr-btn-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);

  color-scheme: light;
}

/* System Light Mode preference (when not forced to dark) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']):not(.dark) {
    --bg-canvas: #f8f9fa;
    --surface-card: #ffffff;
    --surface-card-hover: #f1f4f9;
    --surface-card-raised: #f8fafc;
    --surface-glass: rgba(255, 255, 255, 0.85);
    --text-main: #0f172a;
    --text-white: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --brand-flame: #ff5a36;
    --brand-text-accent: #b82d10;
    --brand-flame-glow: rgba(255, 90, 54, 0.25);
    --brand-amber: #d97706;
    --brand-amber-glow: rgba(217, 119, 6, 0.25);
    --brand-violet: #7c3aed;
    --brand-emerald: #059669;
    --border-card: rgba(15, 23, 42, 0.07);
    --border-copilot: rgba(255, 138, 0, 0.3);
    --shadow-soft:
      0 10px 30px -4px rgba(15, 23, 42, 0.06),
      0 4px 12px -2px rgba(15, 23, 42, 0.03);
    --shadow-hover:
      0 16px 36px -4px rgba(15, 23, 42, 0.1),
      0 6px 16px -2px rgba(15, 23, 42, 0.05);
    --header-bg: rgba(248, 249, 250, 0.9);
    --hdr-title-color: #0f172a;
    --hdr-title-bg: none;
    --hdr-redo-bg: linear-gradient(180deg, #ff7a00 0%, #ff3d00 100%);
    --hdr-btn-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);

    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   1. Sticky Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-card);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 1.25rem;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  user-select: none;
  border-radius: var(--radius-sm);
}

.brand-mark:focus-visible {
  outline: 2px solid var(--brand-flame);
  outline-offset: 4px;
}

.brand-fire-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 4px 16px var(--brand-flame-glow);
  flex-shrink: 0;
}

.brand-title {
  font-family:
    'Cabinet Grotesk',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--hdr-title-color);
  background: var(--hdr-title-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--hdr-title-color);
  background-clip: text;
}

.brand-title span {
  background: var(--hdr-redo-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--hdr-btn-shadow);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--surface-card-hover);
  border-color: var(--brand-flame);
  transform: translateY(-1px);
}

.theme-toggle-btn:active {
  transform: scale(0.96);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--brand-flame);
  outline-offset: 2px;
}

.theme-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
  transform: rotate(18deg);
}

/* Show sun icon in dark mode (to switch to light), moon icon in light mode (to switch to dark) */
.theme-icon-moon {
  display: none;
}

[data-theme='light'] .theme-icon-sun,
body.light .theme-icon-sun {
  display: none;
}

[data-theme='light'] .theme-icon-moon,
body.light .theme-icon-moon {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']):not(.dark) .theme-icon-sun {
    display: none;
  }

  :root:not([data-theme='dark']):not(.dark) .theme-icon-moon {
    display: block;
  }
}

/* ==========================================================================
   2. Hero Section
   ========================================================================== */
.hero-section {
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 780px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 90, 54, 0.35);
  background: linear-gradient(
    135deg,
    rgba(255, 90, 54, 0.16),
    rgba(255, 138, 0, 0.14)
  );
  color: var(--brand-text-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand-flame);
  box-shadow: 0 0 8px var(--brand-flame);
}

.hero-title {
  font-family:
    'Cabinet Grotesk',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: clamp(2.15rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 1.25rem;
  color: var(--text-main);
}

.hero-description {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #cc3514 0%, #a8240a 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px var(--brand-flame-glow);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px var(--brand-flame-glow);
}

.hero-cta:active {
  transform: scale(0.98);
}

.hero-cta:focus-visible {
  outline: 2px solid var(--brand-flame);
  outline-offset: 4px;
}

.hero-cta-icon {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   3. Section Headers
   ========================================================================== */
.section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.section-kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-text-accent);
  margin-bottom: 0.4rem;
}

.section-title {
  font-family:
    'Cabinet Grotesk',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  color: var(--text-main);
}

/* ==========================================================================
   4. Workflow Section
   ========================================================================== */
.workflow-section {
  padding: 2.5rem 0 3rem;
  scroll-margin-top: 72px;
}

.workflow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

.workflow-step {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.2s ease;
}

.step-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #cc3514 0%, #a8240a 100%);
  color: #ffffff;
  font-family:
    'Cabinet Grotesk',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--brand-flame-glow);
}

.step-body {
  min-width: 0;
}

.step-title {
  font-family:
    'Cabinet Grotesk',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 0.3rem;
  color: var(--text-main);
}

.step-description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ==========================================================================
   5. Feature Cards Section
   ========================================================================== */
.features-section {
  padding: 2.5rem 0 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--surface-card-hover);
  }
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-flame-glow);
  color: var(--brand-flame);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.feature-title {
  font-family:
    'Cabinet Grotesk',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--text-main);
}

.feature-description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ==========================================================================
   6. Coming Soon Section
   ========================================================================== */
.coming-soon-section {
  padding: 1.5rem 0 3.5rem;
}

.coming-soon-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 2rem 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.coming-soon-title {
  font-family:
    'Cabinet Grotesk',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: var(--text-main);
}

.coming-soon-text {
  margin: 0 auto 0.75rem;
  max-width: 600px;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.coming-soon-contact {
  margin: 1.25rem auto 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-card);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.coming-soon-contact a,
.footer-meta a {
  color: var(--brand-text-accent);
  font-weight: 600;
  text-decoration: none;
}

.coming-soon-contact a:hover,
.footer-meta a:hover {
  text-decoration: underline;
}

.coming-soon-contact a:focus-visible,
.footer-meta a:focus-visible {
  outline: 2px solid var(--brand-flame);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-card);
  padding: 1.75rem 0;
  background: var(--bg-canvas);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-badge {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.footer-brand-title {
  font-size: 18px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-divider {
  color: var(--text-subtle);
}

/* ==========================================================================
   8. Responsive Breakpoints (Tablet >= 640px, Desktop >= 1024px)
   ========================================================================== */
@media (min-width: 640px) {
  .container,
  .header-inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .hero-section {
    padding: 4.5rem 0 3.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .workflow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .coming-soon-card {
    padding: 2.35rem 2.25rem;
  }

  .footer-inner {
    flex-direction: row;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .container,
  .header-inner {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .hero-section {
    padding: 5.5rem 0 4rem;
  }

  .workflow-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }

  .workflow-step {
    flex-direction: column;
    padding: 1.35rem 1.15rem;
    gap: 0.875rem;
  }

  .features-grid {
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.75rem;
  }

  .coming-soon-card {
    padding: 2.75rem 2.75rem;
  }
}

/* ==========================================================================
   9. Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
