/* es.apertureclinic.com — brand tokens from aperture-clinic/brand/brand.md. */
:root {
  --navy: #1B2430;
  --navy-deep: #121922;
  --paper: #E8ECF0;
  --copper: #B87333;
  --copper-text: #8A5220;      /* copper darkened to 4.5:1+ as text on light surfaces */
  --copper-light: #E9B98A;     /* copper lifted for text on navy */
  --copper-wash: rgba(184, 115, 51, 0.1);
  --ink: #12151A;
  --mist: #F5F6F7;
  --white: #FFFFFF;
  --muted: #4A5561;
  --rule: #DCE1E6;
  --shadow-sm: 0 1px 2px rgba(18, 21, 26, 0.05), 0 4px 14px rgba(18, 21, 26, 0.05);
  --shadow-md: 0 2px 6px rgba(18, 21, 26, 0.05), 0 18px 40px rgba(18, 21, 26, 0.09);
  --radius: 20px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--copper-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 4px; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }
.narrow { max-width: 48rem; }

.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 100; background: var(--navy); color: var(--paper); padding: 0.5rem 1rem; border-radius: 8px; }
.skip:focus { left: 0.5rem; }

/* ---- Type ---------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--display); font-weight: 450; line-height: 1.12; letter-spacing: -0.012em; color: var(--navy); margin: 0; }
.display {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  font-weight: 380;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.display em, h2 em { font-style: italic; font-weight: 340; color: var(--copper-text); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-weight: 400; font-variation-settings: 'opsz' 120; }
h3 { font-size: 1.3rem; font-weight: 500; }
p { margin: 0 0 1rem; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 38rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.78rem; font-weight: 600; color: var(--copper-text); margin: 0 0 1rem; }
.fine { font-size: 0.9rem; color: var(--muted); margin: 0.9rem 0 0; }

/* ---- Buttons & links ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap;
  border-radius: 999px; text-decoration: none; font-weight: 600;
  transition: transform 0.25s var(--ease), background-color 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn-primary { background: var(--navy); color: var(--paper); padding: 1rem 1.5rem; box-shadow: 0 10px 24px rgba(27, 36, 48, 0.22); }
.btn-primary:hover { background: var(--ink); color: var(--white); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(27, 36, 48, 0.28); }
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn-light { background: var(--paper); color: var(--navy); box-shadow: none; }
.btn-light:hover { background: var(--white); color: var(--navy); }
.btn-small { background: var(--navy); color: var(--paper); padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.btn-small:hover { background: var(--ink); color: var(--white); }
.link-arrow { font-weight: 600; color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.link-arrow::after { content: '→'; color: var(--copper); transition: transform 0.25s var(--ease); }
.link-arrow:hover { color: var(--copper-text); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---- Language bar -------------------------------------------------------- */
.langbar { background: var(--navy-deep); color: var(--paper); font-size: 0.88rem; }
.langbar-inner { display: flex; align-items: center; gap: 0.6rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.langbar p { margin: 0; }
.langbar a { color: var(--copper-light); margin-left: 0.3rem; }
.langbar-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px rgba(184, 115, 51, 0.22); flex: none; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 246, 247, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(220, 225, 230, 0.8);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; white-space: nowrap; flex: none; text-decoration: none; color: var(--navy); font-family: var(--display); font-weight: 500; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--navy); }
.mark { width: 2.15rem; height: 2.15rem; border-radius: 0.55rem; flex: none; }
.site-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.site-nav a { white-space: nowrap; color: var(--muted); text-decoration: none; font-size: 0.97rem; font-weight: 500; padding: 0.3rem 0; background: linear-gradient(var(--copper), var(--copper)) 0 100% / 0 1.5px no-repeat; transition: color 0.2s, background-size 0.3s var(--ease); }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--navy); background-size: 100% 1.5px; }

.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 2.75rem; height: 2.75rem; border-radius: 999px; display: grid; place-content: center; gap: 5px; background: var(--white); box-shadow: var(--shadow-sm); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 18px; height: 1.6px; background: var(--navy); transition: transform 0.25s var(--ease); }
.menu[open] summary span:first-child { transform: translateY(3.3px) rotate(45deg); }
.menu[open] summary span:last-child { transform: translateY(-3.3px) rotate(-45deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 0.6rem); width: min(20rem, calc(100vw - 2rem)); background: var(--white); border-radius: 18px; box-shadow: var(--shadow-md); padding: 0.75rem; display: grid; gap: 0.15rem; }
.menu-panel a:not(.btn) { color: var(--navy); text-decoration: none; padding: 0.75rem 0.9rem; border-radius: 12px; font-weight: 500; }
.menu-panel a:not(.btn):hover, .menu-panel a[aria-current='page'] { background: var(--mist); }
.menu-panel .btn { justify-content: center; margin-top: 0.5rem; font-size: 0.95rem; }
@media (max-width: 66rem) {
  .site-nav, .header-inner > .btn-small { display: none; }
  .menu { display: block; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem);
  background:
    radial-gradient(60rem 36rem at 88% 8%, rgba(184, 115, 51, 0.13), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgba(27, 36, 48, 0.06), transparent 60%);
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 4rem; } }
.pill { display: inline-flex; align-items: center; gap: 0.55rem; margin: 0 0 1.6rem; padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--white); box-shadow: var(--shadow-sm); font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); }
.hero .display { margin-bottom: 1.4rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin: 2rem 0 1.75rem; }
.notice {
  max-width: 36rem; padding: 1rem 1.15rem; border-radius: 14px;
  background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--copper);
  font-size: 0.95rem; color: var(--muted); box-shadow: var(--shadow-sm);
}
.notice strong { display: block; color: var(--navy); margin-bottom: 0.15rem; }

.hero-visual { position: relative; width: min(100%, 30rem); aspect-ratio: 1; margin: 0 auto; }
.halo { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(184, 115, 51, 0.28), rgba(184, 115, 51, 0.08) 60%, transparent 75%); filter: blur(10px); }
.iris { position: relative; width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(18, 25, 34, 0.35)); }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.65rem 0.95rem; border-radius: 14px; background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md); font-size: 0.88rem; font-weight: 600; color: var(--navy); white-space: nowrap;
  animation: float 7s ease-in-out infinite;
}
.chip-icon { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-content: center; background: var(--copper-wash); color: var(--copper-text); }
.chip-icon .icon { width: 1.05rem; height: 1.05rem; }
.chip-a { top: 9%; left: -4%; }
.chip-b { bottom: 8%; right: -3%; animation-delay: -3.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 30rem) { .chip { font-size: 0.8rem; padding: 0.55rem 0.75rem; } .chip-a { left: 0; } .chip-b { right: 0; } }

/* ---- Trust strip --------------------------------------------------------- */
.trust { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 60rem) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 0.8rem; padding: 1.4rem 0.5rem; font-weight: 500; color: var(--navy); font-size: 0.98rem; line-height: 1.3; }
.trust-item .icon { width: 1.6rem; height: 1.6rem; color: var(--copper); flex: none; }
@media (min-width: 60rem) { .trust-item { justify-content: center; } .trust-item + .trust-item { border-left: 1px solid var(--rule); } }

/* ---- Sections ------------------------------------------------------------ */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-tight { padding-top: clamp(2rem, 4vw, 3rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head .lede { margin-top: 1rem; }
.section-link { margin: 2rem 0 0; }
.section-tint { background: linear-gradient(180deg, #EDF0F3, var(--mist)); }
.section-dark {
  color: var(--paper);
  background:
    radial-gradient(50rem 30rem at 85% 0%, rgba(184, 115, 51, 0.16), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--navy-deep));
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: var(--copper-light); }

/* ---- Steps --------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.step { position: relative; background: var(--white); border-radius: var(--radius); padding: 1.75rem 1.6rem 1.6rem; box-shadow: var(--shadow-sm); border: 1px solid rgba(220, 225, 230, 0.7); transition: transform 0.35s var(--ease), box-shadow 0.35s; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.step-icon { width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-content: center; background: var(--copper-wash); color: var(--copper-text); }
.step-icon .icon { width: 1.5rem; height: 1.5rem; }
.step-num { font-family: var(--display); font-size: 2.6rem; font-weight: 300; color: rgba(27, 36, 48, 0.14); line-height: 1; font-variant-numeric: lining-nums; }
.step h3 { margin-bottom: 0.5rem; }
.step p { margin: 0; color: var(--muted); }

/* ---- Comparison cards ---------------------------------------------------- */
.compare { display: grid; gap: 1.25rem; }
@media (min-width: 56rem) { .compare { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.card { border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.25rem); }
.card h3 { font-size: 1.55rem; margin-bottom: 1.25rem; }
.card-label { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.75rem; font-weight: 600; margin: 0 0 0.6rem; }
.marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.marks li { display: flex; gap: 0.8rem; align-items: flex-start; line-height: 1.45; }
.mark-icon { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-content: center; flex: none; margin-top: -0.05rem; }
.mark-icon .icon { width: 0.95rem; height: 0.95rem; stroke-width: 2.2; }
.mark-no { background: rgba(74, 85, 97, 0.12); color: #6B7682; }
.mark-yes { background: var(--copper); color: var(--white); }

/* Light-surface cards (compounded page) */
.card-muted { background: var(--white); border: 1px solid var(--rule); color: var(--muted); }
.card-muted .card-label { color: var(--muted); }
.card-glow { background: var(--white); border: 1px solid rgba(184, 115, 51, 0.55); box-shadow: 0 0 0 4px var(--copper-wash), var(--shadow-md); }
.card-glow .card-label { color: var(--copper-text); }
.card strong { color: var(--navy); }

/* Dark-surface cards (home) */
.section-dark .card-muted { background: rgba(255, 255, 255, 0.035); border-color: rgba(255, 255, 255, 0.1); color: rgba(232, 236, 240, 0.72); }
.section-dark .card-muted h3 { color: rgba(255, 255, 255, 0.78); }
.section-dark .card-muted .card-label { color: rgba(232, 236, 240, 0.55); }
.section-dark .mark-no { background: rgba(255, 255, 255, 0.08); color: rgba(232, 236, 240, 0.6); }
.section-dark .card-glow { background: var(--paper); color: var(--ink); border-color: var(--copper); box-shadow: 0 0 0 5px rgba(184, 115, 51, 0.18), 0 30px 60px rgba(0, 0, 0, 0.35); }
.section-dark .card-glow h3 { color: var(--navy); }
.compare-close { font-family: var(--display); font-style: italic; font-weight: 340; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--copper-light); margin: 2.25rem 0 0; }

/* ---- Manifesto ----------------------------------------------------------- */
.manifesto { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.manifesto li {
  font-family: var(--display); font-weight: 350; font-variation-settings: 'opsz' 120;
  font-size: clamp(1.45rem, 3.2vw, 2.3rem); line-height: 1.2; letter-spacing: -0.015em; color: var(--navy);
  padding: 1.35rem 0 1.35rem 3rem; border-bottom: 1px solid var(--rule); position: relative;
}
.manifesto li::before { content: '—'; position: absolute; left: 0; color: var(--copper); }
.manifesto-close { margin: 2rem 0 0; font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.manifesto-close strong { color: var(--navy); }

/* ---- Split + mini cards -------------------------------------------------- */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .split { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; } }
.split h2 { margin-bottom: 1.25rem; }
.split p { color: var(--muted); max-width: 34rem; }
.mini-stack { display: grid; gap: 0.9rem; }
.mini { display: flex; align-items: center; gap: 1rem; background: var(--white); border-radius: 16px; padding: 1.05rem 1.25rem; box-shadow: var(--shadow-sm); border: 1px solid rgba(220, 225, 230, 0.7); }
.mini p { margin: 0; font-weight: 600; color: var(--navy); }
.mini .mini-label { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.mini-yes { border-color: rgba(184, 115, 51, 0.5); box-shadow: 0 0 0 4px var(--copper-wash), var(--shadow-sm); }
.mini-yes .mini-label { color: var(--copper-text); }

/* ---- FAQ ----------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.4rem 0; font-family: var(--display); font-weight: 450; font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--navy); line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--copper-text); }
.faq-toggle { position: relative; width: 2rem; height: 2rem; border-radius: 50%; flex: none; border: 1px solid var(--rule); background: var(--white); transition: transform 0.3s var(--ease), background-color 0.3s; }
.faq-toggle::before, .faq-toggle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; background: var(--navy); transform: translate(-50%, -50%); transition: transform 0.3s var(--ease); }
.faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-toggle { background: var(--navy); border-color: var(--navy); }
.faq-item[open] .faq-toggle::before, .faq-item[open] .faq-toggle::after { background: var(--paper); }
.faq-item[open] .faq-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-body { padding: 0 3.5rem 1.4rem 0; color: var(--muted); }
.faq-body p { margin: 0; }

/* ---- Page hero (sub-pages) ----------------------------------------------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  background: radial-gradient(50rem 30rem at 95% 0%, rgba(184, 115, 51, 0.12), transparent 60%);
}
.page-hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .page-hero-grid { grid-template-columns: 1.4fr 0.6fr; } }
.page-hero .display { font-size: clamp(2.4rem, 5.4vw, 4rem); margin-bottom: 1.2rem; }
.page-hero-visual { width: min(100%, 17rem); justify-self: center; opacity: 0.95; }
@media (max-width: 56rem) { .page-hero-visual { display: none; } }

.prose-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .prose-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.prose-block h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin-bottom: 1rem; }
.prose-block p, #idioma p { color: var(--muted); }
#idioma h2 { margin-bottom: 1.25rem; }

/* ---- CTA band ------------------------------------------------------------ */
.cta-band {
  color: var(--paper);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background:
    radial-gradient(40rem 26rem at 12% 50%, rgba(184, 115, 51, 0.2), transparent 65%),
    linear-gradient(180deg, var(--navy), var(--navy-deep));
}
.cta-band-inner { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .cta-band-inner { grid-template-columns: 0.42fr 1fr; gap: 4rem; } }
.cta-band-visual { width: min(100%, 15rem); justify-self: center; }
.cta-band h2 { color: var(--white); font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin-bottom: 2rem; max-width: 36rem; }
.cta-band h2 em { color: var(--copper-light); }
.cta-band .fine { color: rgba(232, 236, 240, 0.7); }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: rgba(232, 236, 240, 0.78); font-size: 0.93rem; padding: 3.5rem 0 2.5rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.footer-grid { display: grid; gap: 2.25rem; }
@media (min-width: 56rem) { .footer-grid { grid-template-columns: 1fr 1fr 1.6fr; gap: 3rem; } }
.brand-light { color: var(--white); }
.brand-light:hover { color: var(--white); }
.footer-brand p { margin: 0.9rem 0 0; }
.footer-nav { display: grid; gap: 0.55rem; align-content: start; }
.footer-nav a { color: rgba(232, 236, 240, 0.85); text-decoration: none; }
.footer-nav a:hover { color: var(--copper-light); }
.footer-legal p { margin: 0 0 0.75rem; }
.footer-legal strong { color: var(--white); }
.footer-meta { opacity: 0.6; margin-top: 1.25rem !important; }

/* ---- Icons --------------------------------------------------------------- */
.icon { width: 1.5rem; height: 1.5rem; }

/* ---- Reveal on scroll ----------------------------------------------------
   The head sets .js before first paint so content doesn't flash. If site.js
   then fails to load, reveal-fallback shows everything after 2.5s anyway —
   content must never be stuck invisible. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease) var(--d, 0ms), transform 0.8s var(--ease) var(--d, 0ms); animation: reveal-fallback 0s 2.5s forwards; }
.js .reveal.is-visible { opacity: 1; transform: none; animation: none; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .chip { animation: none; }
  .btn, .step, .faq-toggle { transition: none; }
}

/* What the main button does, stated under it. */
.cta-note { max-width: 34rem; margin: -0.75rem 0 1.5rem; font-size: 0.93rem; color: var(--muted); }

/* ---- Treatments ---------------------------------------------------------- */
[id] { scroll-margin-top: 5.5rem; }
.cat-grid { display: grid; gap: 0.9rem; }
@media (min-width: 40rem) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.4rem; border-radius: 16px; background: var(--white);
  border: 1px solid rgba(220, 225, 230, 0.8); box-shadow: var(--shadow-sm);
  text-decoration: none; transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(184, 115, 51, 0.5); }
.cat-name { font-family: var(--display); font-size: 1.25rem; font-weight: 450; color: var(--navy); }
.cat-count { font-size: 0.88rem; color: var(--muted); white-space: nowrap; }
.cat-count::after { content: ' →'; color: var(--copper); }

.treat-notices { display: grid; gap: 0.9rem; margin-bottom: 2rem; }
@media (min-width: 56rem) { .treat-notices { grid-template-columns: 1fr 1fr; } }
.treat-notices p { margin: 0; padding: 1rem 1.15rem; border-radius: 14px; background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--copper); font-size: 0.95rem; color: var(--muted); }
.treat-notices strong { display: block; color: var(--navy); margin-bottom: 0.15rem; }

.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.jump a { padding: 0.45rem 0.95rem; border-radius: 999px; background: var(--white); border: 1px solid var(--rule); color: var(--navy); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: border-color 0.2s, background-color 0.2s; }
.jump a:hover { border-color: var(--copper); background: #FFF9F3; }

.treat-group { padding-top: clamp(2.25rem, 5vw, 3.5rem); }
.treat-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.9rem; margin-bottom: 1.4rem; }
.treat-group-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.treat-group-head span { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.treat-grid { display: grid; gap: 1.1rem; }
@media (min-width: 48rem) { .treat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .treat-grid { grid-template-columns: repeat(3, 1fr); } }
.treat {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem; border: 1px solid rgba(220, 225, 230, 0.8); box-shadow: var(--shadow-sm);
}
.treat h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.treat-desc { color: var(--muted); font-size: 0.98rem; }
.treat-note { font-size: 0.92rem; color: var(--navy); background: var(--mist); border-radius: 10px; padding: 0.6rem 0.8rem; }
.treat-reg { font-size: 0.88rem; color: var(--muted); border-left: 2px solid var(--copper); padding: 0.1rem 0 0.1rem 0.75rem; }
.treat-reg span { display: block; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; font-weight: 600; color: var(--copper-text); margin-bottom: 0.15rem; }
.btn-intake { margin-top: auto; align-self: flex-start; padding: 0.75rem 1.15rem; font-size: 0.93rem; box-shadow: 0 6px 16px rgba(27, 36, 48, 0.18); }
.treat .btn-intake { margin-top: auto; }
.treat > p:last-of-type { margin-bottom: 1.25rem; }

/* ---- Product renders on treatment cards and category tiles --------------- */
/* Vials stand on a baseline inside the content box; the bottom padding is a
   strip reserved for the caption, so an image can never run over it. */
.treat-media {
  position: relative; margin: -0.35rem -0.3rem 1.25rem; height: 13.5rem; border-radius: 16px;
  padding: 1rem 1rem 1.9rem;
  display: flex; align-items: flex-end; justify-content: center;
  background:
    radial-gradient(60% 55% at 50% 62%, rgba(184, 115, 51, 0.16), transparent 70%),
    linear-gradient(180deg, #F7F4F0, #EEF0F2);
  overflow: hidden;
}
.treat-media img { height: 10.4rem; width: auto; filter: drop-shadow(0 14px 18px rgba(18, 25, 34, 0.18)); transition: transform 0.45s var(--ease); }
.treat:hover .treat-media img { transform: translateY(-4px); }
.treat-media-pair img + img { margin-left: -1.6rem; transform: scale(0.9); transform-origin: 50% 100%; }
.treat:hover .treat-media-pair img + img { transform: translateY(-4px) scale(0.9); }
.treat-media figcaption { position: absolute; right: 0.7rem; bottom: 0.5rem; font-size: 0.7rem; letter-spacing: 0.04em; color: rgba(74, 85, 97, 0.75); }

.cat { justify-content: flex-start; gap: 1rem; }
.cat-img { height: 3.6rem; width: auto; flex: none; filter: drop-shadow(0 6px 8px rgba(18, 25, 34, 0.16)); transition: transform 0.35s var(--ease); }
.cat:hover .cat-img { transform: translateY(-2px) rotate(-3deg); }
.cat-text { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .treat-media img, .cat-img { transition: none; } }
