/* ==========================================================================
   Falaí — stylesheet entry point
   --------------------------------------------------------------------------
   Architecture (ITCSS-inspired, BEM class names):
     base/        reset, design tokens and global element styles
     components/  reusable, self-contained UI pieces (one block per file)
     layout/      page structure: container, site header, site footer
     sections/    how each home-page section arranges its components
     utilities/   single-purpose helpers that must always win
   Cascade layers make the order explicit: a later layer always beats an
   earlier one, regardless of selector specificity. Layers that *compose*
   (layout, sections) come after the building blocks they compose, so they
   can adjust them through a BEM mix (e.g. class="button about__cta").
   Blocks never reach into each other's internals.
   ========================================================================== */

@layer reset, tokens, base, components, layout, sections, utilities;

/* Base */
@layer base {
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/figtree-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/figtree-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/kalam-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/kalam-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(/assets/fonts/source-serif-4-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(/assets/fonts/source-serif-4-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

}
@layer reset {
/* ==========================================================================
   Reset — a small, modern baseline (after Josh Comeau & Andy Bell).
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p,
li {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Lists styled as UI keep their semantics in Safari via role="list". */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

}
@layer tokens {
/* ==========================================================================
   Design tokens — the single source of truth for colour, type, spacing,
   shape, elevation and motion. Components only use the semantic roles.

   Breakpoints (media queries can't read custom properties, so they are
   documented here and used as literals):
     sm  40em  (640px)   two/three-column grids start
     md  48em  (768px)   tablet
     lg  64em  (1024px)  desktop sections
     nav 72em  (1152px)  full navigation in the header
     xl  75em  (1200px)  six area cards in one row
   ========================================================================== */

:root {
  /* ---- Palette ---------------------------------------------------------- */
  --color-purple-950: #2e1065;
  --color-pink-700: #b01e50;
  --color-pink-600: #d42a63;
  --color-pink-500: #f0487c;
  --color-pink-200: #f9d2de;
  --color-pink-100: #fde4ea;
  --color-pink-50: #fef1f4;
  --color-yellow-300: #fcd46a;
  --color-mint-200: #c6e8dc;
  --color-peach-200: #fcdcc7;
  --color-sun-200: #fce7a9;
  --color-sky-50: #f2f7fe;
  --color-sky-100: #eaf5fd;
  --color-sky-200: #d3e3fb;
  --color-sky-300: #a9c8f6;
  --color-navy-800: #243a73;
  --color-lavender-200: #e2d9fb;
  --color-violet-600: #7c3aed;
  --color-green-700: #1a6d4b;
  --color-red-700: #b3261e;

  --color-white: #ffffff;
  --color-ink: #23253a;
  --color-gray-600: #585b6b;
  --color-gray-500: #64616f;
  --color-cream-50: #fcfaf8;
  --color-cream-100: #f6f1ec;
  --color-line: #efe5e7;

  /* Area palettes: soft background + matching accent */
  --color-rose-bg: #fde6ea;
  --color-rose-fg: #e0457a;
  --color-lavender-bg: #f0eafd;
  --color-lavender-fg: #d93a82;
  --color-sky-bg: #e5effd;
  --color-sky-fg: #3f73c8;
  --color-mint-bg: #e3f3eb;
  --color-mint-fg: #3e8f76;
  --color-sun-bg: #fcf0d4;
  --color-sun-fg: #d9791f;
  --color-peach-bg: #fde6d9;
  --color-peach-fg: #e0453a;

  /* ---- Semantic roles --------------------------------------------------- */
  --color-bg: var(--color-cream-50);
  --color-bg-warm: var(--color-cream-100);
  --color-surface: var(--color-white);
  --color-surface-translucent: rgb(255 255 255 / 0.75);
  --color-backdrop: rgb(46 16 101 / 0.35);       /* purple-950, behind modal dialogs */
  --color-heading: var(--color-purple-950);
  --color-text: var(--color-gray-600);
  --color-text-muted: var(--color-gray-500);
  --color-icon: var(--color-ink);
  --color-brand: var(--color-pink-500);          /* decorative pink: logo, headline accent, icons */
  --color-accent: var(--color-pink-600);         /* interactive pink: buttons & links (WCAG AA) */
  --color-accent-hover: var(--color-pink-700);
  --color-on-accent: var(--color-white);
  --color-success: var(--color-green-700);
  --color-error: var(--color-red-700);
  --color-focus: var(--color-violet-600);

  /* Numbered steps (article sections, table of contents) cycle through these. */
  --color-step-1: var(--color-pink-200);
  --color-step-2: var(--color-sun-200);
  --color-step-3: var(--color-mint-200);
  --color-step-4: var(--color-sky-200);
  --color-step-5: var(--color-lavender-200);
  --color-step-6: var(--color-peach-200);

  /* ---- Typography ------------------------------------------------------- */
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;

  --fs-display: clamp(2.125rem, 1.25rem + 3.5vw, 4.125rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem);
  --fs-lead: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  --fs-hand: clamp(1.25rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-prose: 1.0625rem;
  --fs-body: 1rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.875rem;
  --fs-2xs: 0.8125rem;

  /* ---- Spacing ---------------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;
  --space-10: 4rem;
  --space-11: 5rem;
  --section-space: clamp(3rem, 2rem + 4vw, 5rem);

  /* ---- Layout ----------------------------------------------------------- */
  --container-max: 73.75rem;   /* 1180px */
  --container-wide: 77.5rem;   /* 1240px */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  /* ---- Shape ------------------------------------------------------------ */
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-pill: 999px;

  /* ---- Elevation -------------------------------------------------------- */
  --shadow-sm: 0 1px 3px rgb(46 16 101 / 0.08);
  --shadow-card: 0 1px 2px rgb(46 16 101 / 0.04), 0 10px 30px -12px rgb(46 16 101 / 0.14);
  --shadow-card-hover: 0 2px 4px rgb(46 16 101 / 0.05), 0 18px 40px -14px rgb(46 16 101 / 0.22);
  --shadow-button: 0 8px 18px -8px rgb(212 42 99 / 0.55);
  --shadow-overlay: 0 24px 48px -16px rgb(46 16 101 / 0.28);

  /* ---- Motion ----------------------------------------------------------- */
  --duration: 200ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

}
@layer base {
/* ==========================================================================
   Global element styles — typography defaults, links, focus & motion.
   ========================================================================== */

html {
  color-scheme: light;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1,
h2,
h3 {
  color: var(--color-heading);
}

/* h1 keeps the sans display face; section and card titles use the serif. */
h1 {
  font-weight: 700;
}

h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 650;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

:target {
  scroll-margin-top: var(--space-7);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

::selection {
  background-color: var(--color-pink-100);
  color: var(--color-heading);
}

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

}

/* Components */
@layer components {
/* ==========================================================================
   Icon — SVG sprite icons. Colour follows `color`; stroke width is themable.
   ========================================================================== */

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  stroke-width: 2;
}

}
@layer components {
/* ==========================================================================
   Icon button — a round, icon-only button or link.
   Always give it an accessible name (aria-label or visually hidden text).
   Size is themable through --icon-button-size (inherited, so a parent can set it).
   ========================================================================== */

.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--icon-button-size, 2.75rem);
  height: var(--icon-button-size, 2.75rem);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--color-icon);
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.icon-button:hover {
  background-color: var(--color-pink-50);
}

}
@layer components {
/* ==========================================================================
   Button — pill-shaped call to action. Variants only swap custom properties.
   ========================================================================== */

.button {
  --button-bg: transparent;
  --button-fg: var(--color-heading);
  --button-border: transparent;
  --button-shadow: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 3rem;
  padding: 0.7em 1.75em;
  border: 1.5px solid var(--button-border);
  border-radius: var(--radius-pill);
  background-color: var(--button-bg);
  box-shadow: var(--button-shadow);
  color: var(--button-fg);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    translate var(--duration) var(--ease);
}

.button .icon {
  width: 1.15em;
  height: 1.15em;
  transition: translate var(--duration) var(--ease);
}

.button:hover .icon {
  translate: 0.2em 0;
}

.button:active {
  translate: 0 1px;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---- Variants ------------------------------------------------------------ */
.button--primary {
  --button-bg: var(--color-accent);
  --button-fg: var(--color-on-accent);
  --button-shadow: var(--shadow-button);
}

.button--primary:hover {
  --button-bg: var(--color-accent-hover);
}

.button--outline {
  --button-border: var(--color-heading);
}

.button--outline:hover {
  --button-bg: var(--color-heading);
  --button-fg: var(--color-surface);
}

/* Download: the leading icon nudges down instead of sideways. */
.button--download {
  gap: var(--space-2);
}

.button--download:hover .icon {
  translate: 0 0.15em;
}

}
@layer components {
/* ==========================================================================
   Link with arrow — secondary text link ("Ver todas as áreas →").
   ========================================================================== */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.link-arrow .icon {
  width: 1.15em;
  height: 1.15em;
  transition: translate var(--duration) var(--ease);
}

.link-arrow:hover {
  color: var(--color-accent-hover);
}

.link-arrow:hover .icon {
  translate: 0.2em 0;
}

}
@layer components {
/* ==========================================================================
   Skip link — lets keyboard users jump straight to the main content.
   ========================================================================== */

.skip-link {
  position: absolute;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background-color: var(--color-heading);
  color: var(--color-surface);
  font-weight: 600;
  text-decoration: none;
  translate: 0 calc(-100% - var(--space-6));
  transition: translate var(--duration) var(--ease);
}

.skip-link:focus-visible {
  translate: 0 0;
}

}
@layer components {
/* ==========================================================================
   Official Falaí logo, shared by the header, footer and article banners.
   Keep the supplied image's proportions at every size.
   ========================================================================== */

.logo {
  --logo-width: clamp(8rem, 6rem + 5vw, 11rem);

  display: block;
  width: var(--logo-width);
  max-width: 100%;
  flex-shrink: 0;
  line-height: 1;
  text-decoration: none;
}

.logo__image {
  display: block;
  width: 100%;
  height: auto;
}

/* Compact version for the footer and article newsletter banners. */
.logo--small {
  --logo-width: clamp(7rem, 5rem + 4vw, 9rem);
}

}
@layer components {
/* ==========================================================================
   Primary navigation — stacked links in the mobile menu, inline on desktop.
   ========================================================================== */

.primary-nav__list {
  display: grid;
}

.primary-nav__link {
  display: block;
  padding: var(--space-3) var(--space-1);
  border-bottom: 1px solid var(--color-line);
  color: var(--color-heading);
  font-weight: 600;
  text-decoration: none;
}

.primary-nav__link[aria-current] {
  color: var(--color-accent);
}

@media (min-width: 72em) {
  .primary-nav__list {
    display: flex;
    gap: var(--space-6);
  }

  .primary-nav__link {
    position: relative;
    padding: var(--space-2) 0;
    border: 0;
    color: var(--color-text);
    font-size: var(--fs-sm);
    font-weight: 500;
    transition: color var(--duration) var(--ease);
  }

  .primary-nav__link::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background-color: currentColor;
    scale: 0 1;
    transition: scale var(--duration) var(--ease);
  }

  .primary-nav__link:hover {
    color: var(--color-heading);
  }

  .primary-nav__link:hover::after,
  .primary-nav__link[aria-current]::after {
    scale: 1 1;
  }

  .primary-nav__link[aria-current] {
    color: var(--color-accent);
  }
}

}
@layer components {
/* ==========================================================================
   Decorative shapes — sparkles and soft blobs. Always aria-hidden.
   ========================================================================== */

.sparkle {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-yellow-300);
  stroke-width: 4;
  pointer-events: none;
}

.blob {
  display: block;
  aspect-ratio: 1;
  border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%;
  background-color: var(--blob-color, var(--color-pink-100));
  pointer-events: none;
}

}
@layer components {
/* ==========================================================================
   Handnote — short handwritten-style notes placed over photos.
   ========================================================================== */

.handnote {
  font-family: var(--font-hand);
  font-size: var(--fs-hand);
  line-height: 1.15;
  color: var(--color-heading);
  rotate: -12deg;
}

.handnote__heart {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.1em;
  stroke-width: 2;
}

}
@layer components {
/* ==========================================================================
   Section heading — title, short intro and a "see all" link.
   Phones (as in the mobile design): no intro, the link is an arrow next to the title.
   ========================================================================== */

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title link"
    "intro intro";
  align-items: center;
  gap: var(--space-2) var(--space-6);
  margin-bottom: var(--space-7);
}

.section-heading__title {
  grid-area: title;
  font-size: var(--fs-h2);
}

.section-heading__intro {
  display: none;
  grid-area: intro;
  max-width: 44em;
  color: var(--color-text-muted);
}

.section-heading__link {
  grid-area: link;
  color: var(--color-heading);
}

.section-heading__link .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.section-heading__link-label {
  display: none;
}

@media (min-width: 40em) {
  .section-heading__intro {
    display: block;
  }
}

@media (min-width: 48em) {
  .section-heading {
    grid-template-areas:
      "title title"
      "intro link";
    align-items: end;
  }

  .section-heading__link {
    color: var(--color-accent);
  }

  .section-heading__link .icon {
    width: 1.15em;
    height: 1.15em;
  }

  .section-heading__link-label {
    display: inline;
  }
}

}
@layer components {
/* ==========================================================================
   Area card — one of the six Falaí areas.
   Mobile: horizontal row (icon · text), the photo fades in behind the right edge.
   From 40em: vertical card (icon, title, text, photo, arrow).
   The whole card is clickable through the title's .stretched-link.
   Colour variants only set --area-bg / --area-fg (open for extension).
   ========================================================================== */

.area-card {
  --area-bg: var(--color-rose-bg);
  --area-fg: var(--color-rose-fg);

  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas:
    "icon ."
    "icon title"
    "icon text"
    "icon .";
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  min-height: 6.5rem;
  padding: var(--space-3) 6.75rem var(--space-3) var(--space-4);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--area-bg);
  transition:
    translate var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.area-card:hover {
  translate: 0 -4px;
  box-shadow: var(--shadow-card-hover);
}

.area-card:has(.stretched-link:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.area-card__icon {
  grid-area: icon;
  align-self: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--area-fg);
  stroke-width: 1.5;
}

.area-card__title {
  grid-area: title;
  font-size: var(--fs-sm);
  line-height: 1.2;
}

.area-card__text {
  grid-area: text;
  font-size: var(--fs-2xs);
  line-height: 1.45;
  color: var(--color-text-muted);
}

.area-card__image {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  right: 0;
  width: 6rem;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20%);
  mask-image: linear-gradient(to right, transparent, #000 20%);
}

.area-card__arrow {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  background-color: var(--color-surface-translucent);
  color: var(--color-heading);
  transition: translate var(--duration) var(--ease);
}

.area-card__arrow .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.area-card:hover .area-card__arrow {
  translate: 0.2rem 0;
}

/* ---- Vertical card --------------------------------------------------------- */
@media (min-width: 40em) {
  .area-card {
    container-type: inline-size;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas:
      "icon"
      "title"
      "text"
      "image"
      "arrow";
    justify-items: center;
    row-gap: var(--space-3);
    padding: var(--space-5) var(--space-2) var(--space-4);
    text-align: center;
  }

  .area-card__icon {
    width: 3.5rem;
    height: 3.5rem;
  }

  /* Scale headings with each card and reserve room for wrapped titles. */
  .area-card__title {
    display: grid;
    align-content: center;
    min-height: calc(2 * 1.2em);
    font-size: clamp(1rem, 11.8cqi, 1.3125rem);
  }

  .area-card__text {
    font-size: var(--fs-xs);
  }

  .area-card__image {
    position: static;
    z-index: auto;
    grid-area: image;
    align-self: end;
    width: 100%;
    max-width: 12.5rem;
    height: auto;
    aspect-ratio: 1;
    margin-top: var(--space-2);
    border-radius: var(--radius-md);
    -webkit-mask-image: none;
    mask-image: none;
  }

  .area-card__arrow {
    position: static;
    grid-area: arrow;
    width: 2.875rem;
    height: 2.875rem;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-sm);
  }

  .area-card__arrow .icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@media (min-width: 75em) {
  .area-card__title {
    min-height: calc(3 * 1.2em);
  }
}

/* ---- Colour variants ------------------------------------------------------- */
.area-card--rose {
  --area-bg: var(--color-rose-bg);
  --area-fg: var(--color-rose-fg);
}

.area-card--lavender {
  --area-bg: var(--color-lavender-bg);
  --area-fg: var(--color-lavender-fg);
}

.area-card--sky {
  --area-bg: var(--color-sky-bg);
  --area-fg: var(--color-sky-fg);
}

.area-card--mint {
  --area-bg: var(--color-mint-bg);
  --area-fg: var(--color-mint-fg);
}

.area-card--sun {
  --area-bg: var(--color-sun-bg);
  --area-fg: var(--color-sun-fg);
}

.area-card--peach {
  --area-bg: var(--color-peach-bg);
  --area-fg: var(--color-peach-fg);
}

}
@layer components {
/* ==========================================================================
   Feature — icon, title and one-line description, centred.
   ========================================================================== */

.feature {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--space-2);
  text-align: center;
}

.feature__icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: var(--space-1);
  color: var(--color-brand);
  stroke-width: 1.5;
}

.feature__title {
  font-size: var(--fs-h3);
}

.feature__text {
  max-width: 24ch;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

}
@layer components {
/* ==========================================================================
   Article card — photo + title + summary.
   The whole card is clickable through the title's .stretched-link.
   ========================================================================== */

.article-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: var(--space-4);
  height: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition:
    translate var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.article-card:hover {
  translate: 0 -4px;
  box-shadow: var(--shadow-card-hover);
}

.article-card:has(.stretched-link:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.article-card__image {
  width: 100%;
  height: 100%;
  min-height: 8.5rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: var(--radius-md);
}

.article-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2) var(--space-2) 0;
}

.article-card__title {
  font-size: var(--fs-h3);
  line-height: 1.25;
}

.article-card__category {
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--color-heading);
}

.article-card__date {
  font-size: var(--fs-2xs);
  color: var(--color-text-muted);
}

/* Summaries can be long; cards show the first three lines. */
.article-card__text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  font-size: var(--fs-2xs);
  color: var(--color-text-muted);
}

.article-card__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
  color: var(--color-accent);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.article-card__more .icon {
  width: 1.1em;
  height: 1.1em;
  transition: translate var(--duration) var(--ease);
}

.article-card:hover .article-card__more .icon {
  translate: 0.2em 0;
}

}
@layer components {
/* ==========================================================================
   Resource card — a printable material: cover page, summary and download.
   The whole card opens the resource page through the title's .stretched-link;
   the download button sits above that link and stays clickable.
   Mobile: small cover beside the tags and title, the rest below.
   From 40em: the cover becomes a column and the text sits beside it.
   ========================================================================== */

.resource-card {
  position: relative;
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition:
    translate var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.resource-card:hover {
  translate: 0 -4px;
  box-shadow: var(--shadow-card-hover);
}

.resource-card:has(.stretched-link:focus-visible) {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* The cover is a .pdf-page; here it only takes its place in the grid. */
.resource-card__image {
  grid-column: 1;
  grid-row: 1 / span 2;
}

/* Phones: the body's parts join the card grid (see the file header). */
.resource-card__body {
  display: contents;
}

.resource-card__meta {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-2xs);
  font-weight: 600;
}

.resource-card__title {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  line-height: 1.2;
}

.resource-card__text,
.resource-card__file,
.resource-card__download {
  grid-column: 1 / -1;
}

.resource-card__text {
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.resource-card__file {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--fs-2xs);
}

.resource-card__file .icon {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 1.75;
}

.resource-card__download {
  position: relative;
  z-index: 2; /* above the stretched link */
  justify-self: start;
  margin-top: var(--space-1);
  min-height: 2.75rem;
  padding: 0.55em 1.35em;
  font-size: var(--fs-xs);
}

@media (min-width: 40em) {
  .resource-card {
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-5);
  }

  .resource-card__image {
    grid-row: auto;
  }

  .resource-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .resource-card__meta,
  .resource-card__title {
    align-self: auto;
  }

  .resource-card__download {
    margin-top: var(--space-2);
  }
}

}
@layer components {
/* ==========================================================================
   Newsletter form — the provider's official form, restyled without replacing
   its behaviour: email gets more space than the optional first name, and the
   fields stack on small screens. While subscriptions are switched off in
   config/newsletter.js, a disabled placeholder field takes its place.
   ========================================================================== */

/* ---- Provider form ------------------------------------------------------------ */
.newsletter-form__provider {
  min-width: 0;
  max-width: 100%;
  min-block-size: 7.375rem;
}

/* Override the official embed's inline styles without replacing its behaviour. */
.newsletter-form__provider[data-newsletter-provider="emailoctopus"] .inline-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-family: inherit !important;
  --font-family: inherit;
}

.newsletter-form__provider .emailoctopus-form-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.newsletter-form__provider .main-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}

.newsletter-form__provider [eo-form-fields-container] {
  display: grid !important;
  grid-template-columns: minmax(0, 1.7fr) minmax(9rem, 1fr);
  gap: 8px !important;
  padding: 6px !important;
  border-radius: var(--radius-pill) !important;
  background: var(--color-surface) !important;
  box-shadow: var(--shadow-sm);
}

.newsletter-form__provider .emailoctopus-form-row {
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.newsletter-form__provider .form-control {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: transparent !important;
  color: var(--color-heading) !important;
  font: inherit !important;
  font-size: 16px !important;
  box-shadow: none !important;
}

.newsletter-form__provider .form-control::placeholder {
  color: var(--color-text-muted) !important;
  opacity: 1;
}

.newsletter-form__provider input[type="submit"] {
  width: 100% !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 12px 24px !important;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: var(--color-accent) !important;
  color: var(--color-on-accent) !important;
  font: inherit !important;
  font-weight: 700 !important;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.newsletter-form__provider input[type="submit"]:hover {
  background: var(--color-accent-hover) !important;
}

.newsletter-form__provider input:focus-visible {
  outline: 2px solid var(--color-focus) !important;
  outline-offset: 2px !important;
}

.newsletter-form__provider input[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.newsletter-form__provider .emailoctopus-success-message,
.newsletter-form__provider .emailoctopus-error-message {
  font: inherit !important;
  padding: 0 12px !important;
}

.newsletter-form__provider .emailoctopus-success-message {
  color: var(--color-success) !important;
}

.newsletter-form__provider .emailoctopus-error-message {
  color: var(--color-error) !important;
}

.newsletter-form__loading {
  padding: 12px;
  font-size: var(--fs-2xs);
}

@media (max-width: 30em) {
  .newsletter-form__provider {
    min-block-size: 10.875rem;
  }
  .newsletter-form__provider [eo-form-fields-container] {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 24px !important;
  }
}

/* ---- Note under either form ---------------------------------------------------- */
.newsletter-form__note {
  margin-top: var(--space-2);
  padding-inline: var(--space-3);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.newsletter-form__note a {
  color: var(--color-heading);
  text-decoration: underline;
}

/* ---- Placeholder while subscriptions are off ------------------------------------ */
.newsletter-form {
  display: grid;
  gap: var(--space-2);
}

.newsletter-form__field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1);
  padding-left: var(--space-5);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration) var(--ease);
}

.newsletter-form__field:focus-within {
  border-color: var(--color-focus);
}

.newsletter-form__input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  border: 0;
  background: none;
  font-size: var(--fs-sm);
  color: var(--color-heading);
}

.newsletter-form__input::placeholder {
  color: var(--color-text-muted);
}

/* The whole pill shows focus, so the bare input doesn't need its own ring. */
.newsletter-form__input:focus-visible {
  outline: none;
}

.newsletter-form__submit {
  flex-shrink: 0;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
}

.newsletter-form__submit-label {
  display: none;
}

@media (min-width: 48em) {
  .newsletter-form__submit {
    width: auto;
    padding-inline: var(--space-7);
  }

  .newsletter-form__submit-label {
    display: inline;
  }

  .newsletter-form__submit-icon {
    display: none;
  }
}

}
@layer components {
/* ==========================================================================
   Footer links — a titled column of links.
   ========================================================================== */

.footer-links__title {
  margin-bottom: var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--color-heading);
}

.footer-links__list {
  display: grid;
  gap: var(--space-1);
}

.footer-links__link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.footer-links__link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

}
@layer components {
/* ==========================================================================
   Social links — a row of .icon-button links (each has an aria-label).
   ========================================================================== */

.social-links {
  --icon-button-size: 2.5rem;
  --icon-size: 1.25rem;

  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-inline: calc((var(--icon-button-size) - var(--icon-size)) / -2); /* align the icons, not their hit areas */
}

.social-links__link:hover {
  background-color: var(--color-pink-100);
  color: var(--color-accent);
}

.social-links__link .icon {
  width: var(--icon-size);
  height: var(--icon-size);
  stroke-width: 1.75;
}

}
@layer components {
/* ==========================================================================
   Search dialog — native <dialog> with a live-filtered list of results.
   ========================================================================== */

.search-dialog {
  width: min(100% - 2 * var(--gutter), 36rem);
  max-height: min(80vh, 40rem);
  margin: 10vh auto auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-overlay);
  color: var(--color-text);
}

.search-dialog::backdrop {
  background-color: var(--color-backdrop);
  backdrop-filter: blur(3px);
}

.search-dialog[open] {
  animation: search-dialog-in var(--duration) var(--ease);
}

@keyframes search-dialog-in {
  from {
    opacity: 0;
    translate: 0 -0.75rem;
  }
}

.search-dialog__panel {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
}

.search-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.search-dialog__title {
  font-size: var(--fs-h3);
}

.search-dialog__form {
  --form-icon-inset: var(--space-4);
  --form-icon-size: 1.25rem;

  position: relative;
}

.search-dialog__form-icon {
  position: absolute;
  top: 50%;
  left: var(--form-icon-inset);
  width: var(--form-icon-size);
  height: var(--form-icon-size);
  translate: 0 -50%;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-dialog__input {
  width: 100%;
  min-height: 3.25rem;
  /* Text starts after the magnifier icon: inset + icon + the same inset as gap. */
  padding: 0 var(--space-5) 0 calc(var(--form-icon-inset) * 2 + var(--form-icon-size));
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-pill);
  background-color: var(--color-bg);
  color: var(--color-heading);
}

.search-dialog__input:focus-visible {
  outline: none;
  border-color: var(--color-focus);
}

.search-dialog__status {
  font-size: var(--fs-2xs);
  color: var(--color-text-muted);
}

.search-dialog__results {
  display: grid;
  gap: var(--space-2);
  max-height: 22rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ---- Result item ------------------------------------------------------------ */
.search-result {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color var(--duration) var(--ease);
}

.search-result:hover,
.search-result:focus-visible {
  background-color: var(--color-pink-50);
}

.search-result__title {
  font-family: var(--font-serif);
  font-weight: 650;
  color: var(--color-heading);
}

.search-result__text {
  font-size: var(--fs-2xs);
  color: var(--color-text-muted);
}

}
@layer components {
/* ==========================================================================
   Breadcrumb — "Início › Artigos › …"; the last item is the current page.
   ========================================================================== */

.breadcrumb {
  font-size: var(--fs-2xs);
  color: var(--color-text-muted);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "›" / "";
  color: var(--color-text-muted);
}

.breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: inherit;
  text-decoration: none;
}

.breadcrumb__link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.breadcrumb__home {
  width: 1em;
  height: 1em;
  stroke-width: 2;
}

}
@layer components {
/* ==========================================================================
   Tag — a small coloured pill (e.g. an article's category).
   Colour variants follow the area palettes.
   ========================================================================== */

.tag {
  display: inline-block;
  padding: 0.35em 0.9em;
  border-radius: var(--radius-pill);
  background-color: var(--tag-bg, var(--color-mint-200));
  color: var(--color-heading);
  font-size: var(--fs-2xs);
  font-weight: 600;
}

.tag--rose { --tag-bg: var(--color-pink-200); }
.tag--lavender { --tag-bg: var(--color-lavender-200); }
.tag--sky { --tag-bg: var(--color-sky-200); }
.tag--mint { --tag-bg: var(--color-mint-200); }
.tag--sun { --tag-bg: var(--color-sun-200); }
.tag--peach { --tag-bg: var(--color-peach-200); }

}
@layer components {
/* ==========================================================================
   Byline — author photo and name, date and reading time.
   ========================================================================== */

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.byline__photo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 62% 18%;
}

.byline__author {
  line-height: 1.35;
}

.byline__author strong {
  color: var(--color-heading);
}

.byline__author span {
  display: block;
}

.byline__meta {
  padding-left: var(--space-5);
  border-left: 1px solid var(--color-line);
}

}
@layer components {
/* ==========================================================================
   Table of contents — "Neste artigo vais encontrar", generated from the ## headings.
   Numbers use the same colour sequence as the section badges in .prose.
   ========================================================================== */

.toc {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background-color: var(--color-sky-50);
}

.toc__title {
  margin-bottom: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 800;
  letter-spacing: 0;
}

.toc__list {
  display: grid;
  gap: var(--space-3);
  counter-reset: toc;
}

.toc__item {
  display: grid;
  grid-template-columns: 1.625rem minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  line-height: 1.4;
  counter-increment: toc;
}

.toc__item::before {
  content: counter(toc);
  display: grid;
  place-items: center;
  width: 1.625rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--step-color);
  color: var(--color-heading);
  font-size: var(--fs-2xs);
  font-weight: 700;
}

.toc__item:nth-child(6n + 1) { --step-color: var(--color-step-1); }
.toc__item:nth-child(6n + 2) { --step-color: var(--color-step-2); }
.toc__item:nth-child(6n + 3) { --step-color: var(--color-step-3); }
.toc__item:nth-child(6n + 4) { --step-color: var(--color-step-4); }
.toc__item:nth-child(6n + 5) { --step-color: var(--color-step-5); }
.toc__item:nth-child(6n + 6) { --step-color: var(--color-step-6); }

.toc__link {
  padding-top: 0.15em;
  color: var(--color-text);
  text-decoration: none;
}

.toc__link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

}
@layer components {
/* ==========================================================================
   Quote card — a short motto in a soft card with decorations.
   ========================================================================== */

.quote-card {
  position: relative;
  padding: var(--space-9) var(--space-6) var(--space-8) var(--space-9);
  border-radius: var(--radius-xl);
  background-color: var(--color-rose-bg);
}

.quote-card__text {
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-heading);
  text-wrap: balance;
}

.quote-card__sun {
  position: absolute;
  top: var(--space-4);
  right: var(--space-5);
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-yellow-300);
  stroke-width: 1.75;
}

.quote-card__sparkle {
  position: absolute;
  top: 45%;
  left: var(--space-3);
  width: 2rem;
  height: 2rem;
  color: var(--color-sky-300);
}

.quote-card--blue {
  background-color: var(--color-sky-bg);
}

.quote-card--blue .quote-card__text {
  font-family: var(--font-hand);
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.quote-card__heart {
  position: absolute;
  right: var(--space-5);
  bottom: var(--space-3);
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-brand);
  rotate: -12deg;
}

}
@layer components {
/* ==========================================================================
   Prose — typography for rendered Markdown (the text of an article).
   Sections (##) are numbered automatically; the number badges cycle through
   --color-step-1…6, the same sequence as the table of contents.
   ========================================================================== */

.prose {
  counter-reset: section;
  font-size: var(--fs-prose);
  line-height: 1.7;
}

.prose > * + * {
  margin-top: var(--space-4);
}

.prose h2 {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  counter-increment: section;
}

.prose h2::before {
  content: counter(section);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.9em;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--step-color);
  font-size: 0.8em;
}

.prose h2:nth-of-type(6n + 1) { --step-color: var(--color-step-1); }
.prose h2:nth-of-type(6n + 2) { --step-color: var(--color-step-2); }
.prose h2:nth-of-type(6n + 3) { --step-color: var(--color-step-3); }
.prose h2:nth-of-type(6n + 4) { --step-color: var(--color-step-4); }
.prose h2:nth-of-type(6n + 5) { --step-color: var(--color-step-5); }
.prose h2:nth-of-type(6n + 6) { --step-color: var(--color-step-6); }

.prose h2 + * {
  margin-top: var(--space-3);
}

.prose strong {
  color: var(--color-heading);
}

.prose a {
  color: var(--color-accent);
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose li::marker {
  color: var(--color-accent);
}

.prose img {
  border-radius: var(--radius-lg);
}

}
@layer components {
/* ==========================================================================
   Callout — a highlighted sentence (":::destaque" in articles).
   ========================================================================== */

.callout {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  background-color: var(--color-sky-bg);
  color: var(--color-heading);
  font-weight: 700;
  text-align: center;
}

.callout > * {
  margin: 0;
}

.callout > div > * {
  margin: 0;
}

.callout > div > * + * {
  margin-top: var(--space-2);
}

.callout--rainbow {
  display: grid;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6);
  background-color: var(--color-pink-50);
  color: var(--color-text);
  font-weight: 400;
  text-align: left;
}

.callout__icon {
  width: 6rem;
  height: auto;
  aspect-ratio: 64 / 40;
}

.callout--alert,
.callout--reassurance {
  display: grid;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6);
  font-weight: 400;
  text-align: left;
}

.callout--alert {
  background-color: var(--color-pink-50);
  color: var(--color-text);
}

.callout--alert strong {
  color: var(--color-accent);
}

.callout--reassurance {
  background-color: var(--color-sky-bg);
  font-family: var(--font-hand);
  font-size: var(--fs-hand);
  line-height: 1.5;
}

.callout__symbol {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--color-accent);
  stroke-width: 1.5;
}

.callout--reassurance .callout__symbol {
  color: var(--color-sky-300);
}

@media (min-width: 40em) {
  .callout--rainbow,
  .callout--alert,
  .callout--reassurance {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

}
@layer components {
/* ==========================================================================
   Example cards — a row of cards with an icon (":::exemplo" in articles).
   Colours cycle rose → sun → mint.
   ========================================================================== */

.example-cards {
  display: grid;
  gap: var(--space-4);
}

.example-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background-color: var(--card-bg);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.example-card:nth-child(3n + 1) {
  --card-bg: var(--color-rose-bg);
  --card-badge: var(--color-pink-200);
}

.example-card:nth-child(3n + 2) {
  --card-bg: var(--color-sun-bg);
  --card-badge: var(--color-sun-200);
}

.example-card:nth-child(3n + 3) {
  --card-bg: var(--color-mint-bg);
  --card-badge: var(--color-mint-200);
}

.example-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  padding: 0.8rem;
  border-radius: 50%;
  background-color: var(--card-badge);
  color: var(--color-heading);
  stroke-width: 1.5;
}

.example-card__text > * {
  margin: 0;
}

@media (min-width: 48em) {
  .example-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .example-cards--two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.example-cards--two-columns .example-card {
  align-items: start;
}

.example-card__text h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-h3);
  font-weight: 750;
  line-height: 1.25;
}

.example-card__text h3 + p {
  margin-top: var(--space-2);
}

/* Age ranges and practical steps share the existing card markup. */
.example-cards--stages .example-card,
.example-cards--four-columns .example-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: start;
}

.example-cards--stages .example-card__icon,
.example-cards--four-columns .example-card__icon {
  align-self: center;
}

.example-cards--stages .example-card__text {
  display: contents;
}

.example-cards--stages h3 {
  order: -1;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background-color: var(--card-badge);
  font-size: var(--fs-body);
  text-align: center;
}

.example-cards--stages .example-card:nth-child(4n + 3),
.example-cards--four-columns .example-card:nth-child(4n + 3) {
  --card-bg: var(--color-sky-bg);
  --card-badge: var(--color-sky-200);
}

.example-cards--stages .example-card:nth-child(4n + 4),
.example-cards--four-columns .example-card:nth-child(4n + 4) {
  --card-bg: var(--color-mint-bg);
  --card-badge: var(--color-mint-200);
}

.example-cards--stages ul {
  padding-left: var(--space-4);
}

.example-cards--four-columns .example-card__text {
  text-align: center;
}

.example-cards--tips .example-card {
  padding: var(--space-4);
  gap: var(--space-3);
  font-size: var(--fs-xs);
}

.example-cards--tips .example-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: var(--space-2);
}

@media (min-width: 40em) {
  .example-cards--stages,
  .example-cards--four-columns,
  .example-cards--tips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .example-cards--stages,
  .example-cards--four-columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .example-cards--tips {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

}
@layer components {
/* ==========================================================================
   Side figure — an illustration beside the text (":::lateral" in articles).
   Its placement (in the side column on large screens) is set by the article page.
   ========================================================================== */

.side-figure {
  margin: 0;
}

.side-figure > p {
  margin: 0;
}

.side-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
}

/* Reserve room before lazy-loaded landscape photos arrive. */
.side-figure--landscape img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

}
@layer components {
/* ==========================================================================
   CTA banner — logo, short pitch and a button, in a soft pink card.
   Mobile: stacked and centred. From 64em: one row.
   ========================================================================== */

.cta-banner {
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-6) var(--space-7);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-pink-100), var(--color-pink-50));
  text-align: center;
}

.cta-banner__title {
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cta-banner__text p {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

@media (min-width: 64em) {
  .cta-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
    gap: var(--space-8);
    padding: var(--space-7) var(--space-9);
    text-align: left;
  }
}

}
@layer components {
/* ==========================================================================
   Author card — the author's introduction at the end of every article,
   before the newsletter banner: navy headings on a light sky background.
   ========================================================================== */

.author-card {
  --color-heading: var(--color-navy-800);

  display: grid;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background-color: var(--color-sky-100);
}

.author-card__media {
  position: relative;
  isolation: isolate;
  width: min(100%, 22rem);
  min-height: 15rem;
  margin-inline: auto;
  overflow: hidden;
}

.author-card__shape {
  --blob-color: var(--color-pink-100);
  position: absolute;
  z-index: -1;
  inset: 8% 3% -35% 10%;
  aspect-ratio: auto;
}

.author-card__photo {
  position: absolute;
  inset: 0 7% 0 auto;
  width: 80%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 48% 48% 0 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent);
}

.author-card__heart,
.author-card__sparkle {
  position: absolute;
  pointer-events: none;
}

.author-card__heart {
  left: 9%;
  bottom: 20%;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-brand);
  rotate: -15deg;
}

/* Larger than the default .sparkle. */
.author-card__sparkle {
  width: 2.75rem;
  height: 2.75rem;
}

.author-card__sparkle--left {
  top: 14%;
  left: 15%;
  rotate: 15deg;
  color: var(--color-sky-300);
}

.author-card__sparkle--right {
  right: 1%;
  bottom: 28%;
  rotate: 165deg;
}

.author-card__content {
  padding: var(--space-6);
  align-self: center;
}

.author-card__eyebrow {
  margin-bottom: var(--space-2);
  color: var(--color-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.author-card__name {
  font-family: var(--font-sans);
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1.25;
}

.author-card__name a {
  text-decoration: none;
}

.author-card__name a:hover {
  text-decoration: underline;
}

.author-card__role {
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
}

.author-card__bio {
  margin-top: var(--space-3);
  max-width: 65ch;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

@media (min-width: 48em) {
  .author-card {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 2fr);
  }

  .author-card__media {
    width: 100%;
  }

  .author-card__content {
    padding: var(--space-6) var(--space-8) var(--space-6) var(--space-4);
  }
}

}
@layer components {
/* ==========================================================================
   Photo blob — a photo clipped to a soft organic shape on a coloured background.
   Decorations and notes are placed around it by each page.

   Themable (custom properties, all optional):
     --photo-blob-ratio   box proportions (width / height)
     --photo-blob-color   background of the shape
     --photo-blob-inset   where the shape sits inside the box (leaves room for notes)
     --photo-blob-focus   which part of the photo stays visible (object-position)

   Default: the photo fills the shape.
   --cutout: for portraits with room around them; the photo sits bottom-right,
   leaving space on the left for decorations.
   ========================================================================== */

.photo-blob {
  position: relative;
  aspect-ratio: var(--photo-blob-ratio, 1.1);
}

.photo-blob__frame {
  --blob-color: var(--photo-blob-color, var(--color-rose-bg));

  position: absolute;
  inset: var(--photo-blob-inset, 0);
  aspect-ratio: auto; /* the insets decide the size, not .blob's square ratio */
  overflow: hidden;
}

.photo-blob__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--photo-blob-focus, 50% 30%);
}

/* ---- Cut-out portrait ------------------------------------------------------ */
.photo-blob--cutout .photo-blob__image {
  inset: auto 17% 0 auto;
  width: auto;
  height: 88%;
  /* Soft edges on three sides; the shape clips the bottom. */
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 15%, #000 85%, transparent),
    linear-gradient(to bottom, transparent, #000 12%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 15%, #000 85%, transparent),
    linear-gradient(to bottom, transparent, #000 12%);
  mask-composite: intersect;
}

}
@layer components {
/* ==========================================================================
   Page hero — the opening of a content page (article, story, resource):
   breadcrumb, title and lead beside a picture. Each page arranges the two
   columns and may adjust the title or lead through its own class.
   ========================================================================== */

.page-hero {
  padding-block: var(--space-6) var(--space-8);
}

.page-hero__content {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
}

.page-hero__title {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.page-hero__lead {
  max-width: 34em;
  font-size: var(--fs-lead);
  line-height: 1.55;
}

}
@layer components {
/* ==========================================================================
   PDF page — the preview image of a printable page (a resource's cover or
   inner pages). A4 proportions are reserved before the image loads.
   --outlined adds a hairline edge, so the white page stands out from its surroundings.
   ========================================================================== */

.pdf-page {
  width: 100%;
  aspect-ratio: 210 / 297;
  object-fit: contain;
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
}

.pdf-page--outlined {
  border: 1px solid var(--color-line);
}

}
@layer components {
/* ==========================================================================
   Icon card — a centred card with an icon badge, a title and optional text.
   Colours cycle rose → sun → mint → sky; optional decorative sparkle.
   ========================================================================== */

.icon-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
  background-color: var(--card-bg);
  text-align: center;
}

.icon-card:nth-child(4n + 1) {
  --card-bg: var(--color-rose-bg);
  --card-badge: var(--color-pink-200);
  --card-fg: var(--color-rose-fg);
}

.icon-card:nth-child(4n + 2) {
  --card-bg: var(--color-sun-bg);
  --card-badge: var(--color-sun-200);
  --card-fg: var(--color-sun-fg);
}

.icon-card:nth-child(4n + 3) {
  --card-bg: var(--color-mint-bg);
  --card-badge: var(--color-mint-200);
  --card-fg: var(--color-mint-fg);
}

.icon-card:nth-child(4n + 4) {
  --card-bg: var(--color-sky-bg);
  --card-badge: var(--color-sky-200);
  --card-fg: var(--color-sky-fg);
}

.icon-card__icon {
  width: 5rem;
  height: 5rem;
  margin-bottom: var(--space-1);
  padding: 1.25rem;
  border-radius: 50%;
  background-color: var(--card-badge);
  color: var(--card-fg);
  stroke-width: 2;
}

.icon-card__title {
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-heading);
  text-wrap: balance;
}

.icon-card__text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.icon-card__sparkle {
  position: absolute;
  top: var(--space-5);
  right: 18%;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--card-fg);
  stroke-width: 3.5;
  rotate: 180deg;
  scale: -1 1;
}

}
@layer components {
/* ==========================================================================
   Panel — a soft coloured card with an icon, a title and a few paragraphs.
   Colour variants: --sky, --rose.
   ========================================================================== */

.panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-7) var(--space-6);
  border-radius: var(--radius-xl);
  background-color: var(--panel-bg, var(--color-sky-50));
}

.panel--sky { --panel-bg: var(--color-sky-50); }
.panel--rose { --panel-bg: var(--color-rose-bg); }

.panel__icon {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--color-brand);
  stroke-width: 1.75;
}

.panel__title {
  padding-right: var(--space-7); /* room for the sparkle */
  font-family: var(--font-sans);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.panel__body {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.panel__sparkle {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-sky-300);
  rotate: 180deg;
  scale: -1 1;
}

}
@layer components {
/* ==========================================================================
   Display heading — the bold sans section title used by the newer page designs
   (the default h2 elsewhere is the serif).
   ========================================================================== */

.display-heading {
  font-family: var(--font-sans);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

}

/* Layout */
@layer layout {
/* ==========================================================================
   Container — centres content and keeps a fluid gutter on small screens.
   ========================================================================== */

.container {
  width: min(100% - 2 * var(--gutter), var(--container-size, var(--container-max)));
  margin-inline: auto;
}

.container--wide {
  --container-size: var(--container-wide);
}

}
@layer layout {
/* ==========================================================================
   Auto grid — as many equal columns as fit, each at least --auto-grid-min wide.
   Used for lists of cards (featured content, article list, icon cards).

   --auto-grid-fill: auto-fill (default) keeps empty columns, so one card stays
   card-sized; auto-fit stretches a fixed set of cards across the full width.
   ========================================================================== */

.auto-grid {
  display: grid;
  grid-template-columns: repeat(
    var(--auto-grid-fill, auto-fill),
    minmax(min(100%, var(--auto-grid-min, 18rem)), 1fr)
  );
  gap: var(--auto-grid-gap, var(--space-5));
}

}
@layer layout {
/* ==========================================================================
   Split — two columns from 64em (typically text + image); stacked below.
   Column proportions are themable: --split-start / --split-end.
   ========================================================================== */

.split {
  display: grid;
  align-items: center;
  gap: var(--split-gap, var(--space-8));
}

@media (min-width: 64em) {
  .split {
    grid-template-columns: minmax(0, var(--split-start, 1.3fr)) minmax(0, var(--split-end, 1fr));
  }
}

}
@layer layout {
/* ==========================================================================
   Site header — logo, navigation and actions.
   Mobile/tablet: the menu is a dropdown panel opened by the toggle button.
   From 72em: everything sits on one row and the toggle is hidden.
   ========================================================================== */

.site-header {
  position: relative;
  z-index: 10;
  overflow-x: clip;
  background-color: var(--color-bg);
}

/* Soft curved bottom edge that overlaps the hero (wider than the header, hence the clip above). */
.site-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: -60% -15%;
  top: calc(100% - 1.75rem);
  height: 3.5rem;
  border-radius: 50%;
  background-color: inherit;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4) var(--space-2);
}

/* ---- Toggle (hamburger, an .icon-button) ------------------------------- */
.site-header__toggle {
  margin-right: calc(var(--space-2) * -1); /* optically align the icon with the gutter */
  color: var(--color-heading);
}

.site-header__toggle-icon {
  grid-area: 1 / 1;
  width: 2.25rem;
  height: 2.25rem;
  stroke-width: 2.25;
}

.site-header__toggle-icon--close,
.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon--open {
  display: none;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon--close {
  display: block;
}

/* ---- Menu panel ---------------------------------------------------------- */
.site-header__menu {
  position: absolute;
  top: 100%;
  inset-inline: var(--gutter);
  display: grid;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5) var(--space-5);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-overlay);
  opacity: 0;
  visibility: hidden;
  translate: 0 -0.5rem;
  transition:
    opacity var(--duration) var(--ease),
    translate var(--duration) var(--ease),
    visibility 0s linear var(--duration);
}

.site-header__menu.is-open {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  transition-delay: 0s;
}

.site-header__actions {
  display: grid;
  gap: var(--space-3);
}

.site-header__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-icon);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease);
}

.site-header__search:hover {
  background-color: var(--color-pink-50);
}

/* ---- Desktop --------------------------------------------------------------- */
@media (min-width: 72em) {
  .site-header__inner {
    padding-block: var(--space-5) var(--space-3);
  }

  .site-header__toggle {
    display: none;
  }

  .site-header__menu {
    position: static;
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--space-7);
    padding: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    translate: none;
    transition: none;
  }

  .site-header__nav {
    margin-inline: auto;
  }

  .site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-5);
  }

  .site-header__search {
    width: 2.75rem;
    min-height: 2.75rem;
    border: 0;
    border-radius: 50%;
  }

  .site-header__search .icon {
    width: 1.4rem;
    height: 1.4rem;
  }

  .site-header__search-label {
    display: none;
  }
}

}
@layer layout {
/* ==========================================================================
   Site footer — brand blurb, link columns, social links and legal line.
   ========================================================================== */

.site-footer {
  padding-block: var(--space-9) var(--space-8);
  font-size: var(--fs-2xs);
  color: var(--color-text-muted);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-8);
}

.site-footer__brand {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
}

.site-footer__about {
  max-width: 34ch;
  line-height: 1.6;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-6);
}

.site-footer__aside {
  display: grid;
  align-content: space-between;
  gap: var(--space-6);
}

.site-footer__legal {
  line-height: 1.6;
  color: var(--color-text);
}

.site-footer__heart {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  margin-left: var(--space-1);
  vertical-align: -0.3em;
  color: var(--color-heading);
  stroke-width: 1.75;
}

.site-footer__credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
  font-size: 0.75rem;
  line-height: 1.5;
}

.site-footer__credits a {
  text-decoration: underline;
}

.site-footer__newsletter-credit:empty {
  display: none;
}

.site-footer__newsletter-credit .mastfoot {
  margin: 0;
  padding: 0;
}

.site-footer__newsletter-credit p {
  /* The official badge already includes "Powered by". */
  font-size: 0;
}

.site-footer__newsletter-credit a {
  display: inline-block;
  width: 160px;
  height: 24px;
  vertical-align: middle;
  font-size: 0;
  background: url("https://gallery.eo.page/tentacles/icons/v1/powered-by/badge.svg") center / contain no-repeat;
}

@media (min-width: 64em) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr) auto;
    align-items: start;
  }

  .site-footer__nav {
    grid-template-columns: repeat(2, auto);
    justify-content: space-around;
  }

  .site-footer__aside {
    align-self: stretch;
  }
}

}

/* Sections */
@layer sections {
/* ==========================================================================
   Hero — headline, intro, calls to action and the photo with notes.
   Mobile: photo on top, text below. From 64em: two columns.
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: var(--space-7) var(--space-9);
  background-color: var(--color-bg-warm);
}

/* Soft wave into the next section. */
.hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset-inline: -50% -20%;
  bottom: -2.25rem;
  height: 4.5rem;
  border-radius: 50%;
  background-color: var(--color-bg);
}

.hero__inner {
  display: grid;
  gap: var(--space-4);
}

/* ---- Text ------------------------------------------------------------------ */
.hero__content {
  position: relative;
  z-index: 3;
}

.hero__eyebrow {
  display: none;
  margin-bottom: var(--space-5);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero__title-accent {
  display: block;
  color: var(--color-brand);
}

.hero__lead {
  max-width: 34em;
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.hero__actions {
  display: grid;
  gap: var(--space-3);
  width: min(100%, 17rem);
  margin: var(--space-7) auto 0;
}

/* ---- Media ------------------------------------------------------------------ */
.hero__media {
  position: relative;
  order: -1;
  height: clamp(14rem, 62vw, 22rem);
  margin-inline: calc(var(--gutter) * -1);
}

.hero__image {
  position: absolute;
  bottom: 0;
  left: 8%;
  width: min(62%, 22rem);
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent);
  mask-composite: intersect;
}

.hero__note {
  position: absolute;
  top: 12%;
  right: 5%;
  width: 6.2em;
}

.hero__bubble {
  display: none;
}

.hero__sparkle {
  position: absolute;
  top: 40%;
  left: 2%;
}

.hero__blob {
  --blob-color: var(--color-peach-200);

  position: absolute;
  z-index: -1;
  right: 3%;
  bottom: -4%;
  width: min(20%, 7rem);
}

/* ---- Tablet: buttons follow the left-aligned text ------------------------------- */
@media (min-width: 40em) {
  .hero__actions {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    margin: var(--space-7) 0 0;
  }
}

/* ---- Desktop -------------------------------------------------------------------- */
@media (min-width: 64em) {
  .hero {
    padding-block: 0;
  }

  /* Pink blob peeking in from the left edge. */
  .hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: -3.5rem;
    bottom: 1rem;
    width: 8rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--color-pink-100);
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: clamp(31rem, 40vw, 36rem);
  }

  .hero__content {
    align-self: center;
    padding-block: var(--space-10) var(--space-11);
  }

  .hero__eyebrow {
    display: block;
  }

  .hero__media {
    order: 0;
    height: auto;
    margin-inline: 0;
  }

  .hero__image {
    left: 4%;
    width: 62%;
    object-position: 50% 0;
    -webkit-mask-image:
      linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
      linear-gradient(to bottom, transparent, #000 10%);
    mask-image:
      linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
      linear-gradient(to bottom, transparent, #000 10%);
  }

  .hero__note {
    top: 10%;
    right: 3%;
  }

  .hero__bubble {
    --blob-color: var(--color-pink-200);

    position: absolute;
    top: 40%;
    right: -3%;
    display: grid;
    place-items: center;
    width: 12.5rem;
    aspect-ratio: 1.05;
    padding: var(--space-6);
    font-size: 1.2rem;
    text-align: center;
  }

  .hero__sparkle {
    top: 10%;
    left: -1%;
    width: 3.25rem;
    height: 3.25rem;
  }

  .hero__blob {
    --blob-color: var(--color-mint-200);

    right: auto;
    left: -4%;
    bottom: 7%;
    width: 5.5rem;
  }
}

}
@layer sections {
/* ==========================================================================
   Areas — the six Falaí areas.
   1 column (horizontal cards) → 3 columns (40em) → 6 columns (75em).
   ========================================================================== */

.areas {
  padding-block: var(--space-4) var(--section-space);
}

/* In the design this title uses the display sans, like the hero headline. */
.areas__title {
  font-family: var(--font-sans);
  font-size: clamp(1.875rem, 1.2rem + 2.8vw, 3.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.areas__grid {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 40em) {
  .areas__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

@media (min-width: 75em) {
  .areas__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-3);
  }
}

}
@layer sections {
/* ==========================================================================
   About — "Por trás do Falaí": photo with a handwritten hello + intro text.
   Desktop: the photo sits directly on top of the audiences strip below.
   ========================================================================== */

.about {
  padding-block: var(--space-4) var(--section-space);
}

.about__inner {
  display: grid;
  gap: var(--space-6);
}

.about__media {
  position: relative;
  width: min(100%, 30rem);
  margin-inline: auto;
}

.about__image {
  width: 100%;
  aspect-ratio: 1.1;
  height: auto;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: var(--radius-xl) 45% 0 0 / var(--radius-xl) 30% 0 0;
}

.about__note {
  position: absolute;
  top: 10%;
  right: 4%;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-translucent);
  rotate: 8deg;
}

.about__content {
  position: relative;
  display: grid;
  justify-items: start;
  gap: var(--space-4);
}

.about__title {
  font-size: var(--fs-h2);
}

.about__text {
  max-width: 36em;
  font-size: var(--fs-lead);
  line-height: 1.6;
}

.about__cta {
  margin-top: var(--space-2);
}

.about__sparkle {
  display: none;
}

@media (min-width: 64em) {
  .about {
    padding-block: var(--space-7) 0;
  }

  .about__inner {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-9);
  }

  .about__media {
    align-self: end;
    margin-inline: 0;
  }

  .about__image {
    border-radius: var(--radius-xl) 38% 0 0 / var(--radius-xl) 42% 0 0;
  }

  .about__content {
    padding-block: var(--space-7) var(--space-9);
  }

  .about__sparkle {
    position: absolute;
    top: var(--space-3);
    right: 4%;
    display: block;
    width: 4rem;
    height: 4rem;
    scale: -1 1;
    rotate: -25deg;
  }
}

}
@layer sections {
/* ==========================================================================
   Audiences — pink strip: for families, for educators, science-based.
   ========================================================================== */

.audiences__list {
  display: grid;
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--color-pink-100), var(--color-pink-50));
}

.audiences__item {
  padding-block: var(--space-6);
}

.audiences__item + .audiences__item {
  border-top: 1px solid var(--color-pink-200);
}

@media (min-width: 48em) {
  .audiences__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: var(--space-8) var(--space-4);
  }

  .audiences__item {
    padding: var(--space-2) var(--space-5);
  }

  .audiences__item + .audiences__item {
    border-top: 0;
    border-left: 1px solid var(--color-pink-200);
  }
}

}
@layer sections {
/* ==========================================================================
   Featured content — the latest articles (cards laid out by .auto-grid).
   ========================================================================== */

.featured {
  padding-block: var(--space-9);
}

}
@layer sections {
/* ==========================================================================
   Newsletter — pink card with the subscription form.
   Mobile: icon + intro, form below. From 64em: one row.
   ========================================================================== */

.newsletter__card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon intro"
    "form form";
  gap: var(--space-5) var(--space-4);
  padding: var(--space-7) var(--space-5);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-pink-100), var(--color-pink-50));
}

.newsletter__icon {
  grid-area: icon;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-brand);
  stroke-width: 1.5;
}

.newsletter__intro {
  grid-area: intro;
  display: grid;
  gap: var(--space-1);
}

.newsletter__title {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

.newsletter__text {
  font-size: var(--fs-2xs);
  color: var(--color-text-muted);
}

.newsletter__form {
  grid-area: form;
}

@media (min-width: 64em) {
  .newsletter__card {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 27rem);
    grid-template-areas: "icon intro form";
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-7) var(--space-10);
  }

  .newsletter__icon {
    width: 3rem;
    height: 3rem;
  }
}

}
@layer sections {
/* ==========================================================================
   Article page — hero, body with a side column, and closing blocks.

   Side column (from 64em): the table of contents, the quote and every
   ":::lateral" image float into a right-hand column (a "margin notes" layout).
   `clear: right` stacks them without ever overlapping, whatever the text length.
   Wide blocks (example cards, callout) stretch across both columns.
   Rendered Markdown can't carry BEM mixes, hence the `.article__prose > …` selectors.
   ========================================================================== */

/* ---- Hero (a .page-hero) ------------------------------------------------------ */
.article-hero__content {
  align-content: center;
}

.article-hero__subtitle {
  font-size: var(--fs-lead);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-heading);
}

.article-hero__lead {
  max-width: 36em;
}

.article-hero__byline {
  margin-top: var(--space-2);
}

/* A .photo-blob (cut-out variant): the pink shape clips any photo to the same outline. */
.article-hero__media {
  --photo-blob-inset: 0 5%;

  width: min(100%, 26rem);
  margin-inline: auto;
}

.article-hero__bubble {
  position: absolute;
  top: 26%;
  left: 7%;
  width: 22%;
  aspect-ratio: 48 / 40;
  height: auto;
  color: var(--color-sky-300);
}

.article-hero__heart {
  position: absolute;
  bottom: 22%;
  left: 18%;
  width: 11%;
  aspect-ratio: 1;
  height: auto;
  color: var(--color-brand);
  rotate: -12deg;
}

.article-hero__sparkle {
  position: absolute;
  width: 12%;
  aspect-ratio: 1;
  height: auto;
}

.article-hero__sparkle--top {
  top: 6%;
  left: 14%;
  color: var(--color-sky-300);
  rotate: 70deg;
}

.article-hero__sparkle--bottom {
  bottom: 6%;
  left: 3%;
  color: var(--color-sky-300);
  rotate: -40deg;
}

.article-hero__note {
  position: absolute;
  right: -2%;
  bottom: 16%;
  width: 6.2em;
}

/* ---- Body --------------------------------------------------------------------- */
.article__body {
  --aside-width: 20rem;
  --aside-gap: clamp(2rem, 4vw, 4rem);
  --into-aside: calc(-1 * (var(--aside-width) + var(--aside-gap)));

  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  padding-bottom: var(--space-10);
}

/* Phones: the quote comes after the text. */
.article__quote {
  order: 1;
}

.article__prose > .side-figure {
  width: min(100%, 20rem);
  margin-inline: auto;
}

/* ---- Closing blocks --------------------------------------------------------------- */
.article__footer {
  display: grid;
  gap: var(--space-8);
  padding-bottom: var(--section-space);
}

/* ---- Desktop ------------------------------------------------------------------------ */
@media (min-width: 64em) {
  .article-hero__media {
    width: min(100%, 30rem);
  }

  .article__body {
    display: flow-root;
    padding-right: calc(var(--aside-width) + var(--aside-gap));
  }

  .article__toc,
  .article__quote,
  .article__prose > .side-figure {
    float: right;
    clear: right;
    width: var(--aside-width);
    margin: 0 var(--into-aside) var(--space-6) 0;
  }

  .article__prose > .example-cards,
  .article__prose > .callout {
    clear: right;
    margin-right: var(--into-aside);
  }

  /* Short sections need compact photos to keep each one beside its text. */
  .article__prose > .side-figure--landscape {
    width: min(var(--aside-width), 14rem);
  }
}

}
@layer sections {
/* ==========================================================================
   Article list (/artigos/) — breadcrumb, heading, area filters and a grid of
   article cards. The filters appear once the script has started.
   ========================================================================== */

.article-list {
  padding-block: var(--space-6) var(--section-space);
}

.article-list__inner {
  display: grid;
  gap: var(--space-6);
}

/* The filter script hides cards and messages: no display rule may undo it. */
.article-list [hidden] {
  display: none !important;
}

/* Rows with a title or count on the left and an action or note on the right. */
.article-filters__heading,
.article-list__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---- Filters ------------------------------------------------------------------- */
.article-filters__heading {
  margin-bottom: var(--space-4);
}

.article-filters__title {
  font-size: var(--fs-h3);
}

.article-filters__all {
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-heading);
  border-radius: var(--radius-pill);
  color: var(--color-heading);
  font-weight: 600;
  background: transparent;
  cursor: pointer;
}

.article-filters__all[aria-pressed="true"] {
  background: var(--color-heading);
  color: var(--color-surface);
}

.article-filters__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.article-filters__button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--area-bg);
  color: var(--color-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.article-filters__button:hover,
.article-filters__button[aria-pressed="true"] {
  border-color: var(--color-heading);
}

.article-filters__button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px var(--color-heading);
}

.article-filters__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--area-fg);
}

/* ---- Results ------------------------------------------------------------------- */
.article-list__summary {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.article-list__empty {
  padding: var(--space-9) var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--color-bg-warm);
  text-align: center;
}

.article-list__empty h2 {
  font-size: var(--fs-h3);
}

.article-list__empty p {
  margin-block: var(--space-3) var(--space-5);
}

@media (min-width: 40em) {
  .article-filters__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .article-filters__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

}
@layer sections {
/* Resource library — the areas (those with materials first, the others clearly
   unavailable) and each open area's page with its materials. The message card
   (.resource-empty) is also used by the 404 page. */
.resources {
  padding-block: var(--space-6) var(--section-space);
}

.resources__inner {
  display: grid;
  gap: var(--space-6);
}

.resource-library {
  padding: clamp(1rem, 0.5rem + 2vw, 2.5rem);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.resource-library__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-line);
}

.resource-library__icon,
.resource-empty__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: var(--color-pink-50);
  color: var(--color-accent);
}

.resource-library__icon .icon,
.resource-empty__icon .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.resource-library__title,
.resource-category__title {
  font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.resource-library__intro {
  max-width: 56ch;
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.resource-library__list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.resource-area {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "icon body status arrow";
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
}

.resource-area--enabled {
  border-color: var(--color-pink-200);
  background: var(--color-pink-50);
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.resource-area--enabled:hover {
  background: var(--color-pink-100);
  border-color: var(--color-accent);
}

.resource-area__symbol {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: var(--area-bg);
  color: var(--area-fg);
}

.resource-area__symbol .icon {
  width: 1.875rem;
  height: 1.875rem;
  stroke-width: 1.75;
}

.resource-area__body {
  grid-area: body;
  min-width: 0;
}

.resource-area__title {
  font-size: var(--fs-h3);
  line-height: 1.25;
}

.resource-area__summary {
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.resource-area__status {
  grid-area: status;
  justify-self: start;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--color-accent);
  background: var(--color-surface);
  font-size: var(--fs-2xs);
  font-weight: 600;
  white-space: nowrap;
}

.resource-area__arrow {
  grid-area: arrow;
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
  color: var(--color-accent);
}

.resource-area--disabled {
  background: var(--color-bg-warm);
  color: var(--color-text-muted);
}

.resource-area--disabled .resource-area__title,
.resource-area--disabled .resource-area__arrow {
  color: inherit;
}

.resource-area--disabled .resource-area__symbol {
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.resource-area--disabled .resource-area__status {
  color: var(--color-text-muted);
  background: var(--color-line);
}

.resource-area--disabled .resource-area__arrow {
  opacity: 0.45;
}

.resource-category__header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding-block: var(--space-3);
}

.resource-category__eyebrow {
  margin-bottom: var(--space-2);
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--color-accent);
}

.resource-category__summary {
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
}

.resource-category__list {
  display: grid;
  gap: var(--space-5);
}

.resource-category__more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-5) var(--space-6);
  border: 1.5px dashed var(--color-pink-200);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  text-align: center;
}

.resource-category__sparkle {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 3;
}

.resource-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: clamp(1.5rem, 1rem + 3vw, 4rem);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  text-align: center;
}

.resource-empty__label {
  color: var(--color-accent);
  font-size: var(--fs-2xs);
  font-weight: 700;
}

.resource-empty > p:not([class]) {
  max-width: 54ch;
  line-height: 1.65;
}

.resource-empty__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

@media (max-width: 40em) {
  .resource-library__header {
    align-items: start;
    gap: var(--space-3);
  }

  .resource-library__icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .resource-area {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icon body arrow" ". status .";
    gap: var(--space-2) var(--space-3);
    padding: var(--space-4);
  }

  .resource-area__symbol {
    width: 2.75rem;
    height: 2.75rem;
  }

  .resource-area__symbol .icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .resource-area__title {
    font-size: 1rem;
  }

  .resource-area__summary {
    font-size: var(--fs-xs);
  }

  .resource-category__header {
    align-items: start;
    gap: var(--space-3);
  }
}

}
@layer sections {
/* ==========================================================================
   Resource page — one printable material: what it is, who it is for, how to
   use it, page previews and the download. Aligned with the header, like the
   article pages. The cover's back sheet takes the area colour through an
   .area-card--* mix.
   ========================================================================== */

/* ---- Hero (a .page-hero) ------------------------------------------------------ */
.resource-hero__layout {
  display: grid;
  align-items: center;
  gap: var(--space-8);
}

.resource-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.resource-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: var(--space-3);
  width: 100%;
  margin-top: var(--space-2);
}

.resource-facts__item {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background-color: var(--color-lavender-bg);
}

.resource-facts__item:nth-child(2) {
  background-color: var(--color-mint-bg);
}

.resource-facts__label {
  color: var(--color-text-muted);
  font-size: var(--fs-2xs);
  font-weight: 700;
}

.resource-facts__value {
  margin-top: var(--space-1);
  color: var(--color-heading);
  font-weight: 700;
}

.resource-hero__note {
  color: var(--color-text-muted);
  font-size: var(--fs-2xs);
  font-style: italic;
}

.resource-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-3);
}

.resource-download__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}

.resource-download__meta .icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 1.75;
}

/* The cover as a printed sheet lying on a tilted sheet of the area's colour. */
.resource-hero__media {
  position: relative;
  isolation: isolate;
  width: min(75%, 15rem);
  margin-inline: auto;
}

.resource-hero__media::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: var(--radius-md);
  background-color: var(--area-bg, var(--color-lavender-bg));
  rotate: -6deg;
}

.resource-hero__cover {
  box-shadow: var(--shadow-card-hover);
  rotate: 2deg;
}

.resource-hero__sparkle {
  position: absolute;
  width: 15%;
  height: auto;
  aspect-ratio: 1;
}

.resource-hero__sparkle--top {
  top: -6%;
  right: -10%;
  rotate: 20deg;
}

.resource-hero__sparkle--bottom {
  bottom: 4%;
  left: -14%;
  color: var(--color-sky-300);
  rotate: -30deg;
}

/* ---- Body ------------------------------------------------------------------ */
.resource__body {
  display: grid;
  gap: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding-bottom: var(--section-space);
}

.resource-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.5rem), 1fr));
  gap: var(--space-3);
}

.resource-highlights__item {
  display: grid;
  align-content: start;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.resource-highlights__value {
  color: var(--color-heading);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.resource-section {
  display: grid;
  gap: var(--space-5);
}

.resource-section__title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.2;
}

.resource-section > p {
  max-width: 62ch;
  line-height: 1.7;
}

.resource-section__lead {
  font-size: var(--fs-lead);
}

/* Levels: one soft card each, mint then rose (as in the PDF). */
.resource-levels {
  display: grid;
  gap: var(--space-4);
}

.resource-level {
  --level-bg: var(--color-mint-bg);
  --level-badge: var(--color-mint-200);

  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--space-2);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background-color: var(--level-bg);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.resource-level:nth-child(even) {
  --level-bg: var(--color-rose-bg);
  --level-badge: var(--color-pink-200);
}

.resource-level__badge {
  padding: 0.3em 0.9em;
  border-radius: var(--radius-pill);
  background-color: var(--level-badge);
  color: var(--color-heading);
  font-size: var(--fs-2xs);
  font-weight: 700;
}

.resource-level__title {
  font-size: var(--fs-h3);
  line-height: 1.25;
}

/* Steps: numbered cards; the numbers use the site's step colours. */
.resource-steps {
  display: grid;
  gap: var(--space-4);
  counter-reset: resource-step;
}

.resource-step {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + 2.5rem + var(--space-4));
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  font-size: var(--fs-sm);
  line-height: 1.6;
  counter-increment: resource-step;
}

.resource-step::before {
  content: counter(resource-step);
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
  display: grid;
  place-items: center;
  width: 2.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--step-color);
  color: var(--color-heading);
  font-weight: 800;
}

.resource-step:nth-child(4n + 1) { --step-color: var(--color-step-1); }
.resource-step:nth-child(4n + 2) { --step-color: var(--color-step-2); }
.resource-step:nth-child(4n + 3) { --step-color: var(--color-step-3); }
.resource-step:nth-child(4n + 4) { --step-color: var(--color-step-4); }

.resource-step__title {
  padding-top: 0.4rem;
  font-size: var(--fs-h3);
  line-height: 1.25;
}

.resource-step__note {
  margin-top: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background-color: var(--color-sky-50);
  color: var(--color-heading);
  font-size: var(--fs-xs);
}

/* Skills: soft pills, alternating mint and lavender. */
.resource-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.resource-skills__item {
  padding: 0.5em 1em;
  border-radius: var(--radius-pill);
  background-color: var(--color-mint-bg);
  color: var(--color-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.resource-skills__item:nth-child(even) {
  background-color: var(--color-lavender-bg);
}

.resource-tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  background-color: var(--color-sun-bg);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.resource-tip__icon {
  width: 2rem;
  height: 2rem;
  color: var(--color-sun-fg);
  stroke-width: 1.75;
}

.resource-tip__title {
  color: var(--color-heading);
  font-weight: 700;
}

/* Previews: printed pages with a caption. */
.resource-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-4);
}

.resource-preview {
  display: grid;
  gap: var(--space-3);
}

.resource-preview__image {
  box-shadow: var(--shadow-card);
}

.resource-preview__caption {
  display: grid;
  gap: 0.125rem;
  color: var(--color-text-muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.resource-preview__caption strong {
  color: var(--color-heading);
  font-size: var(--fs-xs);
}

/* ---- Larger screens ------------------------------------------------------------ */
@media (min-width: 40em) {
  .resource-highlights__item {
    padding: var(--space-5) var(--space-6);
    font-size: var(--fs-sm);
  }
}

@media (min-width: 48em) {
  .resource-hero__layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: var(--space-9);
  }

  .resource-hero__media {
    width: min(85%, 20rem);
  }

  .resource-levels,
  .resource-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-previews {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

}
@layer sections {
/* ==========================================================================
   Story page ("A minha história") — hero, intro with questions and panels,
   "Depois tornei-me mãe" and "O que quero que encontres aqui".
   ========================================================================== */

/* ---- Hero (a .page-hero with a larger title) ------------------------------------ */
.story-hero__title {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.story-hero__title-sparkle {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.1em;
  vertical-align: top;
  rotate: 150deg;
}

.story-hero__subtitle {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-heading);
}

.story-hero__squiggle {
  justify-self: center;
  width: 9rem;
  height: auto;
  aspect-ratio: 120 / 40;
  color: var(--color-brand);
  stroke-width: 2.5;
}

.story-hero__media {
  --photo-blob-ratio: 1;
  --photo-blob-inset: 0 20% 0 0;
  --photo-blob-focus: 50% 20%;

  width: min(100%, 32rem);
  margin-inline: auto;
}

.story-hero__sparkle {
  position: absolute;
  width: 12%;
  height: auto;
  aspect-ratio: 1;
}

.story-hero__sparkle--left {
  top: 24%;
  left: -2%;
  color: var(--color-yellow-300);
}

.story-hero__sparkle--top {
  top: -2%;
  right: 10%;
  color: var(--color-sky-300);
  rotate: 110deg;
}

.story-hero__note {
  --blob-color: var(--color-pink-100);

  position: absolute;
  top: 20%;
  right: -2%;
  display: grid;
  place-items: center;
  width: 8.5em;
  padding: var(--space-6) var(--space-5);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  text-align: center;
  rotate: -10deg;
}

/* ---- Intro: questions and panels -------------------------------------------------- */
.story-intro {
  padding-block: var(--space-8) var(--space-9);
}

.story-intro__inner {
  display: grid;
  gap: var(--space-7);
}

.story-intro__text {
  display: grid;
  gap: var(--space-3);
  max-width: 44em;
  font-size: var(--fs-lead);
}

.story-intro__title {
  margin-bottom: var(--space-2);
}

/* Short questions: 2 × 2 on phones, one row of four from tablets. */
.story-intro__questions {
  --auto-grid-fill: auto-fit;
  --auto-grid-min: 9.5rem;
  --auto-grid-gap: var(--space-3);
}

.story-intro__panels {
  display: grid;
  gap: var(--space-5);
}

.story-intro__bulb {
  color: var(--color-sun-fg);
}

/* ---- Depois tornei-me mãe ------------------------------------------------------------ */
.story-mother {
  padding-bottom: var(--space-9);
}

.story-mother__inner {
  --split-start: 1.1fr;
  --split-end: 1fr;
}

.story-mother__content {
  display: grid;
  gap: var(--space-3);
  max-width: 38em;
}

.story-mother__subtitle {
  font-weight: 700;
  color: var(--color-heading);
}

.story-mother__media {
  --photo-blob-ratio: 1.1;
  --photo-blob-color: var(--color-sun-bg);
  --photo-blob-focus: 50% 20%;

  width: min(100%, 34rem);
  margin-inline: auto;
}

.story-mother__sun {
  position: absolute;
  top: -4%;
  right: 2%;
  width: 16%;
  height: auto;
  aspect-ratio: 1;
  color: var(--color-yellow-300);
  stroke-width: 1.75;
}

.story-mother__sparkle {
  position: absolute;
  top: 16%;
  left: 3%;
  width: 12%;
  height: auto;
  aspect-ratio: 1;
  color: var(--color-sky-300);
}

.story-mother__heart {
  position: absolute;
  top: 48%;
  left: 2%;
  width: 11%;
  height: auto;
  aspect-ratio: 1;
  color: var(--color-brand);
  rotate: -12deg;
}

/* ---- O que quero que encontres aqui -------------------------------------------------- */
.story-promises {
  padding-bottom: var(--section-space);
}

.story-promises__panel {
  display: grid;
  gap: var(--space-7);
  padding: var(--space-8) var(--space-5);
  border-radius: var(--radius-xl);
  background-color: var(--color-sky-50);
}

.story-promises__list {
  --auto-grid-fill: auto-fit;
  --auto-grid-min: 15rem;
}

/* ---- Tablet & desktop ------------------------------------------------------------------ */
@media (min-width: 48em) {
  .story-intro__panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-promises__panel {
    padding: var(--space-9) var(--space-8);
  }
}

}
@layer sections {
/* ==========================================================================
   Legal pages (privacy, terms) — a narrow column with a soft header card.
   The text is .prose, without the numbered section badges.
   ========================================================================== */

.legal-page {
  --container-size: 52rem;
  padding-block: var(--space-7) var(--space-10);
  overflow-wrap: anywhere;
}

.legal-page__header {
  margin-block: var(--space-8);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-radius: var(--radius-xl);
  background: var(--color-sky-bg);
}

.legal-page__header h1 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-4);
}

.legal-page__date {
  margin-top: var(--space-4);
  font-size: var(--fs-xs);
}

.legal-page__content h2 {
  font-size: var(--fs-h3);
}

.legal-page__content h2::before {
  content: none;
}

.legal-page__content a {
  text-decoration: underline;
}

}

/* Utilities */
@layer utilities {
/* ==========================================================================
   Visually hidden — hidden on screen, still read by assistive technology.
   ========================================================================== */

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

}
@layer utilities {
/* ==========================================================================
   Stretched link — makes a link's click area cover its nearest positioned
   ancestor (a whole card), while its accessible name stays just the link text.
   The card shows the focus ring instead: `.card:has(.stretched-link:focus-visible)`.
   ========================================================================== */

.stretched-link {
  text-decoration: none;
}

.stretched-link::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
}

.stretched-link:focus-visible {
  outline: none;
}

}
