/* ==========================================================================
   Ivone Abacar — design system
   Native CSS nesting. Sections: fonts · tokens · base · layout · components ·
   header & navigation · pages · forms & quiz · privacy · motion · print.
   ========================================================================== */

/* Fonts ------------------------------------------------------------------ */

@font-face {
  font-family: Bricolage;
  src: url('../fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: DM;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}

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

:root {
  /* Brand colour */
  --ink: #402238;
  --ink-soft: #5c3a53;
  --cream: #faf4eb;
  --paper: #fffdf8;
  --sand: #f2eae4;
  --coral: #ff7958;
  --coral-deep: #a63b2b;
  --lavender: #d7c5eb;
  --lavender-soft: #ece2f6;
  --pink: #efc0c7;
  --muted: #6b5867;
  --line: #dccfd0;
  --line-strong: #b9a5b0;
  --on-dark: #eadde5;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;

  /* Typography */
  --font-display: Bricolage, 'Arial Narrow', Arial, sans-serif;
  --font-body: DM, system-ui, Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --fs-md: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem);
  --fs-h3: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --fs-h2: clamp(2.375rem, 1.6rem + 3.2vw, 4.25rem);
  --fs-h1: clamp(2.875rem, 1.7rem + 5vw, 5.75rem);
  --fs-display: clamp(2.75rem, 1.35rem + 4.3vw, 5.25rem);

  /* Space & shape */
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 3rem + 6vw, 8rem);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --header-h: 84px;

  /* Depth */
  --shadow-offset: 6px 6px 0 var(--ink);
  --shadow-soft: 0 24px 60px -28px rgb(64 34 56 / 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast: 0.2s;
  --base: 0.4s;
  --slow: 0.7s;

  color-scheme: light;
  interpolate-size: allow-keywords;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 var(--fs-base) / 1.65 var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  &.menu-open {
    overflow: hidden;
  }
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.03em; }

p {
  text-wrap: pretty;

  & + p {
    margin-top: 1.1em;
  }
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

::selection {
  background: var(--coral);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 999;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  translate: 0 -200%;
  transition: translate var(--base) var(--ease-out);

  &:focus {
    translate: 0;
  }
}

/* Layout ----------------------------------------------------------------- */

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

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

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem 3rem;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);

  & h2 { max-width: 760px; }
  & p { max-width: 380px; color: var(--muted); font-size: var(--fs-md); }

  @media (width <= 720px) {
    flex-direction: column;
    align-items: start;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;

  &.actions-center {
    justify-content: center;
    margin-top: 3.5rem;
  }
}

/* Typography helpers ----------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: var(--fs-xs);
  font-weight: 750;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;

  &::before {
    content: '';
    flex: none;
    width: 1.5rem;
    height: 2px;
    border-radius: 2px;
    background: var(--coral);
  }
}

.italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.5;
}

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }

.star {
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 1;
}

.pill {
  display: inline-flex;
  padding: 0.4rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
}

.signature {
  margin-top: 2rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  font-style: italic;
}

/* Buttons & links -------------------------------------------------------- */

.arrow {
  display: inline-block;
  font-size: 1.25em;
  line-height: 1;
  transition: translate var(--base) var(--ease-spring);
}

.button {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  --btn-fill: var(--coral);
  --btn-fg-hover: var(--ink);
  --btn-border: var(--ink);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 3.25rem;
  padding: 0.9rem 1.6rem;
  border: 1.5px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition:
    color var(--base) var(--ease-out),
    translate var(--base) var(--ease-out),
    box-shadow var(--base) var(--ease-out);

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--btn-fill);
    translate: 0 102%;
    transition: translate var(--base) var(--ease-out);
  }

  &:hover,
  &:focus-visible {
    color: var(--btn-fg-hover);
    translate: 0 -3px;
    box-shadow: 4px 4px 0 var(--btn-border);

    &::before { translate: 0; }
    & .arrow { translate: 3px -3px; }
  }

  &:active {
    translate: 0;
    box-shadow: 0 0 0 var(--btn-border);
  }

  &[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    translate: none;
    box-shadow: none;

    &::before { translate: 0 102%; }
  }
}

.button-coral {
  --btn-bg: var(--coral);
  --btn-fg: var(--ink);
  --btn-fill: var(--ink);
  --btn-fg-hover: var(--cream);
  --btn-border: var(--ink);
}

.button-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-fill: var(--ink);
  --btn-fg-hover: var(--cream);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.35rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
  background:
    linear-gradient(var(--coral), var(--coral)) left bottom / 0 2px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size var(--base) var(--ease-out), color var(--fast);

  &:hover,
  &:focus-visible {
    color: var(--coral-deep);
    background-size: 100% 2px, 100% 1px;

    & .arrow { translate: 3px -3px; }
  }
}

/* Header & navigation ---------------------------------------------------- */

.announcement {
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--cream);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-align: center;

  & a {
    margin-left: 0.5rem;
    border-bottom: 1px solid var(--lavender);
    transition: color var(--fast), border-color var(--fast);

    &:hover { color: var(--coral); border-color: var(--coral); }
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(250 244 235 / 0.88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: border-color var(--base), box-shadow var(--base);
  view-transition-name: site-header;

  &[data-scrolled] {
    border-color: var(--line);
    box-shadow: 0 10px 30px -22px rgb(64 34 56 / 0.5);

    & .header-inner { height: 70px; }
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  transition: height var(--base) var(--ease-out);
}

.brand {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.9;

  & > span {
    display: inline-block;
    color: var(--coral-deep);
    transition: translate var(--base) var(--ease-spring);
  }

  & small {
    display: block;
    margin-top: 0.45rem;
    font-family: var(--font-body);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  &:hover > span { translate: 0 -4px; }
}

.site-nav {
  order: 2;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.2vw, 2rem);
  margin-left: auto;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;

  & > a:not(.button) {
    position: relative;
    padding-block: 0.5rem;

    &::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0.15rem;
      width: 100%;
      height: 2px;
      border-radius: 2px;
      background: var(--coral);
      scale: 0 1;
      transform-origin: right;
      transition: scale var(--base) var(--ease-out);
    }

    &:hover::after,
    &[aria-current='page']::after {
      scale: 1;
      transform-origin: left;
    }
  }

  & .button {
    min-height: 2.875rem;
    padding: 0.7rem 1.25rem;
    gap: 0.6rem;
  }
}

.site-nav-meta {
  display: none;
}

.language-switch {
  order: 3;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-xs);
  font-weight: 700;

  & a {
    padding: 0.35rem 0.45rem;
    border-radius: var(--radius-sm);
    transition: background var(--fast);

    &:hover { background: var(--sand); }
    &[aria-current='true'] { background: var(--ink); color: var(--cream); }
  }

  & span { opacity: 0.35; }
}

.menu-toggle {
  order: 4;
  display: none;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.65rem 0.5rem 1rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: background var(--fast), color var(--fast);

  &[aria-expanded='true'] {
    background: var(--ink);
    color: var(--cream);
  }
}

.menu-toggle-icon {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;

  &::before,
  &::after {
    content: '';
    position: absolute;
    left: 25%;
    width: 50%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: translate var(--base) var(--ease-out), rotate var(--base) var(--ease-out);
  }

  &::before { top: calc(50% - 4px); }
  &::after { top: calc(50% + 2px); }

  [aria-expanded='true'] > & {
    &::before { translate: 0 3px; rotate: 45deg; }
    &::after { translate: 0 -3px; rotate: -45deg; }
  }
}

@media (width <= 1080px) {
  .header-inner { gap: 0.75rem; }
  .language-switch { margin-left: auto; }
  .menu-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100dvh - var(--nav-offset, 120px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 1.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--cream);
    border-top: 1px solid var(--line);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition:
      clip-path var(--slow) var(--ease-out),
      visibility 0s linear var(--slow);

    & > * {
      opacity: 0;
      translate: 0 1.25rem;
      transition: opacity var(--base) var(--ease-out), translate var(--slow) var(--ease-out);
    }

    & > a:not(.button) {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem 0;
      border-bottom: 1px solid var(--line);
      font-family: var(--font-display);
      font-size: clamp(2rem, 8vw, 2.75rem);
      font-weight: 700;
      letter-spacing: -0.04em;
      line-height: 1.1;

      &::after {
        position: static;
        content: '↗';
        width: auto;
        height: auto;
        background: none;
        scale: 1;
        font-family: var(--font-body);
        font-size: 1.5rem;
        font-weight: 400;
        transition: translate var(--base) var(--ease-spring);
      }

      &:hover::after { translate: 4px -4px; }
      &[aria-current='page'] { color: var(--coral-deep); }
    }

    & .button {
      margin-top: 2rem;
      min-height: 3.5rem;
      font-size: var(--fs-base);
    }

    & .site-nav-meta {
      display: grid;
      gap: 0.5rem;
      margin-top: auto;
      padding-top: 2.5rem;
      color: var(--muted);
      font-size: var(--fs-sm);
    }

    &.is-open {
      clip-path: inset(0);
      visibility: visible;
      transition: clip-path var(--slow) var(--ease-out);

      & > * {
        opacity: 1;
        translate: 0;
      }

      & > :nth-child(1) { transition-delay: 0.12s; }
      & > :nth-child(2) { transition-delay: 0.17s; }
      & > :nth-child(3) { transition-delay: 0.22s; }
      & > :nth-child(4) { transition-delay: 0.27s; }
      & > :nth-child(5) { transition-delay: 0.32s; }
      & > :nth-child(6) { transition-delay: 0.37s; }
    }
  }
}

@media (width <= 480px) {
  .brand { font-size: 1.625rem; }

  .brand small {
    max-width: 9.5rem;
    font-size: 0.5625rem;
    letter-spacing: 0.16em;
    line-height: 1.45;
  }

  .menu-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .menu-toggle { padding: 0.45rem; }
}

/* Home: hero ------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  min-height: min(760px, calc(100svh - var(--header-h) - 2.5rem));
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-block: 3.5rem 4.5rem;

  & > * { animation: rise var(--slow) var(--ease-out) both; }
  & > :nth-child(2) { animation-delay: 0.08s; }
  & > :nth-child(3) { animation-delay: 0.16s; }
  & > :nth-child(4) { animation-delay: 0.24s; }
  & > :nth-child(5) { animation-delay: 0.32s; }

  & h1 {
    font-size: var(--fs-display);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.045em;

    & em {
      display: block;
      font-family: var(--font-serif);
      font-weight: 400;
      line-height: 1.1;
    }
  }

  & .small {
    margin-top: 1.5rem;

    & a {
      color: var(--ink);
      font-weight: 700;
      text-decoration: underline;
      text-decoration-color: var(--coral);
      text-decoration-thickness: 2px;
      text-underline-offset: 4px;
      transition: color var(--fast);

      &:hover { color: var(--coral-deep); }
    }
  }
}

.hero-description {
  max-width: 30rem;
  margin-top: 1.75rem;
  font-size: var(--fs-md);
}

.hero-art {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 3.5rem 2rem;

  &::before {
    content: '';
    position: absolute;
    inset: 0 -100vw 0 0;
    z-index: -1;
    background:
      radial-gradient(circle at 30% 20%, rgb(255 255 255 / 0.45), transparent 45%),
      var(--lavender);
  }
}

.hero-photo-wrap {
  position: relative;
  width: 100%;
  animation: rise 1s var(--ease-out) 0.15s both;

  & img {
    width: 100%;
    height: clamp(360px, 62vh, 580px);
    object-fit: cover;
    object-position: 51% center;
    border-radius: 999px 999px var(--radius) var(--radius);
    filter: saturate(0.85);
  }
}

.round-badge {
  position: absolute;
  top: 2rem;
  right: -1.25rem;
  display: grid;
  place-content: center;
  width: 7.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  animation: bob 6s ease-in-out infinite;

  & .star { font-size: 2.75rem; }
}

.hero-caption {
  position: absolute;
  bottom: 1.5rem;
  left: -2.25rem;
  max-width: 17rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--cream);
  box-shadow: var(--shadow-offset);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 650;
  line-height: 1.2;
  rotate: -4deg;
  transition: rotate var(--base) var(--ease-spring);

  &:hover { rotate: 0deg; }
}

.art-note {
  position: absolute;
  right: 0.5rem;
  bottom: 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (width <= 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
  }

  .hero-copy { padding-block: 2.75rem 3rem; }

  .hero-art {
    margin-inline: calc(-1 * var(--gutter));
    padding: 2.5rem calc(var(--gutter) + 1.5rem) 3.25rem;

    &::before { inset: 0; }
  }

  .hero-photo-wrap img {
    height: clamp(320px, 90vw, 440px);
    object-position: center 42%;
  }

  .hero-caption { left: -1.25rem; max-width: 15rem; }
  .round-badge { right: -1.25rem; width: 6.25rem; }
}

/* Home: marquee tape ----------------------------------------------------- */

.tape {
  overflow: hidden;
  padding-block: 1.25rem;
  border-block: 1.5px solid var(--ink);
  background: var(--coral);

  &:hover .tape-track { animation-play-state: paused; }
}

.tape-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.tape-group {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 0;
  padding: 0 2.5rem 0 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;

  & b { font-size: 1.5rem; font-weight: 400; }
}

/* Home: intro, services, diagnostic ------------------------------------- */

.intro-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: start;
  gap: 2rem 5rem;

  & > p {
    max-width: 44rem;
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.3;

    & strong { font-weight: 750; }
  }

  & > div > p { font-size: var(--fs-md); }
  & .eyebrow { margin-top: 0.5rem; }

  @media (width <= 820px) { grid-template-columns: 1fr; }
}

.service-intro {
  background: var(--sand);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.25rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  transition:
    translate var(--base) var(--ease-out),
    box-shadow var(--base) var(--ease-out);

  &:nth-child(3n + 2) { background: var(--lavender); }
  &:nth-child(3n + 3) { background: var(--pink); }

  & h3 { margin-bottom: 1rem; font-size: clamp(1.625rem, 1.4rem + 0.8vw, 2rem); }
  & p { margin-bottom: 1.75rem; font-size: var(--fs-base); line-height: 1.55; }

  & svg {
    width: 2.75rem;
    height: 2.75rem;
    transition: rotate var(--base) var(--ease-spring), scale var(--base) var(--ease-spring);
  }

  &:hover,
  &:focus-visible {
    translate: -4px -6px;
    box-shadow: 8px 10px 0 var(--ink);

    & svg { rotate: -10deg; scale: 1.12; }
    & .arrow { translate: 4px -4px; }
    & .card-link { color: var(--coral-deep); }
  }
}

.service-num {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.25rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgb(64 34 56 / 0.25);
  font-size: var(--fs-sm);
  font-weight: 750;
  transition: color var(--fast);

  & .arrow { font-size: 1.6rem; }
}

.diagnostic {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);

  & h2 { max-width: 44rem; }

  & p {
    max-width: 34rem;
    margin-top: 1.5rem;
    color: var(--on-dark);
    font-size: var(--fs-md);
  }

  & .small { font-size: var(--fs-sm); }
  & .eyebrow::before { background: var(--coral); }

  & .button-coral {
    --btn-fill: var(--cream);
    --btn-fg-hover: var(--ink);
    --btn-border: var(--coral);
  }
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 4rem;

  @media (width <= 820px) { grid-template-columns: 1fr; }
}

.diagnostic-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(230px, 28vw, 330px);
  aspect-ratio: 1;
  margin: auto;
  border: 1px solid #a98ba2;
  border-radius: 50%;

  &::before,
  &::after {
    content: '';
    position: absolute;
    inset: 11%;
    border: 1px dashed #a98ba2;
    border-radius: 50%;
    animation: spin 40s linear infinite;
  }

  &::after {
    inset: 23%;
    animation-direction: reverse;
    animation-duration: 28s;
  }
}

.orbit-label {
  position: relative;
  z-index: 2;
  width: 64%;
  padding: 1.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--lavender);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  rotate: -8deg;
}

.orbit-dot {
  position: absolute;
  top: 9%;
  right: 7%;
  display: grid;
  place-content: center;
  width: 4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
  color: var(--ink);
  font-size: 2rem;
  animation: bob 5s ease-in-out infinite;
}

/* About ------------------------------------------------------------------ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(3rem, 6vw, 6rem);

  @media (width <= 820px) { grid-template-columns: 1fr; }
}

.about-photo {
  position: relative;

  & img {
    width: 100%;
    aspect-ratio: 1 / 1.05;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 160px var(--radius);
  }

  & .note {
    position: absolute;
    bottom: 2rem;
    left: -1.25rem;
    padding: 1.1rem 1.5rem;
    border-radius: var(--radius-sm);
    background: var(--coral);
    font-family: var(--font-serif);
    font-size: var(--fs-lg);
    font-style: italic;
    rotate: -4deg;
    transition: rotate var(--base) var(--ease-spring);
  }

  &:hover .note { rotate: 0deg; }

  @media (width <= 820px) {
    & img { aspect-ratio: 1.2; }
    & .note { left: 0.75rem; }
  }
}

.about-copy {
  & p { margin-top: 1.5rem; font-size: var(--fs-md); }
  & h2 + p { margin-top: 2rem; }
}

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 2.5rem;
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);

  & span { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; }
  & h3 { margin: 0.75rem 0; font-size: var(--fs-h3); }
}

/* Editorial & articles --------------------------------------------------- */

.editorial {
  background: var(--lavender);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 2.5rem 2rem;
}

.article-card {
  display: flex;
  flex-direction: column;

  & > a:first-child {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
  }

  & img {
    width: 100%;
    aspect-ratio: 1.45;
    object-fit: cover;
    transition: scale var(--slow) var(--ease-out);
  }

  & h3 {
    margin: 0.85rem 0 0.75rem;
    font-size: clamp(1.5rem, 1.3rem + 0.7vw, 1.875rem);

    & a {
      background: linear-gradient(currentColor, currentColor) left 95% / 0 2px no-repeat;
      transition: background-size var(--base) var(--ease-out);
    }
  }

  & p { margin-bottom: 1.25rem; font-size: var(--fs-base); line-height: 1.6; }
  & .text-link { align-self: start; margin-top: auto; }

  &:hover {
    & img { scale: 1.05; }
    & h3 a { background-size: 100% 2px; }
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;

  & span:first-child {
    padding: 0.2rem 0.65rem;
    border: 1px solid currentColor;
    border-radius: var(--radius-pill);
    font-weight: 700;
  }
}

/* Contact banner & footer ----------------------------------------------- */

.contact-banner {
  padding-block: clamp(4rem, 3rem + 4vw, 6rem);
  background: var(--coral);

  & .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;

    @media (width <= 720px) {
      flex-direction: column;
      align-items: start;
    }
  }

  & h2 { max-width: 50rem; }
  & p { margin-top: 1rem; font-size: var(--fs-md); }
  & .eyebrow::before { background: var(--ink); }
}

.site-footer {
  padding: 4.5rem 0 1.75rem;
  background: var(--ink);
  color: var(--cream);

  & .brand {
    display: inline-block;
    font-size: 2.75rem;

    & > span { color: var(--coral); }
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 3rem;

  @media (width <= 820px) {
    grid-template-columns: 1fr 1fr;

    & .footer-brand { grid-column: 1 / -1; }
  }

  @media (width <= 520px) { grid-template-columns: 1fr; }
}

.footer-brand p {
  max-width: 18rem;
  margin-top: 1.5rem;
  color: var(--on-dark);
  font-size: var(--fs-sm);
}

.footer-title {
  margin-bottom: 1.25rem;
  color: var(--on-dark);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-links,
.footer-social {
  & a {
    background: linear-gradient(var(--coral), var(--coral)) left bottom / 0 1px no-repeat;
    transition: background-size var(--base) var(--ease-out), color var(--fast);

    &:hover { color: var(--coral); background-size: 100% 1px; }
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.65rem;
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.75rem;
  font-size: var(--fs-sm);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #765b70;
  color: var(--on-dark);
  font-size: var(--fs-xs);

  & a:hover,
  & button:hover { color: var(--coral); }

  @media (width <= 720px) {
    flex-direction: column;
    padding-right: 4rem;
  }
}

.floating-contact {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 10px 28px -8px rgb(37 211 102 / 0.65);
  transition:
    translate var(--base) var(--ease-spring),
    scale var(--base) var(--ease-spring),
    background var(--fast),
    opacity var(--base);

  & svg { width: 2rem; height: 2rem; }

  /* Soft pulse that invites a tap without being distracting. */
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--whatsapp);
    animation: ping 2.8s var(--ease-out) 1.5s 3;
  }

  &:hover {
    background: var(--whatsapp-dark);
    translate: 0 -4px;
    scale: 1.06;
  }

  @media (width <= 720px) {
    right: 1rem;
    bottom: 1rem;
  }
}

/* Inner pages ------------------------------------------------------------ */

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
  background: var(--lavender);
  border-bottom: 1.5px solid var(--ink);

  &::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: clamp(260px, 40vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(255 255 255 / 0.4), transparent 65%);
    pointer-events: none;
  }

  & .wrap { position: relative; z-index: 1; }
  & .eyebrow { margin-top: 2rem; }
  & h1 { max-width: 62rem; overflow-wrap: break-word; }

  & p {
    max-width: 44rem;
    margin-top: 1.75rem;
    font-size: var(--fs-lg);
    line-height: 1.5;
  }

  &.coral {
    background: var(--coral);

    & .eyebrow::before { background: var(--ink); }
  }
  &.cream { background: var(--cream); }
  &.pink { background: var(--pink); }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted);
  font-size: var(--fs-xs);

  & a {
    text-decoration: underline;
    text-underline-offset: 3px;

    &:hover { color: var(--ink); }
  }
}

.service-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2rem, 6vw, 5rem);

  & h2 { font-size: clamp(2.375rem, 1.8rem + 2.2vw, 3.5rem); }

  @media (width <= 900px) { grid-template-columns: 1fr; }
}

.tabs {
  margin-top: 2.5rem;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);

  & [role='tab'] {
    padding: 0.7rem 1.25rem;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 650;
    transition: background var(--fast), color var(--fast), translate var(--fast);

    &:hover { background: var(--sand); translate: 0 -2px; }

    &[aria-selected='true'] {
      background: var(--ink);
      color: var(--cream);
      translate: 0;
    }
  }
}

.tab-panel {
  padding-block: 2rem;
  animation: rise var(--base) var(--ease-out);

  & h3 { margin-bottom: 1.5rem; }
}

.check-list {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;

  & li {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-md);

    &::before {
      content: '↗';
      flex: none;
      color: var(--coral-deep);
      font-size: 1.35rem;
      line-height: 1.2;
    }
  }
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.process-step {
  position: relative;
  padding-top: 1.5rem;
  border-top: 2px solid rgb(64 34 56 / 0.25);

  &::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ink);
    scale: 0.25 1;
    transform-origin: left;
    transition: scale var(--slow) var(--ease-out), background var(--base);
  }

  &:hover::before { scale: 1; background: var(--coral-deep); }

  & span { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; }
  & h3 { margin: 1.25rem 0 0.75rem; }
}

.faq {
  max-width: 54rem;
  margin-inline: auto;

  & h2 { margin-bottom: 2.5rem; }

  & details {
    border-top: 1px solid var(--line);

    &:last-child { border-bottom: 1px solid var(--line); }

    &::details-content {
      block-size: 0;
      overflow: hidden;
      transition:
        block-size var(--base) var(--ease-out),
        content-visibility var(--base) allow-discrete;
    }

    &[open]::details-content { block-size: auto; }
    &[open] summary::after { rotate: 45deg; background: var(--ink); color: var(--cream); }
  }

  & summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-block: 1.5rem;
    font-size: var(--fs-md);
    font-weight: 650;
    list-style: none;
    cursor: pointer;
    transition: color var(--fast);

    &::-webkit-details-marker { display: none; }

    &::after {
      content: '+';
      display: grid;
      place-content: center;
      flex: none;
      width: 2.25rem;
      aspect-ratio: 1;
      border: 1.5px solid var(--ink);
      border-radius: 50%;
      font-size: 1.35rem;
      font-weight: 400;
      line-height: 1;
      transition: rotate var(--base) var(--ease-spring), background var(--fast), color var(--fast);
    }

    &:hover { color: var(--coral-deep); }
  }

  & details p {
    max-width: 46rem;
    padding-bottom: 1.5rem;
    color: var(--muted);
  }
}

/* Blog list & article ---------------------------------------------------- */

.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem 2rem;
  margin-bottom: 2rem;

  @media (width <= 720px) {
    flex-direction: column;
    align-items: stretch;
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;

  & button {
    padding: 0.6rem 1.15rem;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: background var(--fast), color var(--fast), translate var(--fast);

    &:hover { background: var(--sand); translate: 0 -2px; }

    &[aria-pressed='true'] {
      background: var(--ink);
      color: var(--cream);
      translate: 0;
    }
  }
}

.search-label {
  display: grid;
  gap: 0.4rem;
  min-width: min(100%, 300px);
  font-size: var(--fs-xs);
  font-weight: 600;

  & input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23402238' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 1rem center / 1.1rem no-repeat;
    font-size: var(--fs-base);
    transition: border-color var(--fast), box-shadow var(--fast);

    &:focus {
      outline: none;
      border-color: var(--ink);
      box-shadow: 0 0 0 4px rgb(255 121 88 / 0.25);
    }
  }
}

#filter-status {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.article-hero {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) 3rem;

  & .eyebrow { margin-top: 2.25rem; }
  & h1 { max-width: 62rem; margin: 0.5rem 0 1.75rem; font-size: clamp(2.5rem, 1.6rem + 3.8vw, 5rem); }

  & .description {
    max-width: 46rem;
    margin-bottom: 1.75rem;
    font-size: var(--fs-lg);
    line-height: 1.5;
  }
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  font-size: var(--fs-sm);

  & a { text-decoration: underline; text-underline-offset: 3px; }
}

.author-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
}

.article-cover {
  width: 100%;
  aspect-ratio: 2.6;
  object-fit: cover;
  border-radius: var(--radius-lg);

  @media (width <= 720px) { aspect-ratio: 1.4; }
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 46rem);
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-block: 4rem 5rem;

  @media (width <= 900px) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 46rem;
  }
}

.article-aside {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  align-self: start;
  font-size: var(--fs-sm);

  & nav {
    display: grid;
    gap: 0.25rem;
    padding-block: 1rem;
    border-block: 1px solid var(--line);
  }

  & nav a {
    padding: 0.45rem 0 0.45rem 0.9rem;
    border-left: 2px solid transparent;
    color: var(--muted);
    transition: color var(--fast), border-color var(--fast), padding var(--base) var(--ease-out);

    &:hover { color: var(--ink); padding-left: 1.15rem; }

    &[aria-current='true'] {
      border-color: var(--coral);
      color: var(--ink);
      font-weight: 700;
    }
  }

  @media (width <= 900px) {
    position: static;

    & nav { grid-template-columns: 1fr; }
  }
}

.aside-back {
  margin-top: 1.5rem;
}

.article-body {
  font-size: var(--fs-md);
  line-height: 1.8;

  & h2 {
    margin: 3rem 0 1.25rem;
    font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
    line-height: 1.15;
  }

  & section:first-child h2 { margin-top: 0; }
  & ul { padding-left: 1.5rem; }
  & li { margin-block: 0.6rem; }
  & li::marker { color: var(--coral-deep); }
}

.sources {
  margin-top: 3rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--sand);
  font-size: var(--fs-sm);
  line-height: 1.6;

  & a { text-decoration: underline; text-underline-offset: 3px; }
  & a:hover { color: var(--coral-deep); }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: 2.25rem;
}

.share {
  padding-block: 1.75rem;
  border-block: 1px solid var(--line);

  & .eyebrow { margin-bottom: 0; }
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;

  & button {
    padding: 0.6rem 1.1rem;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: background var(--fast), color var(--fast), translate var(--fast);

    &:hover { background: var(--ink); color: var(--cream); translate: 0 -2px; }
  }
}

#share-status {
  margin-top: 0.75rem;
  font-size: var(--fs-sm);
}

.author-card {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--lavender);

  & .author-mark { width: 3.5rem; }
  & h3 { margin-bottom: 0.6rem; font-size: 1.5rem; }
  & p { font-size: var(--fs-base); line-height: 1.6; }
}

#reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 4px;
  background: var(--coral);
  scale: var(--progress, 0) 1;
  transform-origin: left;
}

/* Contact ---------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);

  @media (width <= 900px) { grid-template-columns: 1fr; }
}

.contact-intro {
  & h2 { margin-bottom: 1.5rem; font-size: clamp(2.375rem, 1.8rem + 2vw, 3.25rem); }
  & > p { margin-bottom: 2rem; font-size: var(--fs-md); }
}

.contact-method {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  transition: padding var(--base) var(--ease-out), background var(--base);

  & small {
    margin-bottom: 0.3rem;
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  & strong {
    font-size: var(--fs-lg);
    font-weight: 600;
    overflow-wrap: anywhere;
  }

  &:hover {
    padding-left: 0.75rem;
    color: var(--coral-deep);
  }
}

.contact-socials {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.form-panel {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: var(--radius-lg);
  background: var(--sand);

  & h2 { margin-bottom: 0.75rem; font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem); }
  & > p { margin-bottom: 2rem; font-size: var(--fs-base); color: var(--muted); }
  & .button { margin-top: 0.5rem; }

  @media (width <= 520px) {
    & .button { width: 100%; }
  }
}

/* Forms ------------------------------------------------------------------ */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
  min-width: 0;

  @media (width <= 620px) { grid-template-columns: 1fr; }
}

.field {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin-bottom: 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 650;

  & input,
  & select,
  & textarea {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    font-size: var(--fs-base);
    font-weight: 400;
    transition: border-color var(--fast), box-shadow var(--fast);

    &:hover { border-color: var(--ink-soft); }

    &:focus {
      outline: none;
      border-color: var(--ink);
      box-shadow: 0 0 0 4px rgb(255 121 88 / 0.25);
    }

    &:user-invalid { border-color: var(--coral-deep); }
  }

  & select {
    appearance: none;
    padding-right: 2.75rem;
    background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23402238' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 1rem center / 1.1rem no-repeat;
  }

  & textarea {
    min-height: 9rem;
    resize: vertical;
  }
}

.consent {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  cursor: pointer;

  & input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    accent-color: var(--ink);
  }

  & a { text-decoration: underline; text-underline-offset: 3px; }
}

.form-trap {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

[data-form-status] {
  margin-top: 1.25rem;
  font-size: var(--fs-sm);
  line-height: 1.6;
  overflow-wrap: anywhere;

  &:empty { display: none; }

  &[data-tone] { padding: 0.9rem 1.1rem; border-radius: 12px; }
  &[data-tone='error'] { border-left: 4px solid var(--coral-deep); background: rgb(166 59 43 / 0.08); }
  &[data-tone='success'] { border-left: 4px solid var(--ink); background: var(--lavender-soft); }
  &[data-tone='notice'] { background: var(--cream); }
}

.form-fallback {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.form-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;

  @media (width <= 520px) {
    flex-direction: column;
    align-items: stretch;

    & .text-link { justify-content: space-between; }
  }
}

.form-draft-note {
  margin-top: 0.9rem !important;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

form[aria-busy='true'] :is(input, textarea, select) {
  opacity: 0.7;
}

/* Diagnostic quiz -------------------------------------------------------- */

.quiz-section {
  min-height: 640px;
}

.quiz-shell {
  max-width: 50rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3.25rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--lavender);
}

.quiz-kicker {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quiz-progress {
  margin-bottom: 1.5rem;

  & progress {
    width: 100%;
    height: 8px;
    margin-top: 0.85rem;
    border: 0;
    border-radius: var(--radius-pill);
    overflow: hidden;
    appearance: none;
    background: var(--lavender-soft);

    &::-webkit-progress-bar { background: var(--lavender-soft); }
    &::-webkit-progress-value { background: var(--ink); border-radius: var(--radius-pill); transition: inline-size var(--base) var(--ease-out); }
    &::-moz-progress-bar { background: var(--ink); border-radius: var(--radius-pill); }
  }
}

.quiz-question {
  animation: rise var(--base) var(--ease-out);

  & fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

  & legend {
    margin: 1rem 0 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }

  & #quiz-hint { color: var(--muted); }
}

.quiz-options {
  display: grid;
  gap: 0.75rem;
  margin-block: 1.75rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font-size: var(--fs-base);
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast), translate var(--base) var(--ease-out);

  & input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--ink);
  }

  &:hover { border-color: var(--ink); translate: 4px 0; }

  @media (width <= 520px) { padding: 0.9rem 1rem; gap: 0.85rem; }

  &:has(input:checked) {
    border-color: var(--ink);
    background: var(--lavender);
  }
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;

  @media (width <= 520px) {
    & .button { flex: 1 1 100%; }
  }
}

.quiz-privacy {
  margin-block: 1.25rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.quiz-result {
  animation: rise var(--slow) var(--ease-out);

  & h2 { margin: 1rem 0 1.5rem; font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); }
  & p { margin-block: 1rem; }
  & .quiz-result-intro { font-size: var(--fs-md); }
}

.quiz-next-step {
  margin-top: 1.75rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--lavender);

  & h3 { font-size: 1.375rem; }
}

.quiz-note {
  max-width: 42rem;
  margin: 2rem auto 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  text-align: center;

  .quiz-result & { text-align: left; }
}

.quiz-restart {
  padding-block: 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;

  &:hover { color: var(--coral-deep); }
}

.diagnostic-send {
  margin-top: 2rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);

  & > summary {
    padding: 1.25rem 1.4rem;
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;

    & span { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 400; }
  }

  &[open] > summary { border-bottom: 1px solid var(--line); }
}

.diagnostic-send-content {
  padding: 1.25rem 1.4rem 1.5rem;

  & > p { margin: 0 0 1.5rem; font-size: var(--fs-sm); }
}

.diagnostic-form textarea {
  min-height: 7rem;
}

/* Resources & legal ------------------------------------------------------ */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.75rem;
}

.resource-card {
  & .button:hover .arrow { translate: 0 3px; }

  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--lavender);
  transition: translate var(--base) var(--ease-out), box-shadow var(--base) var(--ease-out);

  &:nth-child(2) { background: var(--pink); }

  & .star {
    display: inline-block;
    transition: rotate var(--slow) var(--ease-spring);
  }

  & h3 { margin: 1.75rem 0 1.25rem; font-size: clamp(2.125rem, 1.7rem + 1.6vw, 2.875rem); }
  & p { margin-bottom: 1.75rem; font-size: var(--fs-md); }
  & .small { margin: 1rem 0 0; font-size: var(--fs-sm); }

  &:hover {
    translate: -4px -6px;
    box-shadow: 8px 10px 0 var(--ink);

    & .star { rotate: 90deg; }
  }
}

.legal {
  max-width: 48rem;

  & h2 { margin: 2.5rem 0 1rem; font-size: clamp(1.625rem, 1.4rem + 1vw, 2.125rem); }
  & h2:first-child { margin-top: 0; }
  & p, & li { font-size: var(--fs-md); }
  & a { text-decoration: underline; text-underline-offset: 3px; }
  & a:hover { color: var(--coral-deep); }
}

/* Shop: paid spreadsheets & purchase order dialog ----------------------- */

.free-resources {
  background: var(--sand);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: stretch;
  gap: 1.5rem;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  transition: translate var(--base) var(--ease-out), box-shadow var(--base) var(--ease-out);

  & .eyebrow { margin-bottom: 1rem; }
  & h3 { margin-bottom: 0.85rem; font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); }
  & > p { color: var(--muted); }

  & .check-list {
    margin-block: 1.5rem;

    & li { padding-block: 0.6rem; font-size: var(--fs-base); }
  }

  &:hover {
    translate: -4px -6px;
    box-shadow: 8px 10px 0 var(--ink);
  }

  &.is-featured {
    background: var(--ink);
    color: var(--cream);

    & > p { color: var(--on-dark); }
    & .check-list li { border-color: rgb(255 255 255 / 0.15); }
    & .check-list li::before { color: var(--coral); }
    & .product-footer { border-color: rgb(255 255 255 / 0.2); }
    & .product-price span { color: var(--on-dark); }
    &:hover { box-shadow: 8px 10px 0 var(--coral); }

    & .button-coral {
      --btn-fill: var(--cream);
      --btn-fg-hover: var(--ink);
      --btn-border: var(--coral);
    }
  }
}

.product-badge {
  position: absolute;
  top: -0.9rem;
  right: 1.5rem;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--coral);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  rotate: 3deg;
}

.product-footer {
  display: grid;
  gap: 1.25rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);

  & .button { width: 100%; }
}

.product-price {
  display: grid;
  gap: 0.35rem;

  & strong {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 1.9rem + 1.4vw, 2.875rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1;
  }

  & span { color: var(--muted); font-size: var(--fs-xs); }
}

.shop-note {
  max-width: 46rem;
  margin: 2.5rem auto 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  text-align: center;
}

.order-dialog {
  width: min(100% - 1.5rem, 640px);
  max-height: min(92dvh, 900px);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  overscroll-behavior: contain;
  opacity: 0;
  translate: 0 1.5rem;
  transition:
    opacity var(--base) var(--ease-out),
    translate var(--base) var(--ease-out),
    overlay var(--base) allow-discrete,
    display var(--base) allow-discrete;

  &[open] {
    opacity: 1;
    translate: 0;

    @starting-style {
      opacity: 0;
      translate: 0 1.5rem;
    }
  }

  &::backdrop {
    background: rgb(30 20 29 / 0);
    transition: background var(--base), overlay var(--base) allow-discrete, display var(--base) allow-discrete;
  }

  &[open]::backdrop {
    background: rgb(30 20 29 / 0.6);
    backdrop-filter: blur(4px);

    @starting-style { background: rgb(30 20 29 / 0); }
  }
}

.order-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;

  & .eyebrow { margin-bottom: 0.5rem; }
  & h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); }
}

.order-close {
  display: grid;
  place-content: center;
  flex: none;
  width: 2.75rem;
  aspect-ratio: 1;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  transition: background var(--fast), color var(--fast), rotate var(--base) var(--ease-spring);

  &:hover { background: var(--ink); color: var(--cream); rotate: 90deg; }
}

.order-intro {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.order-total {
  margin: -0.5rem 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--lavender-soft);
  font-size: var(--fs-sm);

  & strong { font-size: var(--fs-md); }
}

.order-success {
  padding-block: 1rem;
  text-align: center;
  animation: rise var(--slow) var(--ease-out);

  &:focus { outline: none; }
  & h3 { margin: 1.25rem 0 0.75rem; }
  & p { max-width: 30rem; margin-inline: auto; }
  & .small { margin-top: 1rem; color: var(--muted); }
  & .button { margin-top: 1.75rem; }
}

.order-success-icon {
  display: inline-grid;
  place-content: center;
  width: 4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  font-size: 2rem;
  animation: pop var(--slow) var(--ease-spring);
}

@keyframes pop {
  from { scale: 0.4; opacity: 0; }
}

/* Privacy: cookie card & preferences dialog ----------------------------- */

.cookie-card {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 150;
  width: min(380px, 100% - 2.5rem);
  padding: 1.25rem 1.25rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  font-size: var(--fs-sm);
  line-height: 1.5;
  transition: opacity var(--base) var(--ease-out), translate var(--base) var(--ease-out);

  @starting-style {
    opacity: 0;
    translate: 0 1.5rem;
  }

  &.is-leaving {
    opacity: 0;
    translate: 0 1.5rem;
  }

  @media (width <= 520px) {
    left: 0.75rem;
    bottom: 0.75rem;
    width: calc(100% - 1.5rem);
  }
}

.cookie-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;

  & svg { flex: none; width: 1.5rem; height: 1.5rem; color: var(--coral-deep); }
}

.cookie-card-copy {
  color: var(--muted);

  & a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;

  & .cookie-btn { flex: 1 1 auto; }
}

.cookie-btn {
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.2;
  transition: background var(--fast), color var(--fast), translate var(--fast);

  &:hover { translate: 0 -2px; }

  &.is-primary {
    background: var(--ink);
    color: var(--cream);

    &:hover { background: var(--coral); color: var(--ink); }
  }

  &.is-secondary:hover { background: var(--sand); }

  &.is-text {
    flex: 0 0 100%;
    min-height: 0;
    padding: 0.35rem;
    border-color: transparent;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;

    &:hover { color: var(--coral-deep); translate: 0; }
  }
}

.cookie-dialog {
  width: min(100% - 2rem, 520px);
  max-height: min(90dvh, 640px);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  scale: 0.96;
  transition:
    opacity var(--base) var(--ease-out),
    scale var(--base) var(--ease-out),
    overlay var(--base) allow-discrete,
    display var(--base) allow-discrete;

  &[open] {
    opacity: 1;
    scale: 1;

    @starting-style {
      opacity: 0;
      scale: 0.96;
    }
  }

  &::backdrop {
    background: rgb(30 20 29 / 0);
    backdrop-filter: blur(0);
    transition:
      background var(--base),
      backdrop-filter var(--base),
      overlay var(--base) allow-discrete,
      display var(--base) allow-discrete;
  }

  &[open]::backdrop {
    background: rgb(30 20 29 / 0.55);
    backdrop-filter: blur(4px);

    @starting-style {
      background: rgb(30 20 29 / 0);
      backdrop-filter: blur(0);
    }
  }

  & h2 {
    margin-bottom: 1.25rem;
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
    line-height: 1.15;
  }

  & .cookie-actions {
    justify-content: flex-end;
    margin-top: 1.25rem;

    & .cookie-btn { flex: 0 1 auto; }
  }
}

.cookie-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
  cursor: pointer;

  & strong { font-size: var(--fs-base); }
  & p { margin-top: 0.25rem; color: var(--muted); font-size: var(--fs-sm); }
}

.cookie-note {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-xs);
}

.switch {
  position: relative;
  flex: none;
  width: 3rem;
  height: 1.75rem;
  margin: 0;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  appearance: none;
  cursor: pointer;
  transition: background var(--base) var(--ease-out);

  &::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.75rem - 6px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
    transition: translate var(--base) var(--ease-spring);
  }

  &:checked {
    background: var(--ink);

    &::before { translate: 1.25rem 0; }
  }

  &:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }
}

.cookie-footer-link {
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.menu-open .cookie-card {
  opacity: 0;
  pointer-events: none;
}

@media (width <= 720px) {
  body:has(.cookie-card) .floating-contact {
    opacity: 0;
    pointer-events: none;
  }
}

/* Motion ----------------------------------------------------------------- */

.reveal-ready {
  transition: opacity var(--slow) var(--ease-out), translate var(--slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);

  &:not(.is-visible) {
    opacity: 0;
    translate: 0 1.75rem;
  }
}

@keyframes rise {
  from { opacity: 0; translate: 0 1.25rem; }
}

@keyframes bob {
  0%, 100% { translate: 0 0; rotate: 8deg; }
  50% { translate: 0 -8px; rotate: 14deg; }
}

@keyframes ping {
  from { opacity: 0.55; scale: 1; }
  to { opacity: 0; scale: 1.7; }
}

@keyframes spin {
  to { rotate: 1turn; }
}

@keyframes marquee {
  to { translate: -50% 0; }
}

@keyframes page-out {
  to { opacity: 0; translate: 0 -0.75rem; }
}

@keyframes page-in {
  from { opacity: 0; translate: 0 1rem; }
}

/* Smooth cross-document page transitions where supported. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-out 0.25s var(--ease-out) both;
}

::view-transition-new(root) {
  animation: page-in 0.45s var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .tape-track { animation: none; }

  .reveal-ready:not(.is-visible) {
    opacity: 1;
    translate: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* Print ------------------------------------------------------------------ */

@media print {
  .site-header,
  .announcement,
  .site-footer,
  .floating-contact,
  .share,
  .contact-banner,
  .article-aside,
  .cookie-card,
  .cookie-dialog,
  #reading-progress {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font: 12pt / 1.5 var(--font-serif);
  }

  .wrap { width: 100%; }
  .article-layout { display: block; padding: 0; }
  .article-cover { max-height: 220px; }
  .article-hero h1 { font-size: 32pt; }
  .article-body h2 { font-size: 20pt; }

  .reveal-ready {
    opacity: 1 !important;
    translate: none !important;
  }
}
