/*
 * MiFarmacéutico public website (mifarmaceutico.com). Palette of the pharmacist logo (owner, 1-dic-2026):
 * purple for headers, the main button and the footer; mauve only as an accent (the «Mi» and shapes), never as
 * body text on white (use --mf-mauve-ink there); orange is the colour of ACTION and of notices and always
 * carries dark ink. Every text/background pair passes WCAG AA (see docs/mifarmaceutico/puesta-en-marcha.md).
 * Mobile first; no photos.
 */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../../fonts/mifarmaceutico/nunito-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --mf-purple: #5B0B5E;         /* headers, main button, footer */
    --mf-purple-deep: #3B0A3D;    /* hover and ink of the titles */
    --mf-ink: #2A0A2C;            /* body text */
    --mf-ink-soft: #5E4A63;       /* secondary text */
    --mf-mauve: #B978BE;          /* soft accent: shapes, the «Mi» on dark; not for text on white */
    --mf-mauve-ink: #8E4A96;      /* mauve text on white */
    --mf-orange: #F28C28;         /* action and notices; always with --mf-ink on top */
    --mf-orange-tint: #FBD9A8;    /* notice backgrounds */
    --mf-lavender: #E4D8E8;
    --mf-mist: #F7F2F8;           /* tinted section background */
    --mf-white: #FFFFFF;
    --mf-line: #E4D8E8;
    --mf-footer: #5B0B5E;
    --mf-font: 'Nunito', 'Aptos', system-ui, sans-serif;
    --mf-radius-sm: 10px;
    --mf-radius-md: 18px;
    --mf-radius-lg: 28px;
    --mf-shadow-card: 0 12px 32px rgba(91, 11, 94, .12);
    --mf-gutter: 16px;
    --mf-max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.mf-site { margin: 0; font-family: var(--mf-font); color: var(--mf-ink); background: var(--mf-white); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--mf-purple); }
:focus-visible { outline: 3px solid var(--mf-purple-deep); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--mf-purple-deep); line-height: 1.12; margin: 0; font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 36px); }
h3 { font-size: 20px; }
p { margin: 0; }

.mf-skip { position: absolute; left: -9999px; top: 8px; background: var(--mf-purple); color: var(--mf-white); padding: 8px 16px; border-radius: var(--mf-radius-sm); z-index: 10; }
.mf-skip:focus { left: 8px; }

.mf-demo-notice { margin: 0; padding: 8px var(--mf-gutter); background: var(--mf-orange-tint); color: var(--mf-ink); font-size: 14px; font-weight: 700; text-align: center; }

/* Brand */
.mf-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mf-brand__mark { width: 52px; height: auto; }
.mf-header .mf-brand__mark { width: 50px; }
.mf-header .mf-brand__word { font-size: 22px; }
.mf-brand__word { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.mf-brand__mi { color: var(--mf-mauve-ink); }
.mf-brand__rest { color: var(--mf-purple); }
.mf-brand--inverse .mf-brand__mi { color: var(--mf-mauve); }
.mf-brand--inverse .mf-brand__rest { color: var(--mf-white); }
.mf-brand--inverse .mf-brand__mark { width: 48px; }

/* Header */
.mf-header { border-bottom: 1px solid var(--mf-line); background: var(--mf-white); }
.mf-header__inner { max-width: var(--mf-max); margin: 0 auto; padding: 16px var(--mf-gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.mf-header__brand { text-decoration: none; }
.mf-nav { order: 3; width: 100%; display: grid; gap: 4px; padding-top: 4px; }
.mf-nav a { padding: 12px 16px; border-radius: var(--mf-radius-sm); color: var(--mf-purple); font-weight: 700; font-size: 16px; text-decoration: none; }
.mf-nav a:hover { background: var(--mf-mist); color: var(--mf-purple-deep); }
/* With JavaScript the mobile menu folds behind a button; without it the links stay listed. */
.mf-js .mf-nav { display: none; }
.mf-js .mf-header.is-open .mf-nav { display: grid; }
.mf-menu-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 2px solid var(--mf-lavender); border-radius: 99px; background: var(--mf-white); color: var(--mf-purple); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.mf-js .mf-menu-toggle { display: inline-flex; }
.mf-menu-toggle .mf-icon { width: 22px; height: 22px; }
.mf-menu-toggle__close { display: none; }
.mf-header.is-open .mf-menu-toggle__open { display: none; }
.mf-header.is-open .mf-menu-toggle__close { display: block; }
.mf-header .mf-header__cta { display: none; }

/* Buttons */
.mf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 99px; background: var(--mf-purple); color: var(--mf-white); font-weight: 800; font-size: 16px; text-decoration: none; border: 2px solid var(--mf-purple); }
.mf-btn:hover { background: var(--mf-purple-deep); border-color: var(--mf-purple-deep); }
.mf-btn .mf-icon { width: 22px; height: 22px; }
.mf-btn--ghost { background: transparent; color: var(--mf-purple); }
.mf-btn--ghost:hover { background: var(--mf-mist); color: var(--mf-purple-deep); }
.mf-btn--small { min-height: 40px; padding: 8px 18px; font-size: 14px; }

.mf-eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--mf-mauve-ink); }
.mf-lede { font-size: 18px; line-height: 1.6; color: var(--mf-ink); max-width: 560px; }

/* Hero */
.mf-hero { max-width: var(--mf-max); margin: 0 auto; padding: 40px var(--mf-gutter) 56px; display: grid; gap: 40px; }
.mf-hero__copy { display: grid; gap: 16px; align-content: center; }
.mf-hero__title { font-size: clamp(38px, 7vw, 64px); line-height: 1.04; letter-spacing: -.015em; }
.mf-hero__title span { display: block; color: var(--mf-mauve-ink); background: linear-gradient(transparent 82%, var(--mf-orange) 82%); width: fit-content; }
.mf-hero__actions { display: grid; gap: 12px; margin-top: 8px; }

.mf-hero__art { position: relative; min-height: 360px; display: grid; place-items: center; padding: 24px 8px; }
.mf-shape { position: absolute; border-radius: var(--mf-radius-lg); }
.mf-shape--lavender { inset: 6% 4% 10% 12%; background: var(--mf-lavender); border-radius: 44% 22% 26% 22%; }
.mf-shape--orange { width: 38%; height: 34%; left: 0; bottom: 0; background: var(--mf-orange-tint); border-radius: 50% 50% 18% 50%; }
.mf-shape--mauve { width: 22%; aspect-ratio: 1; right: 2%; top: 0; background: var(--mf-mauve); border-radius: 50%; opacity: .8; }

.mf-chat { position: relative; margin: 0; width: min(100%, 340px); background: var(--mf-white); border-radius: var(--mf-radius-lg); box-shadow: var(--mf-shadow-card); overflow: hidden; }
.mf-chat__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--mf-purple); color: var(--mf-white); }
.mf-chat__head strong { display: block; font-size: 15px; line-height: 1.2; }
.mf-chat__head span { font-size: 13px; color: var(--mf-lavender); }
.mf-chat__avatar { width: 36px; height: 36px; border-radius: 50%; }
.mf-chat__body { display: grid; gap: 8px; padding: 16px; background: var(--mf-mist); }
.mf-bubble { max-width: 86%; padding: 8px 12px 6px; border-radius: 14px; font-size: 15px; line-height: 1.4; color: var(--mf-ink); }
.mf-bubble time { display: block; text-align: right; font-size: 11px; color: var(--mf-ink-soft); margin-top: 2px; }
.mf-bubble--in { background: var(--mf-white); border-top-left-radius: 4px; justify-self: start; }
.mf-bubble--out { background: var(--mf-lavender); border-top-right-radius: 4px; justify-self: end; }
.mf-chat__buttons { display: grid; gap: 6px; max-width: 86%; }
.mf-chat__buttons span { display: block; text-align: center; padding: 8px; background: var(--mf-white); border-radius: var(--mf-radius-sm); color: var(--mf-purple); font-weight: 800; font-size: 14px; border: 1px solid var(--mf-lavender); }
.mf-chat__buttons .mf-chat__action { background: var(--mf-orange); border-color: var(--mf-orange); color: var(--mf-ink); }

/* Sections */
.mf-section { padding: 56px var(--mf-gutter); }
.mf-section > * { max-width: var(--mf-max); margin-left: auto; margin-right: auto; }
.mf-section--tint { background: var(--mf-mist); }
.mf-section__head { display: grid; gap: 12px; margin-bottom: 32px; }
.mf-section__action { margin-top: 32px; }

.mf-steps { list-style: none; padding: 0; display: grid; gap: 16px; }
.mf-step { background: var(--mf-white); border-radius: var(--mf-radius-md); padding: 24px; display: grid; gap: 8px; }
.mf-step__number { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--mf-purple); color: var(--mf-white); font-weight: 800; font-size: 18px; }

.mf-cards { display: grid; gap: 16px; }
.mf-card { position: relative; overflow: hidden; display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--mf-radius-lg); background: var(--mf-mist); }
.mf-card::after { content: ''; position: absolute; width: 88px; height: 88px; right: -28px; top: -32px; border-radius: 50%; opacity: .55; }
.mf-card--mauve::after { background: var(--mf-mauve); }
.mf-card--lavender::after { background: var(--mf-lavender); opacity: 1; }
.mf-card--orange::after { background: var(--mf-orange-tint); opacity: 1; }
.mf-card--plain { background: var(--mf-white); box-shadow: var(--mf-shadow-card); }
.mf-card p { position: relative; z-index: 1; }
.mf-card__icon { color: var(--mf-purple); }
.mf-icon { width: 28px; height: 28px; flex: none; }

/* Trust band */
.mf-trust { width: calc(100% - 2 * var(--mf-gutter)); max-width: var(--mf-max); margin: 0 auto 56px; padding: 32px 24px; border-radius: var(--mf-radius-lg); background: var(--mf-purple); color: var(--mf-white); display: grid; gap: 24px; }
.mf-trust h2 { color: var(--mf-white); font-size: clamp(24px, 3vw, 30px); }
.mf-trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mf-trust li { display: grid; gap: 6px; justify-items: start; font-weight: 700; }
.mf-trust .mf-icon { color: var(--mf-orange-tint); }

/* Contact */
.mf-contact { text-align: center; display: grid; gap: 16px; justify-items: center; }
.mf-contact .mf-lede { margin: 0 auto; }
.mf-contact__email a { font-weight: 800; }
.mf-contact__pending { padding: 12px 20px; border-radius: var(--mf-radius-md); background: var(--mf-orange-tint); color: var(--mf-ink); font-weight: 700; }

/* Legal */
.mf-legal { max-width: 760px; margin: 0 auto; padding: 48px var(--mf-gutter) 64px; display: grid; gap: 16px; }
.mf-legal h1 { font-size: clamp(30px, 5vw, 40px); }
.mf-legal__provisional { padding: 12px 16px; border-radius: var(--mf-radius-sm); background: var(--mf-orange-tint); color: var(--mf-ink); font-weight: 700; }

/* Footer */
.mf-footer { background: var(--mf-footer); color: var(--mf-white); padding: 40px var(--mf-gutter); }
.mf-footer__inner { max-width: var(--mf-max); margin: 0 auto 24px; display: grid; gap: 24px; }
.mf-footer__tagline { margin-top: 12px; color: var(--mf-lavender); font-weight: 700; }
.mf-footer__links { display: grid; gap: 8px; }
.mf-footer__links a { color: var(--mf-white); font-weight: 700; }
.mf-footer__note { max-width: var(--mf-max); margin: 8px auto 0; font-size: 14px; color: var(--mf-lavender); }

@media (min-width: 640px) {
    .mf-hero__actions { display: flex; flex-wrap: wrap; }
    .mf-steps, .mf-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mf-cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mf-trust ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .mf-header__inner { flex-wrap: nowrap; gap: 24px; }
    .mf-header .mf-brand__mark { width: 60px; }
    .mf-header .mf-brand__word { font-size: 26px; }
    .mf-nav, .mf-js .mf-header .mf-nav, .mf-js .mf-header.is-open .mf-nav { order: 0; width: auto; display: flex; padding: 0; gap: 4px; }
    .mf-nav a { padding: 8px 12px; font-size: 15px; }
    .mf-js .mf-menu-toggle { display: none; }
    .mf-header .mf-header__cta { display: inline-flex; }
    .mf-hero { grid-template-columns: 1.05fr .95fr; padding: 72px var(--mf-gutter) 88px; gap: 56px; }
    .mf-hero__art { min-height: 440px; }
    .mf-section { padding: 80px var(--mf-gutter); }
    .mf-trust { grid-template-columns: 1fr 2fr; align-items: center; padding: 40px; }
    .mf-footer__inner { grid-template-columns: 1fr auto; align-items: start; }
}

/* Sign-up (/i/{code}) */
.mf-enroll { max-width: 560px; margin: 0 auto; padding: 32px var(--mf-gutter) 56px; display: grid; gap: 16px; }
.mf-enroll h1 { font-size: clamp(28px, 6vw, 36px); }
.mf-form { display: grid; gap: 16px; margin-top: 8px; }
.mf-field { display: grid; gap: 6px; }
.mf-field label { font-weight: 700; color: var(--mf-purple); }
.mf-field input, .mf-field select { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--mf-lavender); border-radius: var(--mf-radius-sm); font: inherit; color: var(--mf-ink); background: var(--mf-white); }
.mf-field input:focus, .mf-field select:focus { outline: none; border-color: var(--mf-purple); }
.mf-field input[aria-invalid="true"] { border-color: #B42318; }
.mf-field__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.mf-field__hint { font-size: 14px; color: var(--mf-ink-soft); }
.mf-field__error { font-size: 14px; font-weight: 700; color: #B42318; }
.mf-field__optional { font-weight: 400; color: var(--mf-ink-soft); }
.mf-field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mf-check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.mf-check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--mf-purple); }
.mf-btn--block { width: 100%; }
.mf-enroll__key { padding: 12px 16px; border-radius: var(--mf-radius-sm); background: var(--mf-mist); }
