/* ==========================================================================
   Bem Perto: one stylesheet, mobile-first.
   Layout: tokens → fonts → base → motifs → components → sections.
   Each section has its own block at the end; later tickets add their rules
   inside their section's block only.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Palette sampled from the Instagram posts (spec, "Visual design"). */
  --cream: #f4ebe2;
  --navy: #1d4364;
  --navy-deep: #16344f; /* footer only, a shade below navy */
  --steel: #67869d;
  --mid-blue: #507496;
  --ink-blue: #476b8d; /* mid blue a shade darker, for small text on cream (4.75:1) */
  --light-blue: #9ab9d0;
  --lilac: #c1a7cc;
  --muted-lilac: #b49bbb;
  --white: #ffffff;

  /* Contrast notes (WCAG AA, 4.5:1 for body text):
     cream/navy 8.7 · navy/white 10.3 · navy/lilac 4.7 · light-blue/navy 5.0 · mid-blue/white 4.9.
     Mid blue on cream is only 4.2: small text in that tone uses --ink-blue instead.
     Steel blue reaches only 3.8 with white and 2.7 with navy: on steel use white text at
     large sizes (≥ 24px, or ≥ 19px bold), or set body copy on a mid-blue/cream surface. */

  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Nothing You Could Do", "Segoe Print", cursive;

  --container: 75rem;
  --gutter: 1.25rem;
  --header-height: 5.375rem; /* header logo 4.3rem + bar padding + border; larger from 75rem */
  --radius: 1.75rem;
  --section-space: clamp(4rem, 12vw, 7.5rem);

  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* --- Fonts (self-hosted, Latin subset, OFL) ------------------------------ */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nothing You Could Do";
  src: url("../fonts/nothing-you-could-do-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Base --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--cream) var(--paper-grain);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: clip;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Key words in headings: italic and underlined, as in the posts. */
h1 em,
h2 em,
h3 em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.12em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

main,
section[id] {
  scroll-margin-top: var(--header-height);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* --- Brand motifs ------------------------------------------------------- */

/* Thin rule with the small-caps running header of the blue carousel posts. */
.running-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 40rem) {
  .running-head {
    gap: 0.75rem;
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
  }
}

.running-head span {
  opacity: 0.6;
}

.running-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

/* Torn-paper label. */
.torn-label {
  display: inline-block;
  padding: 0.7rem 1.1rem 0.75rem;
  background: var(--lilac);
  color: var(--navy);
  font-size: clamp(0.75rem, 3.4vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  clip-path: polygon(
    0 12%, 5% 2%, 11% 9%, 18% 0, 26% 8%, 34% 1%, 43% 9%, 52% 2%, 60% 8%, 69% 0, 77% 7%, 86% 1%,
    93% 9%, 100% 3%, 99% 50%, 100% 92%, 94% 100%, 86% 92%, 78% 99%, 69% 91%, 60% 100%, 51% 93%,
    42% 100%, 33% 92%, 24% 99%, 15% 91%, 7% 100%, 0 90%, 1% 50%
  );
  transform: rotate(-1.5deg);
}

/* Highlighter strip behind words. */
.mark {
  padding: 0.05em 0.3em;
  background: var(--navy);
  color: var(--white);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Handwritten side note. */
.handnote {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  line-height: 1.3;
}

.handnote__arrow {
  width: 3.5rem;
  height: 2.1rem;
}

/* Stamp-edged card with a perforated border, like "Lembre-se «É da idade»". */
.stamp {
  --hole: 5px;
  --step: 15px;
  padding: var(--hole);
  background: var(--cream) var(--paper-grain);
  color: var(--navy);
  --focus: var(--navy);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle, #0000 var(--hole), #000 calc(var(--hole) + 0.5px)) calc(var(--step) / -2) calc(var(--step) / -2) / var(--step) var(--step);
  mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle, #0000 var(--hole), #000 calc(var(--hole) + 0.5px)) calc(var(--step) / -2) calc(var(--step) / -2) / var(--step) var(--step);
}

.stamp__inner {
  padding: 1.5rem 1.1rem;
  outline: 1px dashed color-mix(in srgb, var(--navy) 35%, transparent);
  outline-offset: -0.6rem;
}

/* Faint large "bem perto" script behind a section. */
.watermark {
  position: absolute;
  inset: auto -0.1em -0.25em auto;
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(5rem, 24vw, 15rem);
  line-height: 1;
  white-space: nowrap;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

/* Photo with rounded corners and two strips of tape. */
.photo-frame {
  position: relative;
  border-radius: var(--radius);
  box-shadow: 0 1.25rem 2.5rem -1.5rem rgb(29 67 100 / 0.45);
}

.photo-frame img {
  width: 100%;
  border-radius: inherit;
}

.photo-frame::before,
.photo-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 5.5rem;
  height: 1.6rem;
  background: rgb(244 235 226 / 0.75);
  box-shadow: 0 1px 2px rgb(29 67 100 / 0.15);
}

.photo-frame::before {
  top: -0.6rem;
  left: 1.5rem;
  transform: rotate(-8deg);
}

.photo-frame::after {
  right: 1.25rem;
  bottom: -0.6rem;
  transform: rotate(6deg);
}

/* --- Components --------------------------------------------------------- */

.icon {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn--primary:hover {
  background: var(--mid-blue);
  color: var(--white); /* cream on mid blue is 4.2:1, white 4.9:1 */
}

.btn--lilac {
  background: var(--lilac);
  color: var(--navy);
}

.btn--lilac:hover {
  background: var(--cream);
}

.btn--compact {
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.9375rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.link-arrow::after {
  content: "→";
  margin-left: 0.4em;
  transition: transform 0.2s;
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* Logo: "be" over "perto" with the lilac figure completing "bem". */
.brand {
  display: inline-flex;
  flex: none;
  color: var(--navy);
}

.brand--light {
  color: var(--cream);
}

.logo {
  width: 4.75rem;
  height: 3.8rem;
  overflow: visible;
}

.logo__word {
  fill: currentColor;
  font-family: var(--font-serif);
  /* A thin outline gives the wordmark the weight of the original logo. */
  stroke: currentColor;
  stroke-width: 1.6;
  paint-order: stroke fill;
}

/* The header logo is the brand's main mark, so it gets more presence than the footer one. */
.site-header .logo {
  width: 5.375rem;
  height: 4.3rem;
}

.logo__figure {
  fill: var(--lilac);
  stroke: var(--lilac);
}

/* Reveal-on-scroll: the script marks blocks below the first screen only when motion is welcome,
   so with JS off or reduced motion nothing is ever hidden. */
[data-reveal] {
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

[data-reveal]:not([data-revealed]) {
  opacity: 0;
  transform: translateY(1.25rem);
}

@media print, (prefers-reduced-motion: reduce) {
  [data-reveal]:not([data-revealed]) {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* --- Header and navigation ---------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(244 235 226 / 0.92) var(--paper-grain);
  border-bottom: 1px solid rgb(29 67 100 / 0.15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: var(--header-height);
  padding-block: 0.5rem;
}

.site-nav {
  order: 3;
  width: 100%;
}

.site-header__cta {
  order: 2;
  margin-left: auto;
}

/* Without JS: the links form one scrollable row under the logo. */
.site-nav__list {
  display: flex;
  gap: 0.25rem 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav__list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font: 600 0.9375rem var(--font-sans);
  cursor: pointer;
}

.site-nav__toggle[hidden] {
  display: none;
}

.site-nav__toggle-bars,
.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s;
}

.site-nav__toggle-bars {
  position: relative;
}

.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-nav__toggle-bars::before {
  top: -6px;
}

.site-nav__toggle-bars::after {
  top: 6px;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars {
  background: transparent;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* With JS: a toggle just before "Marcar" opens a full-width panel. Visual order follows the
   source (logo, menu, Marcar), so keyboard focus moves left to right. */
.has-js .site-nav {
  order: 2;
  width: auto;
  margin-left: auto;
}

.has-js .site-header__cta {
  order: 3;
  margin-left: 0;
}

.has-js .site-header__bar {
  flex-wrap: nowrap;
}

.has-js .site-nav__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: block;
  overflow: visible;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  padding: 0.5rem var(--gutter) 1.5rem;
  background: var(--cream) var(--paper-grain);
  border-bottom: 1px solid rgb(29 67 100 / 0.2);
  box-shadow: 0 1.5rem 2rem -1.5rem rgb(29 67 100 / 0.35);
  counter-reset: nav;
}

.has-js .site-nav__list[hidden] {
  display: none;
}

.has-js .site-nav__list li {
  border-bottom: 1px solid rgb(29 67 100 / 0.15);
  counter-increment: nav;
}

.has-js .site-nav__list a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  width: 100%;
  min-height: 3.25rem;
  padding-block: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
}

.has-js .site-nav__list a::before {
  content: counter(nav, decimal-leading-zero);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-blue);
}

@media (min-width: 75rem) {
  :root {
    --header-height: 6.5rem; /* header logo 5.4rem + bar padding + border */
  }

  .site-header .logo {
    width: 6.75rem;
    height: 5.4rem;
  }

  .site-header__bar,
  .has-js .site-header__bar {
    flex-wrap: nowrap;
  }

  .site-nav,
  .has-js .site-nav {
    order: 2;
    width: auto;
    margin-left: auto;
  }

  .site-header__cta {
    order: 3;
    margin-left: 0;
  }

  .has-js .site-nav__toggle {
    display: none;
  }

  .site-nav__list,
  .has-js .site-nav__list,
  .has-js .site-nav__list[hidden] {
    position: static;
    display: flex;
    gap: 1.4rem;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .has-js .site-nav__list li {
    border: 0;
  }

  .has-js .site-nav__list a {
    align-items: center;
    min-height: 2.75rem;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
  }

  .has-js .site-nav__list a::before {
    content: none;
  }
}

/* --- Sections: backgrounds follow the rhythm of the Instagram grid ------ */

.section {
  position: relative;
  padding-block: var(--section-space);
}

/* Empty shells waiting for their ticket take no space. */
.section:not(:has(*)) {
  padding: 0;
}

.section--cream {
  background: var(--cream) var(--paper-grain);
  color: var(--navy);
}

.section--steel {
  background: var(--steel) var(--paper-grain);
  color: var(--white);
  --focus: var(--white);
}

.section--lilac {
  background: var(--lilac) var(--paper-grain);
  color: var(--navy);
}

.section--light {
  background: var(--light-blue) var(--paper-grain);
  color: var(--navy);
}

.section--navy {
  background: var(--navy) var(--paper-grain);
  color: var(--cream);
  --focus: var(--lilac);
}

/* --- 1. Início (hero) --------------------------------------------------- */

.hero {
  padding-block: 1.25rem 4.5rem;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: 3rem;
  margin-top: 2rem;
}

.hero__text {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
}

.hero__title {
  font-size: clamp(3.4rem, 18vw, 6.5rem);
  line-height: 0.92;
}

.hero__title em {
  display: inline-block;
}

.hero__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 6.5vw, 2.25rem);
  line-height: 1.25;
}

.hero__lead .mark {
  font-style: italic;
}

.hero__note {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  color: var(--ink-blue);
  transform: rotate(-3deg);
}

.hero__note .handnote__arrow {
  transform: translateY(0.9rem) rotate(8deg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 0.5rem;
}

.hero__photo {
  position: relative;
  margin: 0 0.25rem;
}

.hero__photo .photo-frame {
  transform: rotate(1.5deg);
}

.photo-caption {
  position: absolute;
  left: -0.25rem;
  bottom: 1.75rem;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 6.5vw, 2.1rem);
  line-height: 1.45;
}

.photo-caption em {
  font-style: italic;
}

.hero__star {
  position: absolute;
  top: -1.4rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--lilac);
}

@media (min-width: 56rem) {
  .hero {
    padding-block: 1.75rem 6rem;
  }

  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 4rem;
    margin-top: 3.5rem;
  }

  .photo-caption {
    left: -2.5rem;
  }
}

/* --- 2. Porquê em casa (ticket 03) -------------------------------------- */

.home-care__grid {
  display: grid;
  gap: 3.5rem;
}

.home-care__text {
  display: grid;
  gap: 1.5rem;
}

.home-care__title {
  font-size: clamp(2.6rem, 11vw, 4.25rem);
  line-height: 0.98;
}

/* "espaço" in a softer blue, as in the post; large text, so 4.1:1 on cream passes. */
.home-care__accent {
  color: var(--mid-blue);
}

.home-care__intro em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* The three gains, set beside a solid bar like the post. */
.home-care__gains {
  padding-left: 1.1rem;
  border-left: 0.5rem solid var(--mid-blue);
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.home-care__body {
  max-width: 34rem;
}

.home-care__goals {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 6.5vw, 2rem);
  font-style: italic;
  line-height: 1.15;
}

.home-care__photo {
  margin: 0 0.25rem;
}

.home-care__photo .photo-frame {
  transform: rotate(-1.5deg);
}

.home-care__note {
  max-width: 20rem;
  margin: 1.75rem 0 0 auto;
  text-align: right;
  transform: rotate(-2deg);
}

@media (min-width: 56rem) {
  .home-care__grid {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 5rem;
  }

  .home-care__photo {
    order: -1;
  }
}

/* --- 3. Serviços (ticket 03) -------------------------------------------- */

/* Steel blue passes AA only for large text with white (3.8:1): the heading and lead
   stay large and white; card copy sits on cream paper in navy. */
.services {
  overflow: hidden;
}

.services__inner {
  position: relative;
  display: grid;
  gap: 2.5rem;
}

.services__title {
  font-size: clamp(2.75rem, 12vw, 4.75rem);
  line-height: 0.95;
}

.services__lead {
  max-width: 30rem;
  margin-top: 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5.5vw, 1.875rem);
  line-height: 1.2;
}

.services__grid {
  display: grid;
  gap: 1.5rem;
}

.service-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.9rem;
  padding: 2rem 1.4rem 1.75rem;
  border-radius: 1.25rem;
  background: var(--cream) var(--paper-grain);
  color: var(--navy);
  box-shadow: 0 1.25rem 2rem -1.5rem rgb(22 52 79 / 0.6);
  transform: rotate(-0.6deg);
}

.service-card:nth-child(even) {
  transform: rotate(0.6deg);
}

/* A strip of lilac tape holding each card. */
.service-card::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 5rem;
  height: 1.5rem;
  background: rgb(193 167 204 / 0.85);
  box-shadow: 0 1px 2px rgb(29 67 100 / 0.15);
  transform: translateX(-50%) rotate(-3deg);
}

/* The last card in lilac, for the rhythm of the grid (navy on lilac 4.7:1). */
.service-card:last-child {
  background-color: var(--lilac);
}

.service-card:last-child::before {
  background: rgb(244 235 226 / 0.8);
}

.service-card__title {
  font-size: 1.75rem;
  line-height: 1;
}

.service-card__title em {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.3em;
}

.service-card__text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.3;
}

.service-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Navy pills, like the dermatofuncional post. */
.service-card__tag,
.service-card__list li {
  padding: 0.3rem 0.9rem 0.35rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.25;
}

.service-card__tag {
  justify-self: start;
}

.services__photo {
  margin: 0.5rem 0.25rem 0;
}

.services__photo .photo-frame {
  transform: rotate(1.5deg);
}

.services__photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 30%;
}

@media (min-width: 40rem) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }

  .service-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .services__inner {
    grid-template-columns: 1.6fr 1fr;
    align-items: end;
    gap: 3.5rem 4rem;
  }

  .services__grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, 1fr);
    gap: 2.25rem 1.75rem;
  }

  .service-card {
    grid-column: span 2;
  }

  .service-card:nth-child(n + 4),
  .service-card:last-child {
    grid-column: span 3;
  }

  .services__photo {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
  }
}

/* --- 4. Sobre a Beatriz (ticket 04) ------------------------------------- */

.about {
  overflow: hidden;
}

.about__grid {
  display: grid;
  gap: 3rem;
}

.about__portrait {
  position: relative;
  max-width: 26rem;
  margin: 0 0.5rem;
}

.about__portrait .photo-frame {
  transform: rotate(-1.5deg);
}

.about__text {
  display: grid;
  justify-items: start;
  gap: 1.75rem;
}

.about__title {
  font-size: clamp(3rem, 15vw, 5.5rem);
  line-height: 0.95;
}

/* The name on a torn light-blue strip, like the brush stroke of the post. */
.about__name {
  display: inline-block;
  margin-top: 0.1em;
  padding: 0.12em 0.45em 0.02em;
  background: var(--light-blue);
  color: var(--navy);
  font-family: var(--font-hand);
  font-size: 0.82em;
  line-height: 1.15;
  clip-path: polygon(
    2% 14%, 9% 4%, 17% 11%, 27% 2%, 38% 9%, 49% 1%, 60% 8%, 71% 0, 82% 9%, 92% 3%, 100% 12%,
    98% 52%, 100% 88%, 91% 97%, 80% 90%, 69% 100%, 57% 92%, 46% 99%, 34% 91%, 22% 100%, 11% 92%,
    0 98%, 2% 55%
  );
  transform: rotate(-2deg);
}

.about__story {
  max-width: 34rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.3;
}

.about__story em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.12em;
}

.about__story .mark {
  font-style: italic;
}

/* White face so the perforated edge shows against the cream section. */
.about__card {
  width: 100%;
  max-width: 34rem;
  background-color: var(--white);
  transform: rotate(0.75deg);
}

.about__credentials {
  display: grid;
  font-size: 1.0625rem;
}

.about__credentials li {
  padding-block: 0.75rem;
}

.about__credentials li + li {
  border-top: 1px solid rgb(29 67 100 / 0.15);
}

.about__licence {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* A small instant photo with a handwritten note next to it. */
.about__aside {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  align-items: center;
  gap: 1.25rem;
}

.about__polaroid {
  margin: 0;
  padding: 0.5rem 0.5rem 1.75rem;
  background: var(--white);
  box-shadow: 0 1rem 2rem -1.25rem rgb(29 67 100 / 0.55);
  transform: rotate(-4deg);
}

.about__note {
  display: grid;
  gap: 0.4rem;
  font-size: 1rem;
  transform: rotate(-2deg);
}

.about__note-title {
  font-size: 1.2rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

@media (min-width: 56rem) {
  .about__grid {
    grid-template-columns: 0.85fr 1fr;
    grid-template-areas:
      "portrait text"
      "aside text";
    align-items: start;
    gap: 3rem 5rem;
  }

  .about__portrait {
    grid-area: portrait;
    margin: 0;
  }

  .about__text {
    grid-area: text;
    padding-top: 1rem;
  }

  .about__aside {
    grid-area: aside;
    grid-template-columns: 12rem 1fr;
    margin-left: -1rem;
  }
}

/* --- 5. Como trabalho (ticket 04) --------------------------------------- */

/* Navy on lilac is 4.7:1, so all text here stays full navy (no opacity). */

.method {
  overflow: hidden;
}

.method__grid {
  display: grid;
  gap: 3rem;
  margin-top: 2rem;
}

.method__intro {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
}

.method__kicker {
  font-size: 1.5rem;
  transform: rotate(-3deg);
  transform-origin: left;
}

/* The small "não" sticker of the "coisas que não faço" posts. */
.method__no-sticker {
  display: inline-block;
  padding: 0 0.32em 0.05em;
  border-radius: 999px;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.1;
  box-shadow: 0 0 0 2px var(--white);
}

.method__title {
  font-size: clamp(3rem, 15vw, 5.5rem);
  line-height: 0.95;
}

.method__lead {
  max-width: 28rem;
}

.method__photo {
  width: 100%;
  max-width: 22rem;
  margin: 1rem 0 0;
}

.method__photo .photo-frame {
  transform: rotate(-2deg);
}

.method__list {
  counter-reset: principle;
}

.method__list li {
  position: relative;
  padding: 1.1rem 0 1.1rem 2.75rem;
  border-top: 1px solid rgb(29 67 100 / 0.35);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 6.4vw, 2rem);
  line-height: 1.15;
  counter-increment: principle;
}

.method__list li:last-child {
  border-bottom: 1px solid rgb(29 67 100 / 0.35);
}

.method__list li::before {
  content: counter(principle, decimal-leading-zero);
  position: absolute;
  top: 1.1rem;
  left: 0;
  line-height: 2.1;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.method__list em {
  font-style: italic;
}

.method__list .method__no-sticker {
  font-size: 0.9em;
}

@media (min-width: 56rem) {
  .method__grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
    gap: 5rem;
    margin-top: 3.5rem;
  }

  .method__intro {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
  }

  .method__list li {
    padding: 1.35rem 0 1.35rem 3.5rem;
  }

  .method__list li::before {
    top: 1.35rem;
  }
}

/* --- 6. Para famílias (ticket 05) --------------------------------------- */

.families {
  overflow: hidden;
}

.families__head {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  margin-top: 2rem;
}

.families__title {
  max-width: 16ch;
  font-size: clamp(2.6rem, 11.5vw, 4.75rem);
  line-height: 0.98;
}

.families__count {
  font-style: italic;
  font-size: 1.35em;
  line-height: 0.8;
}

/* The three signs: paper cards with a large faint numeral, as in the carousel posts. */
.signs {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.75rem;
}

.sign {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.5rem 2.25rem;
  border-radius: 0.375rem;
  background: var(--cream) var(--paper-grain);
  color: var(--navy);
  box-shadow: 0 1.25rem 2rem -1.5rem rgb(29 67 100 / 0.5);
  --rule: var(--light-blue);
}

.sign--blue {
  background: var(--mid-blue) var(--paper-grain);
  color: var(--white);
  --rule: rgb(255 255 255 / 0.45);
}

.sign__number {
  position: absolute;
  right: -0.05em;
  bottom: -0.3em;
  font-family: var(--font-serif);
  font-size: 11rem;
  line-height: 1;
  opacity: 0.12;
  pointer-events: none;
}

.sign__title {
  position: relative;
  padding-block: 0.9rem;
  border-block: 1.5px solid var(--rule);
  font-size: clamp(1.85rem, 8vw, 2.25rem);
  line-height: 1.05;
}

.sign p {
  position: relative;
  margin-top: 1rem;
  font-size: 1.0625rem;
}

.sign p + p {
  margin-top: 0.6rem;
}

.sign em {
  font-style: italic;
  font-weight: 600;
}

/* Photo with the "É da idade" stamp and the closing line. */
.families__care {
  display: grid;
  gap: 2.75rem;
  margin-top: 4rem;
}

.families__photo {
  margin: 0 0.25rem;
}

.families__photo .photo-frame {
  transform: rotate(-1.5deg);
}

.families__reassure {
  display: grid;
  justify-items: start;
  gap: 1.75rem;
}

.families__stamp {
  max-width: 22rem;
  margin-top: -4.5rem;
  margin-left: auto;
  position: relative;
  z-index: 2;
  transform: rotate(2deg);
  filter: drop-shadow(0 0.75rem 1rem rgb(29 67 100 / 0.3));
}

.families__stamp-text {
  padding: 1.75rem 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 7vw, 2rem);
  line-height: 1.15;
  text-align: center;
}

.families__closing {
  max-width: 20ch;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8.5vw, 2.75rem);
  line-height: 1.12;
}

.families__closing strong {
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

.families__script {
  font-family: var(--font-hand);
  font-size: 0.8em;
  letter-spacing: 0;
}

@media (min-width: 48rem) {
  .signs {
    grid-template-columns: repeat(3, 1fr);
  }

  .sign:nth-child(2) {
    transform: translateY(1.5rem);
  }
}

@media (min-width: 56rem) {
  .families__care {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 4rem;
    margin-top: 6rem;
  }

  .families__title {
    max-width: 22ch;
  }

  .families__stamp {
    margin: 0 0 0 -8rem;
  }
}

/* --- 7. Preparar a sessão (ticket 05) ----------------------------------- */

.prepare__title {
  max-width: 14ch;
  font-size: clamp(2.6rem, 11.5vw, 4.75rem);
  line-height: 0.98;
}

/* "em sua casa" on a blue highlighter strip, as in the cover post. */
.prepare__title-mark {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.15em 0.45em 0.2em;
  background: var(--mid-blue);
  font-family: var(--font-sans);
  font-size: 0.5em;
  font-style: normal;
  letter-spacing: -0.01em;
}

.steps {
  display: grid;
  gap: 2.75rem;
  margin-top: 3rem;
}

.step {
  display: grid;
  align-content: start;
}

.step__photo {
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 800 / 407;
  box-shadow: 0 1.25rem 2rem -1.5rem rgb(29 67 100 / 0.45);
}

.step__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Numbered strip label with a dashed edge, overlapping the photo. */
.step__label {
  position: relative;
  justify-self: start;
  margin: -1.75rem 1.25rem 0 -0.5rem;
  padding: 0.75rem 1rem 0.8rem;
  background: var(--mid-blue);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  outline: 1.5px dashed rgb(255 255 255 / 0.85);
  outline-offset: -5px;
}

.step--lilac .step__label {
  background: var(--lilac);
  color: var(--navy);
}

.step__number {
  font-weight: 400;
}

.step__text {
  margin-top: 1rem;
  font-size: 1.0625rem;
}

.step__text em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Closing note, like the "Guarde esta checklist" post. */
.prepare__keep {
  position: relative;
  max-width: 34rem;
  margin: 4rem auto 0;
  padding: 2rem 1rem;
  border-block: 1.5px solid var(--light-blue);
  text-align: center;
}

.prepare__keep-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 10vw, 3.25rem);
  line-height: 1;
}

.prepare__keep-title em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.12em;
}

.prepare__keep-text {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
}

.prepare__star {
  position: absolute;
  top: -1.1rem;
  right: 12%;
  width: 2.2rem;
  height: 2.2rem;
  color: var(--lilac);
}

@media (min-width: 40rem) {
  .prepare__title {
    max-width: 20ch;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 3.25rem 2rem;
  }
}

@media (min-width: 72rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
  }

  .step:nth-child(even) {
    margin-top: 2.5rem;
  }

  .step__photo {
    aspect-ratio: 4 / 3;
  }
}

/* --- 8. Zona de atuação (ticket 06) ------------------------------------- */

/* Navy like Contacto: a thin rule and less space at the bottom make the two read as one. */
.area {
  padding-bottom: calc(var(--section-space) * 0.6);
}

.area + .section--navy::before {
  content: "";
  position: absolute;
  inset: 0 var(--gutter) auto;
  max-width: calc(var(--container) - 2 * var(--gutter));
  margin-inline: auto;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
}

.area__grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.area__text {
  display: grid;
  gap: 1.25rem;
}

.area__title {
  font-size: clamp(2.75rem, 12vw, 4.75rem);
  line-height: 0.95;
}

.area__title-script {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--lilac);
  font-family: var(--font-hand);
  font-size: 0.5em;
  letter-spacing: 0;
  transform: rotate(-3deg);
  transform-origin: left;
}

.area__lead {
  max-width: 26rem;
  font-size: 1.1875rem;
}

.area__lead strong {
  font-weight: 600;
  color: var(--light-blue);
}

/* Municipalities as torn lilac labels, slightly askew like pinned notes. */
.area__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.6rem;
  align-content: start;
}

.area__list li {
  padding: 0.55rem 1rem 0.6rem;
  background: var(--lilac);
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.1;
  clip-path: polygon(
    0 10%, 8% 0, 20% 8%, 34% 1%, 50% 9%, 66% 0, 80% 8%, 92% 1%, 100% 9%, 99% 50%, 100% 90%,
    90% 100%, 76% 92%, 60% 100%, 44% 92%, 28% 100%, 14% 93%, 0 100%, 1% 50%
  );
  transform: rotate(-1.5deg);
}

.area__list li:nth-child(3n + 2) {
  background: var(--light-blue);
  transform: rotate(1.25deg);
}

.area__list li:nth-child(3n) {
  background: var(--cream);
  transform: rotate(-0.5deg);
}

.area__outside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-top: 3rem;
}

.area__note {
  color: var(--light-blue);
  font-size: 1.375rem;
  transform: rotate(-1.5deg);
}

.area__outside .link-arrow {
  gap: 0.5rem;
}

@media (min-width: 56rem) {
  .area__grid {
    grid-template-columns: 1fr 1.15fr;
    align-items: end;
    gap: 4rem;
    margin-top: 3.5rem;
  }

  .area__list {
    gap: 1rem 0.8rem;
  }

  .area__list li {
    padding: 0.65rem 1.25rem 0.7rem;
    font-size: 2.125rem;
  }
}

/* --- 9. Contacto -------------------------------------------------------- */

.contact {
  overflow: hidden;
}

.contact__inner {
  position: relative;
  display: grid;
  gap: 3rem;
}

.contact__text {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
}

.contact__title {
  font-size: clamp(2.75rem, 12vw, 4.75rem);
  line-height: 0.95;
}

.contact__title-script {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--light-blue);
  font-family: var(--font-hand);
  font-size: 0.5em;
  letter-spacing: 0;
  transform: rotate(-3deg);
  transform-origin: left;
}

.contact__lead {
  max-width: 30rem;
  font-size: 1.1875rem;
}

.contact__card {
  max-width: 28rem;
  transform: rotate(-1deg);
}

.contact__card-title {
  margin-bottom: 0.75rem;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--ink-blue);
}

.contact-list li + li {
  border-top: 1px solid rgb(29 67 100 / 0.15);
}

.contact-list__link {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  padding-block: 0.65rem;
  text-decoration: none;
}

.contact-list__link .icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
}

.contact-list__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.contact-list__value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-list__link:hover .contact-list__value {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

@media (min-width: 56rem) {
  .contact__inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 5rem;
  }
  .contact__card .stamp__inner {
    padding: 1.75rem 1.5rem;
  }
}

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

.site-footer {
  padding-block: 2.5rem 3rem;
  background: var(--navy-deep);
  color: var(--cream);
  border-top: 1px solid rgb(244 235 226 / 0.15);
  --focus: var(--lilac);
}

.site-footer__inner {
  display: grid;
  gap: 1.5rem;
}

.site-footer__text {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9375rem;
}

.site-footer__privacy {
  margin-top: 0.5rem;
  font-family: var(--font-hand);
  font-size: 1.0625rem;
  color: var(--light-blue);
}

@media (min-width: 56rem) {
  .site-footer__inner {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 3rem;
  }
}
