/* Colleger — landing page
   Sistema visual: DESIGN.md «Syllabus» (papel crema, tinta violeta, un acento amarillo).
   Reglas del sistema: radio 0 en todo, sin degradados, la única sombra es la dura del botón amarillo. */

:root {
  /* Colores */
  --color-ink-violet: #0d0129;
  --color-butter-yellow: #fae59b;
  --color-deep-teal: #19615c;
  --color-cream-paper: #fffcf7;
  --color-pure-white: #ffffff;
  --color-shadow-black: #000000;

  /* Tipografía (Roobert y Supply son de pago: Inter y JetBrains Mono son los sustitutos del sistema) */
  --font-roobert: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-supply: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-body-sm: 16px;
  --text-body: 20px;
  --text-subheading: 24px;
  --text-heading-sm: 40px;
  --text-heading: 48px;
  --text-heading-lg: 56px;
  --text-display: 64px;

  /* Espaciado */
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-40: 40px;
  --spacing-64: 64px;
  --spacing-80: 80px;
  --spacing-104: 104px;
  --spacing-120: 120px;

  --page-max-width: 1200px;
  --section-gap: 120px;
  --card-padding: 40px;
  --element-gap: 24px;
  --gutter: 40px;

  --shadow-subtle: rgb(0, 0, 0) 1px 1px 3px 0px;
  --border: 1px solid var(--color-ink-violet);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

body {
  margin: 0;
  background: var(--color-cream-paper);
  color: var(--color-ink-violet);
  font-family: var(--font-roobert);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--color-ink-violet);
  outline-offset: 3px;
}

.teal :focus-visible {
  outline-color: var(--color-butter-yellow);
}

.skip-link {
  position: absolute;
  left: var(--spacing-16);
  top: -100px;
  z-index: 100;
  padding: 10px 20px;
  background: var(--color-ink-violet);
  color: var(--color-cream-paper);
  font-size: var(--text-body-sm);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--spacing-16);
}

.container {
  width: 100%;
  max-width: calc(var(--page-max-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-supply);
  font-size: var(--text-body-sm);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-butter-yellow);
  outline: 1px solid var(--color-ink-violet);
}

.teal .eyebrow::before {
  outline-color: var(--color-butter-yellow);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: var(--border);
  border-radius: 0;
  font-family: var(--font-roobert);
  font-weight: 700;
  font-size: var(--text-body-sm);
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

/* El CTA de la página: amarillo con la sombra dura, «una pegatina sobre el papel». */
.btn-primary {
  padding: 16px 32px;
  background: var(--color-butter-yellow);
  color: var(--color-ink-violet);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 3px 0 var(--color-shadow-black);
}

.btn-primary:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

/* El CTA de la barra: violeta sólido, sin sombra. */
.btn-nav {
  padding: 10px 20px;
  background: var(--color-ink-violet);
  color: var(--color-cream-paper);
}

.btn-nav:hover {
  background: var(--color-deep-teal);
  border-color: var(--color-deep-teal);
}

.btn-ghost {
  padding: 10px 20px;
  background: transparent;
  color: var(--color-ink-violet);
  font-weight: 400;
}

.btn-ghost:hover {
  background: var(--color-pure-white);
}

.teal .btn-ghost {
  border-color: var(--color-cream-paper);
  color: var(--color-cream-paper);
}

.teal .btn-ghost:hover {
  background: rgba(255, 252, 247, 0.08);
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-cream-paper);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-ink-violet);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--element-gap);
  height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-subheading);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand svg {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-body-sm);
}

.nav-links a {
  text-decoration: none;
  text-underline-offset: 6px;
}

.nav-links a:hover {
  text-decoration: underline;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: var(--text-body-sm);
}

.nav-login {
  text-decoration: none;
  text-underline-offset: 6px;
}

.nav-login:hover {
  text-decoration: underline;
}

/* ---------- Hero ---------- */

.hero {
  padding: var(--spacing-80) 0 var(--section-gap);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--spacing-64);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
}

.hero h1 {
  font-size: var(--text-heading-lg);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hero h1 mark {
  background: none;
  box-shadow: inset 0 -0.32em 0 var(--color-butter-yellow);
  color: inherit;
  padding: 0 0.04em;
}

.hero-lead {
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-24);
  margin-top: var(--spacing-16);
}

.hero-note {
  font-family: var(--font-supply);
  font-size: var(--text-body-sm);
}

/* Prueba social: la experiencia del equipo con colegios. */
.hero-proof {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  margin-top: var(--spacing-16);
  font-size: var(--text-body-sm);
}

.hero-proof strong {
  font-weight: 700;
  box-shadow: inset 0 -0.4em 0 var(--color-butter-yellow);
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
  padding: 0 8px;
  border: var(--border);
  background: var(--color-deep-teal);
  color: var(--color-cream-paper);
  font-family: var(--font-supply);
  font-size: 14px;
}

.hero-art {
  position: relative;
}

.hero-art svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ---------- Secciones ---------- */

.section {
  padding: var(--section-gap) 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
  max-width: 760px;
  margin-bottom: var(--spacing-64);
}

.section-head h2 {
  font-size: var(--text-heading);
  line-height: 1.25;
}

.section-head p {
  max-width: 62ch;
}

.narrow {
  max-width: 760px;
}

.title-404 {
  font-size: var(--text-heading);
  line-height: 1.25;
}

.section--flush {
  padding-top: 0;
}

/* Banda teal a sangre completa */
.teal {
  background: var(--color-deep-teal);
  color: var(--color-cream-paper);
}

.teal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--spacing-64) var(--spacing-80);
  align-items: start;
}

.teal h2 {
  font-size: var(--text-heading-sm);
  line-height: 1.27;
}

.teal-art {
  margin-bottom: var(--spacing-64);
}

.teal-art svg {
  width: 100%;
  max-width: 560px;
  height: auto;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
}

.pitch {
  padding-left: var(--spacing-40);
  border-left: 1px solid var(--color-butter-yellow);
}

.pitch strong {
  font-weight: 700;
  color: var(--color-butter-yellow);
}

/* ---------- Tarjetas de funciones ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: var(--border);
  border-left: var(--border);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  padding: var(--card-padding);
  background: var(--color-cream-paper);
  border-right: var(--border);
  border-bottom: var(--border);
  transition: background-color 160ms ease;
}

.feature:hover {
  background: var(--color-pure-white);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--spacing-16);
}

.feature h3 {
  font-size: var(--text-subheading);
  line-height: 1.4;
}

.feature p {
  font-size: var(--text-body-sm);
  line-height: 1.6;
}


.tag {
  align-self: flex-start;
  padding: 2px 10px;
  border: var(--border);
  background: var(--color-butter-yellow);
  font-family: var(--font-supply);
  font-size: 13px;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Cómo funciona ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--element-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  padding: var(--card-padding);
  background: var(--color-pure-white);
  border: var(--border);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--spacing-16);
  border: var(--border);
  background: var(--color-butter-yellow);
  font-family: var(--font-supply);
  font-size: var(--text-body);
  font-weight: 400;
}

.step h3 {
  font-size: var(--text-subheading);
  line-height: 1.4;
}

.step p {
  font-size: var(--text-body-sm);
}

.step ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-supply);
  font-size: 14px;
  line-height: 1.9;
}

.step li::before {
  content: "— ";
}

/* ---------- Facturación electrónica ---------- */

.dgii-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--spacing-80);
  align-items: start;
}

@media (min-width: 861px) {
  .dgii-grid > .stack {
    position: sticky;
    top: 120px;
  }
}

.nowrap {
  white-space: nowrap;
}

.dgii-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 252, 247, 0.4);
}

.dgii-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--spacing-16);
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 252, 247, 0.4);
  font-size: var(--text-body-sm);
}

.dgii-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--color-butter-yellow);
}

.dgii-list strong {
  display: block;
  font-size: var(--text-body);
  line-height: 1.4;
}

.ecf-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--spacing-16) 0 0;
  padding: 0;
  list-style: none;
}

.ecf-types li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 252, 247, 0.5);
  font-size: 14px;
  line-height: 1.6;
}

.ecf-types b {
  font-family: var(--font-supply);
  font-weight: 400;
  color: var(--color-butter-yellow);
}

.dgii-note {
  font-family: var(--font-supply);
  font-size: var(--text-body-sm);
}

/* ---------- Seguridad ---------- */

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--element-gap);
}

.security-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--spacing-24);
  padding: var(--card-padding);
  background: var(--color-pure-white);
  border: var(--border);
}

.security-item svg {
  width: 56px;
  height: 56px;
}

.security-item h3 {
  margin-bottom: 8px;
  font-size: var(--text-subheading);
  line-height: 1.4;
}

.security-item p {
  font-size: var(--text-body-sm);
}

/* ---------- Preguntas frecuentes ---------- */

.faq-list {
  border-top: var(--border);
}

.faq-item {
  border-bottom: var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-24);
  padding: var(--spacing-24) 0;
  font-size: var(--text-subheading);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: var(--border);
  font-family: var(--font-supply);
  font-size: var(--text-body);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--color-butter-yellow);
}

.faq-item summary:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.faq-answer {
  max-width: 70ch;
  padding: 0 0 var(--spacing-40);
}

.faq-answer p + p {
  margin-top: var(--spacing-16);
}

/* ---------- Contacto ---------- */

.contact {
  padding-bottom: var(--section-gap);
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  background: var(--color-pure-white);
  border: var(--border);
}

.contact-copy {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
  padding: var(--spacing-64);
  background: var(--color-butter-yellow);
  border-right: var(--border);
}

.contact-copy h2 {
  font-size: var(--text-heading);
  line-height: 1.25;
}

.contact-copy .already {
  margin-top: auto;
  padding-top: var(--spacing-24);
  border-top: var(--border);
  font-size: var(--text-body-sm);
}

.contact-copy .already a {
  font-weight: 700;
  text-underline-offset: 4px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-24);
  padding: var(--spacing-64);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: var(--text-body-sm);
  font-weight: 700;
  line-height: 1.25;
}

.field .optional {
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: var(--border);
  border-radius: 0;
  background: var(--color-cream-paper);
  color: var(--color-ink-violet);
  font-family: var(--font-roobert);
  font-size: var(--text-body-sm);
  line-height: 1.4;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230d0129' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--color-pure-white);
  box-shadow: inset 0 0 0 1px var(--color-ink-violet);
}

.field input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1px var(--color-ink-violet);
  background: #fff4f2;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-24);
}

.form-status {
  font-family: var(--font-supply);
  font-size: 14px;
}

/* ---------- Pie ---------- */

.site-footer {
  padding: var(--spacing-64) 0;
  border-top: var(--border);
  font-size: var(--text-body-sm);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--element-gap);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  text-underline-offset: 6px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-meta {
  font-family: var(--font-supply);
  font-size: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  :root {
    --text-display: 56px;
    --text-heading-lg: 48px;
    --text-heading: 40px;
    --section-gap: 104px;
  }

  .nav-links {
    display: none;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-copy {
    border-right: 0;
    border-bottom: var(--border);
  }
}

@media (max-width: 860px) {
  :root {
    --text-display: 48px;
    --text-heading-lg: 48px;
    --text-heading: 40px;
    --section-gap: 80px;
    --gutter: 24px;
  }

  .hero {
    padding-top: var(--spacing-40);
  }

  .hero-grid,
  .teal-grid,
  .dgii-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: var(--spacing-64);
  }

  .steps,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .pitch {
    padding-left: var(--spacing-24);
  }
}

@media (max-width: 600px) {
  :root {
    --text-display: 40px;
    --text-heading-lg: 40px;
    --text-heading: 40px;
    --text-heading-sm: 32px;
    --text-subheading: 20px;
    --text-body: 18px;
    --card-padding: 24px;
    --gutter: 16px;
  }

  .nav {
    height: 64px;
  }

  .nav-login {
    display: none;
  }

  .brand {
    font-size: 20px;
  }

  .brand svg {
    width: 28px;
    height: 28px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }


  .security-item {
    grid-template-columns: 1fr;
  }

  .contact-copy,
  .contact-form {
    padding: var(--spacing-40) var(--spacing-24);
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn,
  .form-actions .btn {
    width: 100%;
  }
}
