/* ============================================
   Rescipe Landing Page — Light Theme
   Clean, minimal, eco-friendly
   ============================================ */

:root {
  /* Fond & surfaces */
  --bg:           #F7F9F5;
  --surface:      #FFFFFF;
  --surface-alt:  #EEF3EC;

  /* Texte */
  --text:         #1A1A1A;
  --subtext:      #5A6B5E;

  /* Accents */
  --green:        #2D7D46;
  --green-hover:  #246B3A;
  --green-light:  #E8F5EC;
  --orange:       #E8A020;
  --orange-light: #FEF6E7;

  /* Bordures & ombres */
  --border:       #D8E4D8;
  --shadow:       rgba(0, 0, 0, 0.06);

  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1100px;
}

/* --- Reset --- */

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

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

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  position: relative;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover { color: var(--green-hover); }

/* --- Utility --- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.warm { color: var(--orange); }

/* --- Typography --- */

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

/* --- Nav --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: transparent;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 0;
  box-shadow: 0 1px 8px var(--shadow);
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}
.logo:hover { color: var(--green); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #FFFFFF;
  background: var(--green);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-cta:hover {
  background: var(--green-hover);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(45, 125, 70, 0.2);
}

/* --- Hero --- */

.hero {
  position: relative;
  padding: 160px 24px 100px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background-color: var(--bg);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 580px;
  text-align: center;
}

/* Staggered hero entrance */
.hero-text > * {
  opacity: 0;
  transform: translateY(24px);
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-text > *:nth-child(1) { animation-delay: 0.1s; }
.hero-text > *:nth-child(2) { animation-delay: 0.25s; }
.hero-text > *:nth-child(3) { animation-delay: 0.45s; }
.hero-text > *:nth-child(4) { animation-delay: 0.6s; }

.hero-visual {
  flex-shrink: 0;
  position: relative;
  opacity: 0;
  transform: translateY(32px) scale(0.97);
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--subtext);
  margin-top: 24px;
  line-height: 1.75;
  font-weight: 400;
}

.hero-cta {
  margin-top: 40px;
}

.social-proof {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--orange);
  opacity: 0.9;
  letter-spacing: 0.01em;
  font-weight: 500;
}

/* --- Screenshot wrapper (smartphone look) --- */

.screenshot-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
}

.screenshot-wrapper img {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 36px;
}

/* Hero: slight rotation */
.screenshot-hero .screenshot-wrapper {
  transform: rotate(2deg);
}

/* --- Section: Problème --- */

.problem {
  padding: 5rem 24px;
  position: relative;
  background-color: var(--surface-alt);
}

.problem-text {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.2rem;
  line-height: 2;
  color: var(--subtext);
}

.problem-text p {
  margin-bottom: 8px;
}

.problem-text strong {
  color: var(--text);
  font-weight: 500;
}

.problem-punchline {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--green);
  margin-top: 40px;
  position: relative;
  display: inline-block;
}

.problem-punchline::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  border-radius: 2px;
  opacity: 0.4;
}

.problem-stat {
  text-align: center;
  margin-top: 56px;
  font-size: 1rem;
  color: var(--subtext);
  font-style: italic;
  letter-spacing: 0.01em;
}

.problem-stat strong {
  font-style: normal;
  font-weight: 700;
  font-size: 1.3rem;
}

/* --- Section: Features --- */

.features {
  padding: 5rem 24px;
  background-color: var(--bg);
}

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

.feature-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 36px 28px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px var(--shadow);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--green-light);
  border-radius: 14px;
}

.feature-card h3 {
  color: var(--text);
}

.feature-card p {
  color: var(--subtext);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* Orange icon variant for middle card */
.feature-card:nth-child(2) .feature-icon {
  background: var(--orange-light);
}

/* --- Section: Showcase (2e screenshot) --- */

.showcase {
  padding: 5rem 24px;
  text-align: center;
  position: relative;
  background-color: var(--surface-alt);
}

.showcase-visual {
  display: inline-block;
  position: relative;
}

.showcase-visual .screenshot-wrapper {
  margin: 0 auto;
}

.showcase-caption {
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--subtext);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 500;
}

/* --- Section: CTA Final --- */

.cta-final {
  padding: 5rem 24px;
  text-align: center;
  position: relative;
  background-color: var(--green);
}

.cta-text {
  max-width: 540px;
  margin: 0 auto 40px;
  font-size: 1.15rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
}

.cta-text strong {
  color: #FFFFFF;
  font-weight: 600;
}

.cta-form {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* --- Footer --- */

.footer {
  padding: 48px 24px;
  background-color: #1A1A1A;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: #FFFFFF;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  letter-spacing: 0.02em;
}
.footer-links a:hover {
  opacity: 1;
  color: #FFFFFF;
}

.footer-tagline {
  font-size: 0.78rem;
  color: #8BA897;
  opacity: 0.6;
  letter-spacing: 0.02em;
}

/* --- Tally Embed --- */

.tally-embed {
  max-width: 480px;
  margin: 0 auto;
}

.tally-embed iframe {
  border: none;
  width: 100%;
}

.tally-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px var(--shadow);
  padding: 2rem;
}

/* Tally wrapper inside green CTA section */
.cta-final .tally-wrapper {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* --- Scroll reveal animations --- */

.animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger feature cards when they appear */
.feature-card.animate:nth-child(1) { transition-delay: 0s; }
.feature-card.animate:nth-child(2) { transition-delay: 0.12s; }
.feature-card.animate:nth-child(3) { transition-delay: 0.24s; }

/* --- Responsive: Mobile fixes --- */

@media (max-width: 767px) {
  .screenshot-hero .screenshot-wrapper {
    transform: none;
    margin: 2rem auto 0;
  }

  .showcase-visual .screenshot-wrapper img {
    max-width: 240px;
  }
}

/* --- Responsive: Tablet (768px+) --- */

@media (min-width: 768px) {
  .hero {
    padding: 180px 24px 120px;
  }

  .hero-inner {
    flex-direction: row;
    gap: 64px;
  }

  .hero-text {
    text-align: left;
    flex: 1;
  }

  .screenshot-wrapper img {
    max-width: 280px;
  }

  .features {
    padding: 6rem 24px;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .feature-card {
    text-align: left;
  }

  .feature-icon {
    margin: 0 0 20px;
  }

  .problem {
    padding: 6rem 24px;
  }
}

/* --- Responsive: Desktop (1024px+) --- */

@media (min-width: 1024px) {
  .hero {
    padding: 200px 24px 140px;
  }

  .hero-inner {
    gap: 100px;
  }

  .screenshot-wrapper img {
    max-width: 320px;
  }

  .features-grid {
    gap: 28px;
  }

  .feature-card {
    padding: 40px 32px 36px;
  }

  .cta-final {
    padding: 6rem 24px;
  }
}

/* --- Reduce motion for accessibility --- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
