/* ==========================================================================
   ATM Business Québec — Évergreen ebook sales page
   Scaffold pass 1: structure + brand colors. Typography is a placeholder
   system stack until real brand fonts are chosen.
   ========================================================================== */

:root {
  --forest: #132c1b;
  --cream: #fffdf7;
  --sage: #3e4d3d;
  --sweep-grey: #d8d8d3;

  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Josefin Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container-width: 1100px;
  --container-width-narrow: 760px;

  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--forest);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  text-align: center;
}

p {
  margin: 0 0 1em;
}

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

.container--narrow {
  max-width: var(--container-width-narrow);
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  isolation: isolate;
  z-index: 0;
  overflow: hidden;
  display: inline-block;
  padding: 16px 32px;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 300;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  --wave: var(--sweep-grey);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--wave);
  clip-path: circle(0% at 0% 100%);
  opacity: 1;
  animation: btn-wave 5.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-wave {
  0% { clip-path: circle(0% at 0% 100%); opacity: 1; }
  7% { clip-path: circle(145% at 0% 100%); opacity: 1; }
  9% { clip-path: circle(145% at 0% 100%); opacity: 1; }
  14% { clip-path: circle(145% at 0% 100%); opacity: 0; }
  100% { clip-path: circle(0% at 0% 100%); opacity: 0; }
}

.btn:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 14px 34px rgba(19, 44, 27, 0.32);
}

.btn:active {
  transform: translateY(-1px) scale(0.995);
}

.btn--primary {
  background: var(--sage);
  color: var(--cream);
}

.btn--large {
  padding: 18px 40px;
  font-size: 1.0375rem;
}

/* Master CTA (pricing section, opens checkout): bigger still, to stand apart
   from the other CTAs that just scroll to this section. */
.js-open-checkout {
  font-size: 1.2875rem;
}

/* ---------- Countdown banner ---------- */

.countdown-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sage);
  color: var(--cream);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-bottom: 2px solid rgba(255, 253, 247, 0.85);
}

.countdown-banner__text {
  margin: 0;
}

.countdown-banner__clock {
  display: none;
}

.countdown-banner__timer {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-left: 6px;
}

.countdown-banner__num-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.countdown-banner__num-inline span:first-child {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.countdown-banner__unit {
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 767px) {
  .countdown-banner__timer {
    display: none;
  }

  .countdown-banner__clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
  }

  .countdown-banner__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
  }

  .countdown-banner__num {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .countdown-banner__label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.8;
    margin-top: 2px;
  }

  .countdown-banner__colon {
    font-size: 1.1rem;
    font-weight: 700;
    align-self: center;
    margin-bottom: 12px;
  }
}

/* ---------- Header ---------- */

.site-header {
  padding: 20px 0;
  text-align: center;
}

.site-header__logo img {
  height: 58px;
  width: 58px;
  margin: 0 auto;
  border-radius: 50%;
}

/* ---------- Hero ---------- */

.hero {
  padding: 40px 0 60px;
}

@media (max-width: 767px) {
  .hero {
    padding-top: 20px;
  }
}

.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
  text-align: center;
  justify-items: center;
}

@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr 1.05fr;
  }
}

.hero__title {
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.5px;
}

.hero__emphasis {
  font-weight: 600;
}

.hero__subtitle {
  font-size: 0.95rem;
  color: var(--sage);
  font-family: var(--font-body);
  font-weight: 300;
  margin-bottom: 1.6em;
}

.hero__media {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero__video-frame {
  display: flex;
  width: 100%;
  max-width: 320px;
  border-radius: 24px;
  background: rgba(19, 44, 27, 0.03);
  border: 1px solid rgba(19, 44, 27, 0.12);
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 20px 45px rgba(19, 44, 27, 0.18);
}

.hero__video-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 181.38%;
  border-radius: 16px;
  overflow: hidden;
}

.hero__video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Le problème ---------- */

.problem {
  padding: 50px 0;
  background: var(--sage);
  color: var(--cream);
  text-align: center;
}

.problem h2 {
  color: var(--cream);
}

.problem__lede {
  font-weight: 300;
}

.problem__resolve {
  font-weight: 700;
  font-size: 1.15rem;
}

/* ---------- 8 chapitres ---------- */

.chapters {
  padding: 60px 0;
}

/* ---------- CTA band (repeated scroll-to-pricing prompts) ---------- */

.cta-band {
  padding: 24px 0;
  display: flex;
  justify-content: center;
}

/* First one (after the 8 chapters, before Pourquoi Dieuvy): more room
   below the button than above it, leading into the green section. */
.cta-band:first-of-type {
  padding-bottom: 60px;
}

.chapters__list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

@media (min-width: 700px) {
  .chapters__list {
    grid-template-columns: 1fr 1fr;
  }
}

.chapters__list li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: rgba(62, 77, 61, 0.07);
  border: none;
  border-radius: 20px;
}

/* Staggered scroll-reveal: the "will-animate" class is only added by JS,
   so the cards stay visible by default with no JS / reduced motion. */
.chapters__list.will-animate li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.chapters__list.will-animate li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chapters__list.will-animate li:nth-child(1) { transition-delay: 0ms; }
.chapters__list.will-animate li:nth-child(2) { transition-delay: 80ms; }
.chapters__list.will-animate li:nth-child(3) { transition-delay: 160ms; }
.chapters__list.will-animate li:nth-child(4) { transition-delay: 240ms; }
.chapters__list.will-animate li:nth-child(5) { transition-delay: 320ms; }
.chapters__list.will-animate li:nth-child(6) { transition-delay: 400ms; }
.chapters__list.will-animate li:nth-child(7) { transition-delay: 480ms; }
.chapters__list.will-animate li:nth-child(8) { transition-delay: 560ms; }

.chapters__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chapters__number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sage);
  flex-shrink: 0;
  font-family: var(--font-body);
}

.chapters__list h3 {
  font-size: 1.15rem;
  color: var(--sage);
  margin: 0;
}

.chapters__list p {
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--font-display);
  font-weight: 300;
}

/* ---------- Pourquoi Dieuvy ---------- */

.founder {
  padding: 60px 0;
  background: var(--forest);
  color: var(--cream);
}

.founder-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 700px) {
  .founder-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .founder-photo-frame {
    max-width: 320px;
    margin: 0 auto;
  }
}

.founder-photo-frame {
  display: flex;
  width: 100%;
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.04);
  border: 1px solid rgba(255, 253, 247, 0.15);
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.founder-photo {
  width: 100%;
  display: flex;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4.1;
}

.founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}

.founder-eyebrow {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.75;
  margin-bottom: 14px;
  display: block;
}

.founder-content h2 {
  color: var(--cream);
  font-weight: 400;
  text-align: left;
  margin-bottom: 18px;
}

.founder-content h2 strong {
  font-weight: 700;
}

.founder-content p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--cream);
  opacity: 0.9;
  font-weight: 300;
  margin-bottom: 14px;
}

.founder-content p:last-child {
  margin-bottom: 0;
}

.founder-quote {
  background: rgba(19, 44, 27, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(103, 103, 103, 0.6);
  box-shadow:
    inset 0 0 0 1px rgba(140, 140, 140, 0.7),
    inset 0 0 32px 5px rgba(140, 140, 140, 0.6),
    0 8px 30px rgba(0, 0, 0, 0.35);
  border-radius: 18px;
  padding: 32px 36px;
  margin-top: 10px;
}

.founder-quote p {
  font-weight: 300;
  margin-bottom: 12px;
}

.founder-quote p:last-child {
  margin-bottom: 0;
}

/* ---------- À qui est destiné ---------- */

.audience {
  padding: 60px 0;
}

.audience__grid {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

@media (min-width: 700px) {
  .audience__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.audience__card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 22px;
  border-radius: 20px;
  background: #1f3317;
  border: 3px solid #4caf50;
  color: var(--cream);
  text-align: left;
}

.audience__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: cost-shine 5s ease-in-out infinite;
  animation-delay: var(--shine-delay, 0s);
  pointer-events: none;
  z-index: 2;
}

.audience__card:nth-child(1) { --shine-delay: 0s; }
.audience__card:nth-child(2) { --shine-delay: 1.25s; }
.audience__card:nth-child(3) { --shine-delay: 2.5s; }
.audience__card:nth-child(4) { --shine-delay: 3.75s; }

.audience__icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 253, 247, 0.16);
  color: #4caf50;
}

.audience__icon svg {
  width: 16px;
  height: 16px;
}

.audience__card p {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-top: 4px;
  font-size: 0.95rem;
}

/* ---------- Avant de parler du prix ---------- */

.cost-warning {
  padding: 60px 0;
  text-align: center;
}

.cost-warning__intro {
  max-width: 560px;
  margin: 0 auto 40px;
}

.cost-warning__danger-text {
  color: #e5484d;
}

.cost-warning__grid {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
  text-align: left;
}

@media (min-width: 700px) {
  .cost-warning__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cost-warning__card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 28px 24px;
  color: var(--cream);
  background: #2e0c0c;
  border: 3px solid #e5484d;
  box-shadow: 0 12px 32px -8px rgba(74, 20, 20, 0.4);
}

.cost-warning__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: cost-shine 5s ease-in-out infinite;
  animation-delay: var(--shine-delay, 0s);
  pointer-events: none;
  z-index: 2;
}

.cost-warning__card:nth-child(1) { --shine-delay: 0s; }
.cost-warning__card:nth-child(2) { --shine-delay: 1.25s; }
.cost-warning__card:nth-child(3) { --shine-delay: 2.5s; }

@keyframes cost-shine {
  0% { left: -60%; }
  18% { left: 130%; }
  100% { left: 130%; }
}

.cost-warning__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 253, 247, 0.14);
  color: #e5484d;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.cost-warning__icon svg {
  width: 22px;
  height: 22px;
}

.cost-warning__card h3 {
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.cost-warning__card p {
  font-size: 0.9rem;
  color: rgba(255, 253, 247, 0.82);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.cost-warning__value {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  color: #e5484d;
  position: relative;
  z-index: 1;
}

.cost-warning__punchline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.15;
  color: var(--forest);
  margin: 8px 0 0 0;
}

/* ---------- Prix ---------- */

.pricing {
  padding: 60px 0;
  background: var(--forest);
  color: var(--cream);
  text-align: center;
}

.pricing__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 800px) {
  .pricing__grid {
    grid-template-columns: 0.9fr 1.1fr;
    text-align: left;
  }

  .pricing__mockup-frame {
    margin: 0;
  }
}

.pricing__mockup-frame {
  display: flex;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 30px;
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.04);
  border: 1px solid rgba(255, 253, 247, 0.15);
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.pricing__mockup {
  width: 100%;
  border-radius: 16px;
}

.pricing__badge {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: var(--cream);
  background: rgba(19, 44, 27, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(103, 103, 103, 0.6);
  box-shadow:
    inset 0 0 0 1px rgba(140, 140, 140, 0.7),
    inset 0 0 32px 5px rgba(140, 140, 140, 0.6),
    0 8px 30px rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 10px 22px;
  margin-bottom: 16px;
}

.pricing__price-current {
  font-size: 3rem;
  font-weight: 800;
}

.pricing__after {
  opacity: 0.85;
}

.pricing__urgency {
  font-weight: 700;
  margin-bottom: 24px;
}

.pricing .btn--primary {
  background: var(--cream);
  color: var(--forest);
}

/* ---------- FAQ ---------- */

.faq {
  padding: 60px 0;
}

.faq__item {
  border-bottom: 1px solid rgba(19, 44, 27, 0.15);
}

.faq__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: inherit;
}

.faq__question::after {
  content: "+";
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq__question[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq__answer p {
  padding-bottom: 20px;
}

/* ---------- CTA final ---------- */

.cta-final {
  padding: 70px 0;
  text-align: center;
  background: var(--sage);
  color: var(--cream);
}

.cta-final h2 {
  color: var(--cream);
}

.cta-final .btn--primary {
  background: var(--cream);
  color: var(--forest);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0;
  background: var(--forest);
  color: var(--cream);
  text-align: center;
}

.site-footer__logo {
  height: 44px;
  width: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
}

.site-footer__copyright {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ---------- Checkout modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 29, 24, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--cream);
  border-radius: 22px;
  padding: 44px 40px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(14px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(19, 44, 27, 0.06);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-card h3 {
  font-size: 1.5rem;
  color: var(--forest);
  margin-bottom: 6px;
}

.modal-card .modal-sub {
  font-size: 0.85rem;
  color: var(--sage);
  margin-bottom: 26px;
}

.modal-field {
  margin-bottom: 18px;
}

.modal-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--forest);
  margin-bottom: 7px;
}

.modal-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(19, 44, 27, 0.15);
  background: rgba(19, 44, 27, 0.03);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--forest);
}

.modal-field input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(62, 77, 61, 0.14);
}

.iti {
  width: 100%;
}

.iti input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(19, 44, 27, 0.15);
  background: rgba(19, 44, 27, 0.03);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--forest);
}

.iti input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(62, 77, 61, 0.14);
}

.iti__selected-flag {
  border-radius: 10px 0 0 10px;
}

.iti__country-list {
  border-radius: 10px;
  border: 1px solid rgba(19, 44, 27, 0.15);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  font-family: var(--font-body);
}

.iti__country.iti__preferred {
  background: rgba(19, 44, 27, 0.03);
}

.modal-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 20px 0 24px;
}

.modal-consent input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--forest);
  flex-shrink: 0;
}

.modal-consent label {
  font-size: 0.8rem;
  color: var(--forest);
  opacity: 0.85;
  line-height: 1.5;
}

.modal-card .btn {
  width: 100%;
}

.modal-note {
  font-size: 0.75rem;
  color: var(--sage);
  text-align: center;
  margin-top: 14px;
}
