/* ==========================================================================
   Costa Rica CRM → Cyclo CRM — Página de transición
   Paleta: rojo CR (#c41507) cruzando hacia aqua/teal Cyclo (#79c5cb / #153a46)
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cr-red: #c41507;
  --cr-red-deep: #9a1005;
  --cr-red-soft: #e85a4f;
  --cyclo-aqua: #79c5cb;
  --cyclo-blue: #3d88ab;
  --cyclo-deep: #153a46;
  --cyclo-night: #0b171b;
  --ink: #221f20;
  --ink-soft: #4a5558;
  --paper: #f7fbfb;
  --paper-warm: #fff5f3;
  --line: rgb(21 58 70 / 0.14);

  --font: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --fs-body: clamp(1rem, 0.94rem + 0.35vw, 1.125rem);
  --fs-lead: clamp(1.0625rem, 0.95rem + 0.55vw, 1.35rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --fs-display: clamp(2.35rem, 1.2rem + 4.5vw, 4.5rem);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 68rem;
  --r: 14px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

strong {
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  z-index: 100;
  padding: 0.65rem 1rem;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0.75rem);
  outline: 3px solid var(--cyclo-aqua);
  outline-offset: 2px;
}

/* ---- Top bar ---- */
.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  color: #fff;
}

.topbar__brands {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar__logo {
  width: auto;
  object-fit: contain;
}

.topbar__logo--cr {
  height: 2.1rem;
  filter: brightness(0) invert(1);
}

.topbar__logo--cyclo {
  height: 1.55rem;
}

.topbar__arrow {
  width: 1.5rem;
  height: 2px;
  background: rgb(255 255 255 / 0.55);
  position: relative;
  flex-shrink: 0;
}

.topbar__arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgb(255 255 255 / 0.55);
  border-top: 2px solid rgb(255 255 255 / 0.55);
  transform: translateY(-50%) rotate(45deg);
}

.topbar__phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0.92;
}

.topbar__phone:hover,
.topbar__phone:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topbar__phone:focus-visible {
  outline: 2px solid var(--cyclo-aqua);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (max-width: 40rem) {
  .topbar__logo--cr {
    height: 1.7rem;
  }

  .topbar__logo--cyclo {
    height: 1.25rem;
  }

  .topbar__phone {
    font-size: 0.8rem;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding: clamp(6.5rem, 12vh, 8rem) var(--gutter) clamp(3rem, 8vh, 5rem);
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(
      125deg,
      var(--cr-red) 0%,
      var(--cr-red-deep) 28%,
      #6b2440 52%,
      var(--cyclo-deep) 78%,
      var(--cyclo-night) 100%
    );
}

.hero__wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgb(232 90 79 / 0.45), transparent 60%),
    radial-gradient(ellipse 55% 50% at 88% 75%, rgb(121 197 203 / 0.28), transparent 55%);
  pointer-events: none;
}

.hero__orbit {
  position: absolute;
  right: -8%;
  bottom: -12%;
  width: min(52vw, 28rem);
  opacity: 0.22;
  z-index: 0;
  pointer-events: none;
}

.hero__orbit img {
  width: 100%;
  height: auto;
}

.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.78);
}

.eyebrow--on-light {
  color: var(--cr-red);
}

#hero-title {
  margin: 0 0 1.15rem;
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero__from {
  display: block;
  font-weight: 600;
}

.hero__bridge {
  display: block;
  margin: 0.35rem 0;
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
}

.hero__to {
  display: block;
  font-weight: 600;
  color: var(--cyclo-aqua);
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.88);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.btn--cyclo {
  background: var(--cyclo-aqua);
  color: var(--cyclo-night);
}

.btn--cyclo:hover {
  background: #9bd5d9;
  transform: translateY(-2px);
}

.btn--whatsapp {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / 0.55);
}

.btn--whatsapp:hover {
  background: rgb(255 255 255 / 0.12);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn__hint {
  font-weight: 500;
}

/* ---- Story ---- */
.story {
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  background:
    linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%);
}

.story__inner {
  max-width: 40rem;
  margin: 0 auto;
}

.story h2 {
  margin: 0 0 1.25rem;
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
}

.story__text {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: var(--fs-lead);
}

.story__text:last-child {
  margin-bottom: 0;
}

/* ---- Features ---- */
.features {
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  background:
    linear-gradient(165deg, var(--cyclo-deep) 0%, #123440 55%, var(--cyclo-night) 100%);
  color: #eaf6f6;
}

.section-head {
  max-width: var(--max);
  margin: 0 auto 2.5rem;
}

.section-head .eyebrow {
  color: var(--cyclo-aqua);
}

.section-head h2,
.section-head--light h2 {
  margin: 0 0 0.65rem;
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-lead {
  margin: 0;
  max-width: 34rem;
  color: #b9cfd2;
  font-size: var(--fs-lead);
}

.feat-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--max);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: 1.25rem 1.5rem;
}

.feat {
  padding: 1.15rem 0;
  border-top: 1px dashed rgb(121 197 203 / 0.35);
}

.feat__n {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cyclo-aqua);
}

.feat h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feat p {
  margin: 0;
  color: #b9cfd2;
  font-size: 0.98rem;
}

/* ---- Platform ---- */
.platform {
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  background: var(--paper);
  color: var(--ink);
}

.section-head--light {
  max-width: var(--max);
  margin: 0 auto 2rem;
}

.plat-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--max);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.plat-grid li {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.35rem 1rem 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.plat-grid strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--cyclo-deep);
}

.plat-grid span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (min-width: 48rem) {
  .plat-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2.5rem;
  }
}

@media (min-width: 64rem) {
  .plat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- Redirect / mega CTAs ---- */
.redirect {
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  background:
    linear-gradient(
      145deg,
      var(--cr-red) 0%,
      #8f1830 35%,
      var(--cyclo-blue) 72%,
      var(--cyclo-deep) 100%
    );
  color: #fff;
}

.redirect__panel {
  max-width: 42rem;
  margin: 0 auto;
}

.redirect .eyebrow {
  color: rgb(255 255 255 / 0.8);
}

.redirect h2 {
  margin: 0 0 1rem;
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.redirect__lead {
  margin: 0 0 1.75rem;
  font-size: var(--fs-lead);
  color: rgb(255 255 255 / 0.88);
}

.redirect__lead a {
  color: var(--cyclo-aqua);
  font-weight: 600;
  text-underline-offset: 3px;
}

.mega-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  margin-bottom: 0.9rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--r);
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.mega-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.mega-link:hover {
  transform: translateY(-3px);
}

.mega-link__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.mega-link__url {
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.mega-link--site {
  background: var(--cyclo-aqua);
  color: var(--cyclo-night);
}

.mega-link--site:hover {
  background: #9bd5d9;
}

.mega-link--wa {
  background: rgb(255 255 255 / 0.1);
  border-color: rgb(255 255 255 / 0.45);
  color: #fff;
  backdrop-filter: blur(8px);
}

.mega-link--wa:hover {
  background: rgb(255 255 255 / 0.18);
  border-color: #fff;
}

.redirect__phone {
  margin: 1.5rem 0 0;
  font-size: 1rem;
  color: rgb(255 255 255 / 0.85);
}

.redirect__phone a {
  color: #fff;
  font-weight: 600;
  text-underline-offset: 3px;
}

/* ---- Footer ---- */
.footer {
  padding: 2.5rem var(--gutter);
  background: var(--paper);
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.92rem;
}

.footer__brands {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.footer__brands img {
  height: 2rem;
  width: auto;
}

.footer__brands span {
  color: var(--cr-red);
  font-weight: 600;
}

.footer p {
  margin: 0.35rem 0;
}

.footer a {
  color: var(--cyclo-deep);
  font-weight: 500;
  text-underline-offset: 2px;
}

.footer a:focus-visible {
  outline: 2px solid var(--cyclo-aqua);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .hero__orbit img {
    animation: float-spin 28s linear infinite;
  }

  .hero__copy {
    animation: rise-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .topbar {
    animation: fade-down 700ms ease both;
  }

  .reveal {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 600ms ease, transform 600ms ease;
  }

  .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

@keyframes float-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 30rem) {
  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .topbar__brands .topbar__logo--cyclo {
    display: none;
  }

  .topbar__arrow {
    display: none;
  }
}
