/*
 * Pagina publica de Cajafy: CSS propio, sin compilar ni framework (hosting compartido, sin Node).
 * Los colores salen del logotipo: azul profundo y verde menta. El panel tiene su propia hoja
 * (panel.css) a proposito: la pagina que vende y la herramienta que se usa no envejecen igual.
 */

:root {
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --navy: #1b3a6b;
  --navy-deep: #142c52;
  --mint: #2fcc8b;
  --mint-soft: #e6faf1;
  --ink: #0f172a;
  --muted: #55627a;
  --line: #dde3ec;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px -12px rgba(27, 58, 107, 0.25);
  --radius: 14px;
  --wrap: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Para que el encabezado pegado no tape el titulo de la seccion a la que se salta. */
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 800;
}

h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
}

h3 {
  font-size: 19px;
  font-weight: 700;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
}

/* ---- encabezado ------------------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-head__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 10px;
}

.site-head__logo img {
  display: block;
  height: 34px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--navy);
  background: var(--surface-2);
}

/* ---- botones ---------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--navy);
  color: #fff;
}

.btn--primary:hover {
  background: var(--navy-deep);
}

.btn--ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
}

.btn--ghost:hover {
  border-color: var(--navy);
}

.btn--mint {
  background: var(--mint);
  color: #06301d;
}

.btn--mint:hover {
  background: #27b87b;
}

.btn--sm {
  padding: 9px 16px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

/* ---- secciones -------------------------------------------------------------------------- */

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 680px;
  margin-bottom: 40px;
}

.section__head p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: #1c7a53;
  background: var(--mint-soft);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- portada ---------------------------------------------------------------------------- */

.hero {
  padding: clamp(44px, 7vw, 84px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(900px 420px at 15% -10%, var(--mint-soft), transparent 60%),
    radial-gradient(800px 400px at 95% 0%, #eaf1fb, transparent 55%);
}

.hero__grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  grid-template-columns: 1fr;
}

.hero p.hero__lead {
  margin-top: 18px;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--muted);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}

.hero__notes li::before {
  content: '✓';
  color: #1c7a53;
  font-weight: 800;
  margin-right: 7px;
}

/* El marco que hace que la captura parezca una ventana y no una imagen suelta. */
.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.shot__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.shot__name {
  margin-left: 8px;
  font-size: 13px;
  color: var(--muted);
}

.shot img {
  display: block;
  width: 100%;
}

/* ---- rejillas --------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--mint-soft);
  color: #15603f;
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

/* ---- ediciones -------------------------------------------------------------------------- */

.editions {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.edition {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.edition--cloud {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.edition--cloud p,
.edition--cloud li {
  color: #c9d8ef;
}

.edition ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.edition li {
  position: relative;
  padding-left: 26px;
  margin-top: 10px;
  color: var(--muted);
}

.edition li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 14px;
  height: 7px;
  border-left: 2.5px solid var(--mint);
  border-bottom: 2.5px solid var(--mint);
  transform: rotate(-45deg);
}

/* ---- planes ----------------------------------------------------------------------------- */

.plans {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  align-items: start;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.plan--featured {
  border-color: var(--navy);
  box-shadow: var(--shadow);
}

.plan__tag {
  position: absolute;
  top: -13px;
  left: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan__name {
  font-size: 20px;
  font-weight: 800;
}

.plan__tagline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 20px 0 4px;
}

.plan__amount {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.plan__period {
  color: var(--muted);
  font-size: 15px;
}

.plan__per {
  color: var(--muted);
  font-size: 14px;
}

.plan__features {
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  flex: 1;
}

.plan__features li {
  position: relative;
  padding-left: 26px;
  margin-top: 10px;
  color: var(--muted);
}

.plan__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 14px;
  height: 7px;
  border-left: 2.5px solid var(--mint);
  border-bottom: 2.5px solid var(--mint);
  transform: rotate(-45deg);
}

.plan__trial {
  margin-top: 12px;
  font-size: 14px;
  color: #1c7a53;
  text-align: center;
}

.plans__note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 15px;
  max-width: 70ch;
}

/* ---- preguntas -------------------------------------------------------------------------- */

.faq {
  max-width: 820px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '–';
}

.faq p {
  margin-top: 12px;
  color: var(--muted);
}

/* ---- descarga --------------------------------------------------------------------------- */

.download {
  display: grid;
  gap: 28px;
  align-items: start;
}

.download h2 {
  margin-top: 6px;
}

.download__lead {
  margin: 14px 0 24px;
  color: var(--muted);
  max-width: 54ch;
}

.btn--lg {
  padding: 15px 28px;
  font-size: 17px;
}

.download__meta {
  margin: 14px 0 0;
  font-weight: 600;
}

.download__hash {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* La huella es de 64 caracteres: parte donde quepa antes que desbordar el telefono. */
.download__hash code {
  font-size: 13px;
  word-break: break-all;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}

.download__side {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.download__reqs {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.download__reqs li {
  position: relative;
  padding-left: 26px;
  margin-top: 10px;
  color: var(--muted);
}

.download__reqs li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 14px;
  height: 7px;
  border-left: 2.5px solid var(--mint);
  border-bottom: 2.5px solid var(--mint);
  transform: rotate(-45deg);
}

.download__warn {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* Lo que se dice cuando no hay nada que mostrar (planes o descarga). */
.muted {
  color: var(--muted);
}

/* ---- cierre y pie ----------------------------------------------------------------------- */

.cta {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: clamp(52px, 7vw, 84px) 0;
}

.cta p {
  margin: 14px auto 0;
  max-width: 56ch;
  color: #c9d8ef;
  font-size: 18px;
}

.cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.site-foot {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.site-foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
}

.site-foot img {
  height: 28px;
  width: auto;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* ---- telefono ---------------------------------------------------------------------------- */

/*
 * En el telefono la barra de arriba se queda con el logotipo y el boton: los enlaces de seccion se
 * iban a dos renglones y el encabezado pegado se comia un tercio de la pantalla. La pagina es un
 * solo scroll, asi que no se pierde nada; el pie los repite.
 */
@media (max-width: 640px) {
  .site-nav a:not(.btn) {
    display: none;
  }
}

/* ---- pantallas grandes ------------------------------------------------------------------ */

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
  }

  .download {
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
  }
}

/* ---- quien prefiere menos movimiento ----------------------------------------------------- */

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