/* ═══════════════════════════════════════════════════════════════
   Fiboo landing — styles
   Tokens lifted from the app (App.css / styles/colors.ts)
   ═══════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted Axiforma; Quicksand via Google Fonts <link>) ──
   TTF/WOFF2 (glyf outlines), not the original OTF/CFF: Chrome on Windows doesn't
   hint CFF fonts, gluing letters at small sizes — TrueType outlines get hinted. */
@font-face { font-family: "Axiforma"; src: url("/assets/fonts/Axiforma-Regular.woff2")  format("woff2"), url("/assets/fonts/Axiforma-Regular.ttf")  format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Axiforma"; src: url("/assets/fonts/Axiforma-Medium.woff2")   format("woff2"), url("/assets/fonts/Axiforma-Medium.ttf")   format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Axiforma"; src: url("/assets/fonts/Axiforma-SemiBold.woff2") format("woff2"), url("/assets/fonts/Axiforma-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Axiforma"; src: url("/assets/fonts/Axiforma-Bold.woff2")     format("woff2"), url("/assets/fonts/Axiforma-Bold.ttf")     format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --primary:   #334E9E;
  --primary-m: #7B9BEF;
  --dark:      #11233E;
  --blue:      #7B9BEF;
  --teal:      #85CECE;
  --lime:      #CED960;
  --bg-light:  #F5F5F5;
  --surface:   #FFFFFF;
  --border:    #E5E7EB;
  --text-body: #475569;
  --text-muted:#94A3B8;

  --grad-panel:  linear-gradient(135deg, #11233E 0%, #334E9E 50%, #7B9BEF 100%);
  --grad-button: linear-gradient(135deg, #334E9E 0%, #7B9BEF 100%);

  --font-display: "Quicksand", sans-serif;
  --font-body: "Axiforma", "Quicksand", system-ui, sans-serif;

  --wrap: 1120px;
  --radius: 18px;
  --shadow-card: 0 18px 50px rgba(17, 35, 62, 0.14);
  --shadow-soft: 0 8px 24px rgba(17, 35, 62, 0.07);
  --ease: cubic-bezier(0.22, 0.8, 0.36, 1);
}

/* ── Reset-ish ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--surface);
  line-height: 1.6;
  /* No forced grayscale smoothing: on Windows it drops thin features (the "i"
     dot) and glues letters at small sizes — let each OS use its native AA. */
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.wrap-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* Outline follows each element's own radius — don't override border-radius here,
   or focused pill buttons collapse to a 6px-corner rectangle. */
:focus-visible { outline: 3px solid var(--primary-m); outline-offset: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
/* Solid fill — a gradient always left one end lighter than the other. */
.btn-gradient { background: var(--primary); color: #ffff; box-shadow: var(--shadow-soft); }
.btn-lime { background: var(--lime); color: var(--dark); box-shadow: 0 10px 24px rgba(206, 217, 96, .35); }
.btn-outline { background: transparent; color: var(--dark); border-color: currentColor; }
.btn-block { width: 100%; }

/* ═══════════════════════ HEADER ═══════════════════════ */
/* At the top the header is transparent — it blends into the hero blue behind it.
   Once scrolled, it turns to frosted glass over the (white) content below. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  /* Divider via box-shadow, not border: a border would add 1px of height and
     leave a white sliver above the hero (which slides up exactly 72px). */
  transition: background .25s var(--ease), box-shadow .25s var(--ease),
              -webkit-backdrop-filter .25s var(--ease), backdrop-filter .25s var(--ease);
}
.site-header.scrolled {
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  /* Hairline divider sits just below the header; soft shadow underneath it. */
  box-shadow: 0 1px 0 rgba(255,255,255,.4), 0 4px 24px rgba(17,35,62,.06);
}
/* Fallback where backdrop-filter isn't supported: stay opaque enough to read. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.scrolled { background: rgba(255,255,255,.92); }
}
/* Three thirds: logo (left) · nav links (centre) · CTAs (right). A narrower
   left track than right nudges the middle links slightly toward the left.
   auto keeps the links on one line. (Grid only applies on desktop.) */
.header-inner { display: grid; grid-template-columns: 0.8fr auto 1fr; align-items: center; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; }
/* Logo is white while the header is transparent over the hero, colour once glass. */
.brand img { width: 60px; height: 50px; filter: brightness(0) invert(1); transition: filter .25s var(--ease); }
.site-header.scrolled .brand img { filter: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--primary); }

/* The wrapper is transparent to layout on desktop, so the links and CTAs
   sit directly in the header grid (middle and right thirds). */
.nav-collapse { display: contents; }
.site-nav { display: flex; align-items: center; gap: 28px; justify-self: center; }
.site-nav > a { font-weight: 500; color: var(--dark); white-space: nowrap; transition: color .15s; }
.site-nav > a:hover { color: var(--primary); }
.nav-cta { display: flex; align-items: center; gap: 16px; justify-self: end; margin-right: -12px; }
.link-plain { font-family: var(--font-display); font-weight: 600; color: var(--primary); }
.nav-cta .btn { padding: 11px 22px; font-size: .95rem; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: none; border: 0; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--dark); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Top state (transparent header over the blue hero): light text + white burger.
   Desktop only — on mobile the links live in a white dropdown, so they stay dark. */
@media (min-width: 861px) {
  .site-header:not(.scrolled) .site-nav > a { color: #fff; }
  .site-header:not(.scrolled) .site-nav > a:hover { color: rgba(255,255,255,.72); }
  .site-header:not(.scrolled) .link-plain { color: #fff; }
  /* Blue button would blend into the blue hero — go white with blue text on top. */
  .site-header:not(.scrolled) .nav-cta .btn-gradient {
    background: #fff; color: var(--primary); box-shadow: 0 6px 18px rgba(17,35,62,.18);
  }
}
@media (max-width: 860px) {
  .site-header:not(.scrolled) .nav-toggle span { background: #fff; }
}

/* ═══════════════════════ HERO ═══════════════════════ */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-panel); color: #fff;
  /* Slide up under the sticky glass header so the blue reaches the very top;
     padding-top adds the header height back so the content stays put. */
  margin-top: -72px;
  padding-top: calc(72px + 40px); padding-bottom: 72px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.spiral { position: absolute; opacity: .08; filter: brightness(0) invert(1); }
.spiral-1 { width: 620px; top: -140px; right: -180px; transform: rotate(40deg); }
.spiral-2 { width: 320px; bottom: 40px; left: -110px; transform: rotate(-18deg); }
.spiral-3 { width: 260px; top: 30%; right: 34%; transform: rotate(150deg); opacity: .05; }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  padding-block: 20px 44px;
}
.hero-copy { max-width: 620px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.badge-emoji { font-size: 1.05rem; }

.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); letter-spacing: -0.01em; margin-bottom: 18px; }
.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: rgba(255,255,255,.82); max-width: 520px; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero-actions .btn-outline { color: #fff; }
.hero-fineprint { font-size: .9rem; color: rgba(255,255,255,.62); margin: 0; }

/* ── Hero visual: lesson card + snail ── */
.hero-visual { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.lesson-card {
  position: relative; z-index: 2; background: #fff; color: var(--dark);
  border-radius: 24px; padding: 26px 28px 24px; box-shadow: var(--shadow-card);
  margin-left: auto; width: min(100%, 400px);
}
.lesson-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.lesson-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.lesson-level {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; color: var(--primary);
  background: #EEF2FF; padding: 4px 12px; border-radius: 999px;
}
.lesson-problem { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--dark); }
.lesson-stroke { width: 132px; height: 72px; margin: 4px 0 12px; }
.lesson-stroke .ink {
  stroke-dasharray: 320; stroke-dashoffset: 320;
  animation: drawInk 1.1s var(--ease) .5s forwards;
}
.lesson-foot { display: flex; align-items: center; gap: 9px; color: var(--primary); font-weight: 600; font-size: .95rem; }
.lesson-foot .lesson-check svg { width: 20px; height: 20px; display: block; }
.lesson-check {
  opacity: 0; transform: scale(.4);
  animation: popCheck .4s var(--ease) 1.5s forwards;
}

.hero-snail {
  position: absolute; z-index: 3; left: -52px; bottom: -40px;
  width: clamp(132px, 33%, 188px); height: auto;
  filter: drop-shadow(0 14px 22px rgba(17,35,62,.4));
}

@keyframes drawInk { to { stroke-dashoffset: 0; } }
@keyframes popCheck { to { opacity: 1; transform: scale(1); } }

/* ── Stats card (floats on the blue, space above and below) ── */
.stats {
  position: relative; z-index: 1;
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; background: #fff; color: var(--dark);
  border-radius: 20px; padding: 28px 32px;
  box-shadow: var(--shadow-card);
}
.stats li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.stats b { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; color: var(--primary); }
.stats span { font-size: .9rem; color: var(--text-body); }
.stats sup { color: var(--text-muted); }

/* ═══════════════════════ SECTIONS ═══════════════════════ */
.section { padding-block: clamp(64px, 9vw, 104px); }
.section-alt { background: var(--bg-light); }
.section-head { max-width: 640px; margin: 0 auto clamp(40px, 5vw, 60px); text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: 1.08rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary-m); margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--dark); }
.section-lead { color: var(--text-body); font-size: 1.08rem; margin: 16px 0 0; }

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 28px 30px; box-shadow: var(--shadow-soft);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  color: #fff; background: var(--grad-button); margin-bottom: 20px;
  box-shadow: 0 8px 18px rgba(51,78,158,.28);
}
.step h3 { font-size: 1.3rem; color: var(--dark); margin-bottom: 10px; }
.step p { color: var(--text-body); margin: 0; }

/* ── Features ── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-soft);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.feature-icon {
  width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
  background: #EEF2FF; border-radius: 14px; margin-bottom: 18px;
}
.feature-icon svg {
  width: 26px; height: 26px; fill: none; stroke: var(--primary);
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.feature h3 { font-size: 1.18rem; color: var(--dark); margin-bottom: 8px; }
.feature p { color: var(--text-body); margin: 0; }

/* ── Price ── */
.price-card {
  position: relative;
  max-width: 440px; margin: 0 auto; background: #fff;
  border: 1px solid var(--border); border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.price-card:hover { transform: translateY(-4px); box-shadow: 0 28px 64px rgba(17,35,62,.2); }

.price-card-top {
  position: relative; overflow: hidden;
  background: var(--grad-panel); color: #fff;
  padding: 34px 32px 30px; text-align: center;
}
.price-spiral {
  position: absolute; width: 240px; top: -74px; right: -74px;
  opacity: .12; filter: brightness(0) invert(1);
  pointer-events: none; user-select: none;
}
.price-tag {
  position: relative; display: inline-block;
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.14); padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
}
.price-value { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 3.4rem; line-height: 1; }
.price-currency { font-size: 1.4rem; font-weight: 700; vertical-align: super; margin-right: 4px; }
.price-period { font-size: 1.05rem; font-weight: 600; color: rgba(255,255,255,.72); }
.price-freebadge {
  position: relative; display: inline-block; margin-top: 18px;
  background: var(--lime); color: var(--dark);
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  padding: 7px 16px; border-radius: 999px; box-shadow: 0 8px 18px rgba(206,217,96,.35);
}

.price-body { padding: 28px 32px 30px; }
.price-list { display: grid; gap: 15px; margin-bottom: 26px; }
.price-list li {
  position: relative; padding-left: 32px; color: var(--dark); font-weight: 500; line-height: 1.5;
}
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath d='M6 11l3 3 6-6.5' fill='none' stroke='%2311233E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat,
    var(--lime);
}
.price-fine { margin: 16px 0 0; text-align: center; font-size: .85rem; color: var(--text-muted); }

/* ── FAQ ── */
.faq { display: grid; gap: 14px; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 22px; box-shadow: var(--shadow-soft);
}
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--dark);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary);
  transform: rotate(45deg); transition: transform .25s var(--ease); margin-top: -4px;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.faq-body { padding: 0 0 20px; }
.faq-body p { margin: 0; color: var(--text-body); }


/* ═══════════════════════ FOOTER ═══════════════════════ */
.site-footer { background: var(--dark); color: rgba(255,255,255,.7); padding-block: 48px 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand img { width: 120px; height: auto; margin-bottom: 10px; }
.footer-brand p { margin: 0; max-width: 260px; font-size: .95rem; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 12px 40px; align-content: start; }
.footer-nav a { color: rgba(255,255,255,.75); font-size: .95rem; transition: color .15s; }
.footer-nav a:hover { color: #fff; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 22px; font-size: .85rem; color: rgba(255,255,255,.5); }
.footer-legal p { margin: 0; }

/* ═══════════════════════ SCROLL REVEAL ═══════════════════════ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 940px) {
  .steps, .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .header-inner { display: flex; justify-content: space-between; }
  .nav-toggle { display: flex; }
  /* Wrapper becomes the dropdown panel; links + CTAs stack inside it. */
  .nav-collapse {
    display: block;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px; box-shadow: var(--shadow-soft);
    clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
    transition: clip-path .3s var(--ease), opacity .2s;
  }
  .nav-collapse.open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .site-nav { flex-direction: column; align-items: stretch; gap: 4px; justify-self: auto; }
  .site-nav > a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .nav-cta { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 12px; margin-right: 0; justify-self: auto; }
  .nav-cta .btn, .nav-cta .link-plain { width: 100%; text-align: center; padding: 13px; }

  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-block: 24px 44px; }
  .hero-copy { max-width: none; text-align: center; margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 420px; }
  .lesson-card { margin-inline: auto; }
  /* Card is centred on mobile (no left gutter), so the snail sits over the
     card corner — reserve room on the "corrigido" line like the mockup does. */
  .hero-snail { left: -16px; bottom: -28px; width: 116px; }
  .lesson-foot { padding-left: 92px; }
}
@media (max-width: 620px) {
  .steps, .features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; border-radius: 18px; }
  .footer-inner { flex-direction: column; gap: 28px; }
}

/* ═══════════════════════ REDUCED MOTION ═══════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .lesson-stroke .ink { stroke-dashoffset: 0; }
  .lesson-check { opacity: 1; transform: none; }
}
