/* SolMedic: demo de Landing Básica. Mobile-first, HTML + CSS puro. */

:root {
  --white: #ffffff;
  --mist: #f2f8f8;
  --ink: #16303a;
  --slate: #4f6a76;
  --teal: #14949b;
  --teal-deep: #0c737a;
  --sun: #f28c28;
  --sun-hover: #e27d1a;
  --sun-text: #a85200;
  --coral: #e5384f;
  --coral-text: #c42a40;
  --line: rgba(22, 48, 58, 0.1);
  --shadow: 0 8px 24px -4px rgba(20, 148, 155, 0.12);
  --shadow-up: 0 16px 32px -6px rgba(20, 148, 155, 0.2);

  --r-card: 24px;
  --r-inner: 16px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --header-h: 64px;
  --gutter: 16px;
}

@media (min-width: 900px) {
  :root { --header-h: 72px; --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

.ico { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 12px 28px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .16s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 10px 20px; font-size: .9375rem; }
.btn--lg { padding: 16px 32px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

/* El texto va en tinta: el blanco sobre el naranja no llega a contraste AA */
.btn--sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 16px -6px rgba(242, 140, 40, 0.55); }
.btn--sun:hover { background: var(--sun-hover); }
.btn--sun:focus-visible { outline-color: var(--ink); }

.btn--outline { background: var(--white); color: var(--teal-deep); border-color: var(--teal-deep); }
.btn--outline:hover { background: var(--teal-deep); color: var(--white); }

.btn--outline-coral { background: transparent; color: var(--coral-text); border-color: var(--coral-text); }
.btn--outline-coral:hover { background: var(--coral-text); color: var(--white); }

.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 700; font-size: .9375rem; text-decoration: none;
}
.link .ico { transition: transform .25s var(--ease); }
@media (hover: hover) and (pointer: fine) { .link:hover .ico { transform: translateX(4px); } }
.link--sun { color: var(--sun-text); }
.link--teal { color: var(--teal-deep); }
.link:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__bar { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.header__logo { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; }
.header__logo img { height: 48px; width: auto; }
@media (min-width: 900px) { .header__logo img { height: 56px; } }

.nav { display: none; }
.header__cta { display: none; }

.burger {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 12px; color: var(--ink); cursor: pointer;
}
.burger__bars { position: relative; width: 24px; height: 18px; display: block; }
.burger__bars i {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .3s var(--ease), opacity .2s;
}
.burger__bars i:nth-child(1) { top: 0; }
.burger__bars i:nth-child(2) { top: 8px; }
.burger__bars i:nth-child(3) { top: 16px; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.panel {
  display: grid; gap: 20px; padding: 8px var(--gutter) 24px;
  background: var(--white); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -20px rgba(22, 48, 58, 0.25);
}
.panel[hidden] { display: none; }
.panel__nav { display: grid; }
.panel__nav a {
  display: flex; align-items: center; min-height: 48px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.panel__nav a:hover { color: var(--teal-deep); }

@media (min-width: 560px) {
  .header__cta { display: inline-flex; }
}
@media (min-width: 900px) {
  .burger, .panel { display: none; }
  .nav { display: flex; align-items: center; gap: 28px; font-weight: 500; font-size: .9375rem; }
  .nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
  .nav a:hover { color: var(--teal-deep); border-color: var(--teal); }
  .header__logo { margin-right: 0; }
  .header__bar { gap: 32px; }
  .nav { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero { padding: 16px 0 48px; background: var(--white); }
.hero__grid { display: grid; gap: 24px; align-items: center; }
.hero__media {
  border-radius: var(--r-card); overflow: hidden; background: var(--mist);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.pill {
  display: inline-block; padding: 6px 14px; margin-bottom: 14px;
  background: var(--mist); border: 1px solid var(--line); border-radius: 999px;
  color: var(--teal-deep); font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.25rem, 8.5vw, 3.75rem); line-height: 1.05; letter-spacing: -0.02em; }
.hero h1 span { color: var(--teal-deep); }
.hero__lead { margin: 16px 0 28px; max-width: 30em; font-size: 1.0625rem; color: var(--slate); }
.hero .btn { width: 100%; }

@media (min-width: 640px) {
  .hero .btn { width: auto; }
}
@media (min-width: 900px) {
  .hero { padding: 40px 0 72px; }
  .hero__grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .hero__copy { order: 1; }
  .hero__media { order: 2; aspect-ratio: 4 / 3; align-self: center; }
  .hero__lead { font-size: 1.1875rem; max-width: 480px; }
}

/* ---------- Secciones ---------- */
.sec { padding: 56px 0; }
.sec--mist { background: var(--mist); border-block: 1px solid var(--line); }
.sec--tight { padding: 48px 0; }
.sec__head { max-width: 640px; margin-bottom: 32px; }
.sec__head h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.15; letter-spacing: -0.015em; }
.sec__head p { margin-top: 10px; color: var(--slate); }

@media (min-width: 900px) {
  .sec { padding: 88px 0; }
  .sec__head { margin-bottom: 48px; }
}

/* ---------- Categorías ---------- */
.cats { display: grid; gap: 24px; }
.cat {
  display: grid; gap: 20px; padding: 20px;
  background: var(--white); border: 1px solid var(--line); border-top-width: 4px;
  border-radius: var(--r-card); box-shadow: var(--shadow);
}
.cat--sun { border-top-color: var(--sun); }
.cat--teal { border-top-color: var(--teal); }
.cat--coral { border-top-color: var(--coral); }
.cat__img { order: -1; border-radius: var(--r-inner); overflow: hidden; height: 220px; background: var(--mist); }
.cat__img img { width: 100%; height: 100%; object-fit: cover; }
.cat h3 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 12px; }
.cat__text > p { color: var(--slate); }
.cat__text .link { margin-top: 12px; }
.tag { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.3; }
.tag--sun { background: #fff1e2; color: var(--sun-text); }
.tag--teal { background: #e3f4f4; color: var(--teal-deep); }
.tag--coral { background: #fde8eb; color: var(--coral-text); }
.bullets { display: grid; gap: 8px; margin: 18px 0 8px; font-size: .9375rem; color: var(--slate); }
.bullets li { position: relative; padding-left: 18px; }
.bullets li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--teal)); }
.bullets--sun { --dot: var(--sun); }
.bullets--teal { --dot: var(--teal); }
.bullets--coral { --dot: var(--coral); }
.cat__panel { display: grid; gap: 12px; align-content: start; padding: 20px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-inner); }
.cat__panel .cat__img { order: 0; height: 180px; margin-bottom: 4px; }
.cat__panel h4 { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.cat__panel p { font-size: .9375rem; color: var(--slate); }
.cat__panel .btn { justify-self: start; white-space: normal; text-align: center; }
.cat__note { margin: 16px 0 20px; padding: 14px 16px; background: var(--mist); border-radius: var(--r-inner); font-size: .9375rem; }

@media (min-width: 900px) {
  .cat { grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px; align-items: center; }
  .cat--aside { grid-template-columns: 7fr 5fr; }
  .cat__text { order: 1; }
  .cat__img { order: 2; height: 300px; }
  .cat__panel { order: 2; }
  .cat--flip .cat__img { order: 1; }
  .cat--flip .cat__text { order: 2; }
  .cat h3 { font-size: 1.875rem; }
  .cat__img--short { height: 260px; }
}

/* ---------- Productos ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  display: flex; flex-direction: column; padding: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card__img {
  aspect-ratio: 1; display: grid; place-items: center; padding: 8px; margin-bottom: 12px;
  background: var(--white); border-radius: 12px;
}
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card h3 { font-size: 1rem; line-height: 1.25; }
.card p { flex: 1 0 auto; margin: 6px 0 14px; font-size: .875rem; line-height: 1.45; color: var(--slate); }
.card__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; margin-top: auto; padding: 8px 10px;
  background: var(--mist); color: var(--teal-deep); border-radius: 12px;
  font-size: .8125rem; font-weight: 700; text-align: center; text-decoration: none; line-height: 1.2;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.card__cta:hover { background: var(--teal-deep); color: var(--white); }
.card__cta:active { transform: scale(0.97); }
.card__cta .ico { color: var(--sun-text); transition: color .2s; }
.card__cta:hover .ico { color: var(--white); }

@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); }
}
@media (min-width: 700px) {
  .grid { gap: 20px; }
  .card { padding: 20px; border-radius: var(--r-card); }
  .card__img { padding: 12px; margin-bottom: 16px; }
  .card h3 { font-size: 1.25rem; }
  .card p { font-size: .9375rem; }
  .card__cta { font-size: .9375rem; }
}
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .card__img { aspect-ratio: 1 / 0.85; }
}

/* ---------- Nosotros ---------- */
.about { display: grid; gap: 28px; align-items: center; }
.about__img { border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.about__img img { width: 100%; height: auto; }
.about h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 18px; }
.about__text p { max-width: 34em; color: var(--slate); font-size: 1.0625rem; }
.about__text p + p { margin-top: 14px; font-size: 1rem; }

@media (min-width: 900px) {
  .about { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* ---------- Visítanos ---------- */
.banner { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.banner img { width: 100%; height: auto; }
.info {
  display: grid; gap: 20px; margin-top: 24px; padding: 24px;
  background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-card);
}
.info__item { display: flex; align-items: flex-start; gap: 14px; }
.info__ico {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: var(--white); color: var(--teal-deep); border-radius: 50%; box-shadow: 0 2px 8px rgba(22, 48, 58, .08);
}
.info__ico--sm { width: 36px; height: 36px; background: var(--mist); box-shadow: none; }
.info__item h3 { font-size: 1.0625rem; margin-bottom: 2px; }
.info__item p { color: var(--ink); }
.muted { color: var(--slate) !important; font-size: .9375rem; }

@media (min-width: 800px) {
  .info { grid-template-columns: 1fr 1fr auto; align-items: center; gap: 40px; padding: 32px 40px; }
}

/* ---------- Contacto ---------- */
.contact {
  display: grid; gap: 28px; padding: 28px 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.contact h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); line-height: 1.2; margin-bottom: 10px; }
.contact__text > p { color: var(--slate); max-width: 34em; }
.contact__list { display: grid; gap: 12px; margin: 20px 0; }
.contact__list li { display: flex; align-items: center; gap: 12px; }
.social { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.social__label { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); margin-right: 4px; }
.social a {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; color: var(--teal-deep); background: var(--white);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.social a:hover { background: var(--teal-deep); color: var(--white); }
.social a:active { transform: scale(0.95); }
.contact__cta .btn { width: 100%; }

@media (min-width: 640px) {
  .contact__cta .btn { width: auto; }
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 7fr 5fr; align-items: center; gap: 48px; padding: 48px; }
  .contact__cta { display: flex; justify-content: flex-end; }
}

/* ---------- Footer ---------- */
.footer { position: relative; background: var(--teal-deep); color: var(--white); padding-top: 48px; }
.footer__wave { position: absolute; top: 0; left: 0; width: 100%; height: 28px; display: block; }
.footer__grid { display: grid; gap: 32px; padding-block: 24px 32px; }
.footer__plate { display: inline-block; padding: 10px 12px; margin-bottom: 14px; background: var(--white); border-radius: var(--r-inner); }
.footer__plate img { height: 44px; width: auto; }
.footer__brand p { max-width: 24em; font-size: .9375rem; color: rgba(255, 255, 255, 0.88); }
.footer h4 { font-size: 1rem; margin-bottom: 12px; color: var(--white); }
.footer__col { display: grid; gap: 4px; align-content: start; font-size: .9375rem; color: rgba(255, 255, 255, 0.88); }
.footer__col a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.footer__col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer__legal { padding-block: 20px 88px; border-top: 1px solid rgba(255, 255, 255, 0.22); font-size: .8125rem; color: rgba(255, 255, 255, 0.85); }
.footer :focus-visible { outline-color: var(--white); }

@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 5fr 3fr 4fr; gap: 56px; }
  .footer__legal { padding-bottom: 32px; }
}

/* ---------- Botones flotantes ---------- */
.fab {
  position: fixed; z-index: 50; bottom: 20px;
  display: grid; place-items: center; border-radius: 50%;
  text-decoration: none; box-shadow: 0 10px 24px -8px rgba(22, 48, 58, 0.45);
  transition: transform .2s var(--ease), background-color .2s var(--ease), opacity .3s var(--ease);
}
.fab:active { transform: scale(.94); }
.fab--wa { right: 20px; width: 56px; height: 56px; background: var(--sun); color: var(--ink); }
.fab--wa:hover { background: var(--sun-hover); }
.fab--wa:focus-visible { outline-color: var(--ink); }
.fab--wa .ico { width: 30px; height: 30px; }
.fab--up {
  left: 20px; width: 48px; height: 48px; background: var(--teal-deep); color: var(--white);
  opacity: 0; transform: translateY(12px); pointer-events: none;
}
.fab--up.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab--up:hover { background: var(--ink); }
#topSentinel { position: absolute; top: 600px; left: 0; width: 1px; height: 1px; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .fab--wa { animation: pulse 2.6s ease-in-out infinite; }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 10px 24px -8px rgba(22, 48, 58, 0.45), 0 0 0 0 rgba(242, 140, 40, 0.5); }
    50% { box-shadow: 0 10px 24px -8px rgba(22, 48, 58, 0.45), 0 0 0 12px rgba(242, 140, 40, 0); }
  }
}

/* ---------- Revelado al hacer scroll ---------- */
/* El contenido es visible por defecto; solo se oculta si hay JS y el visitante acepta movimiento */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .card.rv.in { transition: opacity .7s var(--ease) var(--d, 0s), transform .7s var(--ease) var(--d, 0s), box-shadow .3s var(--ease); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
