/* ==========================================================================
   Base styles shared by every page.
   Fonts, colour tokens, reset and the shared components: button, site
   header, highlighted words, FAQ list,
   closing call to action and the mobile card carousel.
   ========================================================================== */

/* Fonts ------------------------------------------------------------------
   Poppins (SIL OFL, see assets/fonts/OFL-Poppins.txt), latin subset from
   Google Fonts. Pacifico (SIL OFL, see assets/fonts/OFL-Pacifico.txt), latin
   subset from Google Fonts, for the hand-lettered words; it replaces the
   design's Keramique Script (22/10/2026). */
@font-face { font-family: "Poppins"; font-weight: 200; font-display: swap; src: url("../assets/fonts/poppins-200.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url("../assets/fonts/poppins-300.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../assets/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../assets/fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("../assets/fonts/poppins-800.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 900; font-display: swap; src: url("../assets/fonts/poppins-900.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 900; font-style: italic; font-display: swap; src: url("../assets/fonts/poppins-900-italic.woff2") format("woff2"); }
@font-face { font-family: "Pacifico"; font-weight: 400; font-display: swap; src: url("../assets/fonts/pacifico-400.woff2") format("woff2"); }

/* Tokens -----------------------------------------------------------------
   Brand palette from the designer's identity guide (15/10/2026). Tokens
   marked "sampled" are not in the palette and were measured on the Canva
   exports. */
:root {
  --bg: #fcfaf2;          /* page background (cream) */
  --ink: #242424;         /* main text */
  --highlight: #fdff96;   /* yellow marker behind headings */

  --green: #dbff86;       --green-dark: #8da858; /* sampled */   --olive: #769212; /* sampled: logo and Lado B */
  --forest: #236946;
  --pink: #ffd2f4;        --pink-dark: #864673; /* sampled */    --pink-pale: #ffe4f3; /* sampled */
  --red: #e83a00;         --red-dark: #7a1818;
  --blue: #143de3;        --blue-pale: #b8eaff;
  --magenta: #c52d6c;     /* sampled */
  --yellow: #ffd72e;
  --footer-bg: #f3fbff;   /* sampled: closing section of the long pages */

  /* Design unit: 1 design pixel on a 1920px-wide Canva frame.
     Lets desktop layouts follow the Canva proportions exactly, at any
     screen width (larger screens show the same design, scaled up). */
  --u: calc(100vw / 1920);
  /* Long pages were measured on 1065px-wide screenshots of the same frame:
     1 screenshot pixel. */
  --p: calc(var(--u) * 1920 / 1065);
  /* Design of 15/10/2026: pages were exported 1366px wide, and the Canva
     structured content gives every size and position in those pixels
     (referencias/canva/v2-2026-10-15/spec/). 1 Canva pixel: */
  --e: calc(var(--u) * 1920 / 1366);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font-family: "Poppins", system-ui, sans-serif; }
html { scroll-padding-top: 110px; }   /* anchors land below the fixed header */
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Hand-lettered words (hellooo…, não, maioria A, …) ------------------- */
/* Pacifico has one weight: a stroke in the text colour makes it as full as the
   design's lettering. */
.script { font-family: "Pacifico", "Poppins", cursive; font-weight: 400; line-height: 1.1; -webkit-text-stroke: .03em currentColor; }

/* Button: outlined pill with an arrow ------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35em;
  border: solid currentColor; border-radius: 999px;
  font-weight: 900; letter-spacing: -.06em; white-space: nowrap;
  transition: transform .15s ease;
}
.btn:hover, a:hover .btn { transform: translateY(-2px); }
.btn svg { width: 1.25em; height: 1em; flex: none; }

/* Page wrapper for the long pages (Perder peso, Lado B, quiz) ------------ */
.page { position: relative; width: 100%; margin: 0 auto; overflow: hidden; }
.deco { position: absolute; pointer-events: none; }

/* Site header (every page except the home page) --------------------------
   Sizes from the Canva spec (1366px pages, --e). Logo 212px wide at x 60;
   menu items Poppins 200 22.8px; "Agendar consulta" pill 226x38 ending at
   x 1316. All four items show on every page; the current one is
   highlighted (see a[aria-current]). --accent: blue on most pages, orange on Lado B and the quiz. */
.site-header {
  position: relative; z-index: 10;
  transition: height .2s ease, background-color .2s ease, box-shadow .2s ease;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(187 * var(--e)); padding: 0 calc(50 * var(--e)) 0 calc(60 * var(--e));
  --accent: var(--blue);
}
.site-header--red { --accent: var(--red); }
.site-header__logo img { width: calc(212 * var(--e)); height: auto; transition: width .2s ease; }

/* Pages that scroll: the header stays fixed at the top of the window. It is
   taken out of the flow (fixed + reserved space) so that shrinking it after
   scrolling does not make the page jump. Single-screen pages do not scroll,
   so their header stays in place. */
body:not(.fit-screen) .site-header { position: fixed; top: 0; left: 0; right: 0; }
body:not(.fit-screen) .site-header + main { padding-top: calc(187 * var(--e)); }

/* After scrolling (class set by js/nav.js): compact header with a background,
   so it stays visible without covering too much of the page. */
.site-header.is-scrolled { height: calc(78 * var(--e)); background: var(--bg); box-shadow: 0 2px 18px rgb(0 0 0 / .08); }
.site-header.is-scrolled .site-header__logo img { width: calc(130 * var(--e)); }
.site-header__toggle { display: none; }

.site-nav { display: flex; align-items: center; gap: calc(26 * var(--e)); }
.site-nav ul { display: flex; align-items: center; gap: calc(26 * var(--e)); }
.site-nav a { font-weight: 200; font-size: calc(22.8 * var(--e)); letter-spacing: -.078em; line-height: 1.1; }
.site-nav a:hover { color: var(--accent); }
/* Current page: same menu on every page, current item highlighted (the Canva
   design hides it; a constant menu is clearer to navigate). */
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 400; text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .22em; }
.site-nav .site-nav__cta {
  background: var(--bg);   /* opaque, as in the design: background strokes pass behind it */
  color: var(--accent); font-weight: 700; height: calc(38.5 * var(--e)); padding: 0 calc(14 * var(--e)) 0 calc(18 * var(--e));
  border-width: calc(4 * var(--e)); font-size: calc(20 * var(--e)); letter-spacing: -.078em;
}

/* Site footer ---------------------------------------------------------------
   Long pages (design of 15/10/2026): the closing call to action of the page
   on the left (.site-footer__cta, page-specific) and the contact and legal
   details on the right. Light blue background (Lado B: light yellow).
   Single-screen pages (home, quiz) keep a compact legal bar
   (.site-footer--bar), as they have no footer in the design. */
.site-footer {
  position: relative; z-index: 2; background: var(--footer-bg);
  display: flex; align-items: center; justify-content: space-between; gap: calc(40 * var(--e));
  padding: calc(100 * var(--e)) calc(106 * var(--e)) calc(150 * var(--e)) calc(132 * var(--e));
}
.site-footer__info {
  text-align: right; font-weight: 300; font-size: max(13px, calc(19.2 * var(--e))); line-height: 1.4; letter-spacing: -.078em;
}
.site-footer__info .site-footer__legal { margin-top: 1.4em; }   /* blank line before the legal links, as in the design */
.site-footer__info a { color: var(--accent, var(--blue)); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__info .site-footer__legal a { color: var(--ink); text-decoration: none; }
.site-footer__info .site-footer__legal a:hover { text-decoration: underline; }

.site-footer--bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding: calc(22 * var(--p)) calc(40 * var(--p)); background: var(--bg); border-top: 1px solid rgb(36 36 36 / .12);
  font-weight: 300; font-size: max(12px, calc(11 * var(--p))); letter-spacing: -.03em;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer--bar a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer--bar a:hover { color: var(--blue); }

/* Social links (Instagram, TikTok) and the developer's credit */
.site-social { display: flex; justify-content: flex-end; gap: .5em; margin-top: 1em; }
.site-footer--bar .site-social { margin-top: 0; }
.site-social a { display: grid; place-items: center; width: 2.2em; height: 2.2em; color: var(--accent, var(--blue)); text-decoration: none; transition: opacity .15s ease; }
.site-social a:hover { opacity: .7; }
.site-social svg { width: 1.3em; height: 1.3em; fill: currentColor; }
.site-credit { display: inline-block; margin-left: .6em; vertical-align: -.1em; opacity: .3; transition: opacity .2s ease; }
.site-credit:hover, .site-credit:focus-visible { opacity: 1; }
.site-credit img { display: block; width: auto; height: .85em; }
.site-footer__info .site-credit { position: absolute; right: calc(40 * var(--e)); bottom: calc(40 * var(--e)); margin: 0; }   /* desktop: bottom-right corner of the footer */

/* Hero (shared by Perder peso, Lado B, quiz entry and results) ------------ */
img.hello { width: calc(130 * var(--e)); height: auto; }   /* "hellooo" sticker (designer, 15/10: stickers instead of the hand lettering) */
.hero__title {
  font-weight: 900; line-height: 1.04; letter-spacing: -.085em;
}
.hero__text { font-weight: 300; letter-spacing: -.065em; }

/* Yellow marker behind a word ------------------------------------------- */
.marker { position: relative; z-index: 0; }
.marker::before {
  content: ""; position: absolute; z-index: -1;
  left: -.05em; right: -.12em; top: .45em; bottom: -.04em;
  background: var(--highlight); border-radius: .06em;
  transform: rotate(-1.5deg) skewX(-6deg);
}

/* Section heading in display size --------------------------------------- */
.display { font-weight: 900; line-height: 1; letter-spacing: -.085em; }

/* FAQ list ----------------------------------------------------------------- */
.faq__q { font-weight: 900; letter-spacing: -.075em; line-height: 1.1; }
.faq__a { font-weight: 300; letter-spacing: -.055em; line-height: 1.45; }

/* Mobile and tablet --------------------------------------------------------
   No Canva design exists: the developer adapts the layout. Design unit
   switches to a 600px-wide reference. */
@media (max-width: 900px) {
  :root { --u: calc(100vw / 600); --p: calc(100vw / 600); }

  :root { --e: calc(100vw / 600); }
  .site-header { height: calc(90 * var(--u)); padding: 0 calc(24 * var(--u)); }
  .site-header.is-scrolled { height: calc(62 * var(--u)); }
  body:not(.fit-screen) .site-header + main { padding-top: calc(90 * var(--u)); }
  .site-header.is-scrolled .site-header__logo img { width: calc(110 * var(--u)); }
  .site-header.is-scrolled .site-header__toggle { width: calc(46 * var(--u)); height: calc(46 * var(--u)); }
  .site-footer { flex-direction: column; align-items: flex-start; gap: calc(50 * var(--u)); padding: calc(70 * var(--u)) calc(32 * var(--u)) calc(60 * var(--u)); }
  .site-footer__info { text-align: left; font-size: max(13px, calc(22 * var(--u))); }
  .site-social { justify-content: flex-start; margin-left: -.6em; }
  .site-footer__info { align-self: stretch; }
  .site-footer__info .site-credit { position: static; float: right; margin: .3em 0 0; }   /* pushed to the right edge */
  .site-footer__links { align-self: stretch; }
  .site-footer__links li:last-child { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 1em; }
  .site-footer--bar { flex-direction: column; align-items: flex-start; padding: calc(30 * var(--u)) calc(32 * var(--u)); font-size: max(12px, calc(20 * var(--u))); }
  .site-header__logo img { width: calc(150 * var(--u)); }
  .site-header__toggle {
    display: grid; place-items: center; width: calc(56 * var(--u)); height: calc(56 * var(--u));
    border: calc(3 * var(--u)) solid var(--accent); border-radius: 50%; color: var(--accent);
  }
  .site-header__toggle svg { width: 55%; height: 55%; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: calc(16 * var(--u)); right: calc(16 * var(--u));
    flex-direction: column; align-items: stretch; gap: calc(20 * var(--u));
    padding: calc(28 * var(--u)); border-radius: calc(28 * var(--u));
    background: var(--bg); box-shadow: 0 calc(12 * var(--u)) calc(40 * var(--u)) rgb(0 0 0 / .15);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: calc(14 * var(--u)); }
  .site-nav a { font-size: calc(30 * var(--u)); }
  .site-nav .site-nav__cta { height: calc(60 * var(--u)); font-size: calc(26 * var(--u)); border-width: calc(4 * var(--u)); padding: 0 calc(20 * var(--u)); }

  img.hello { width: calc(170 * var(--u)); }

  /* Card carousel: horizontal scroll with snap points, no script needed. */
  .carousel {
    display: flex; gap: calc(24 * var(--u)); overflow-x: auto; scroll-snap-type: x mandatory;
    padding: calc(30 * var(--u)) calc(60 * var(--u)) calc(50 * var(--u));
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel > * { scroll-snap-align: center; flex: none; }
  .carousel-hint { display: block; text-align: center; font-weight: 300; font-size: max(11px, calc(20 * var(--u))); letter-spacing: -.05em; opacity: .7; }

  /* Bold text: the design's negative letter-spacing leaves almost no gap
     between words at phone sizes. Wider word gaps, letters unchanged. */
  h1, h2, h3, h4, strong, b, dt, button, label, .btn, .answer, .faq__q, .display,
  [class*="title"], [class*="__q"], .price__sessions, .plan__count, .lb-manifesto__strong,
  .lb-footer__text, .ct-cta__text, .mb-tot__item { word-spacing: .12em; }

  /* Bold text on coloured cards: lighter than the design's 900 so it stays
     readable at phone sizes (same as the quiz answers and FAQ questions). */
  body :is(.path-card .btn, .how__title, .offer__title,
    .offer__title strong, .offer__text strong, .offer__btn, .mb-card__title, .mb-plot__title, .mb-plot dt) {
    font-weight: 800; letter-spacing: -.05em;
  }

}
@media (min-width: 901px) {
  .carousel-hint { display: none; }

  /* Single-screen pages (home, quiz, results): the Canva frame is 1920x1080,
     but the browser window is shorter (tabs, address bar). Scale the design
     to fit both width and height so these pages never scroll on desktop.
     --p is redeclared because it is computed from --u. */
  .fit-screen {
    --u: min(100vw / 1920, 100vh / 1080);
    --p: calc(var(--u) * 1920 / 1065);
    --e: calc(var(--u) * 1920 / 1366);
  }
  @supports (height: 100dvh) {
    .fit-screen { --u: min(100vw / 1920, 100dvh / 1080); }
  }
  .fit-screen { height: 100vh; height: 100dvh; overflow: hidden; }
  .fit-screen .page { width: calc(1920 * var(--u)); height: calc(1080 * var(--u)); min-height: 0; overflow-x: visible; overflow-y: clip; }
  .fit-screen .deco { overflow: visible; }   /* background shapes continue into the side margins */
  .fit-screen .site-footer--bar { position: absolute; left: 0; right: 0; bottom: 0; border-top: 0; background: none; padding-bottom: calc(18 * var(--p)); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .site-header, .site-header__logo img { transition: none; }
  .carousel { scroll-behavior: auto; }
}
