@font-face { font-family: "Outfit"; src: url("/assets/fonts/outfit-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

/* ==========================================================================
   Plantilla web PHP · estilos base
   Cada web cambia los tokens de :root y añade su sección propia al final.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f6f4f3;
  --ink: #1b1b1f;
  --muted: #5c5c63;
  --line: #e7e3e1;
  --accent: #E2001A;
  --accent-dark: #b80015;
  --accent-ink: #ffffff;
  --accent-soft: #fdecee;
  --dark: #1d1d21;
  --dark-ink: #ffffff;
  --dark-muted: #b7b7bf;
  --f-display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "Cascadia Code", Menlo, monospace;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1180px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 62ch; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .75em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .2s, border-color .2s, color .2s;
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-outline { border-color: currentColor; background: transparent; }
.btn-ghost { background: transparent; text-decoration: underline; text-underline-offset: .25em; }
.btn-sm { min-height: 40px; padding: .5em 1.1em; font-size: .95rem; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--muted); padding: 6px 0; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font: 600 .95rem var(--f-body); align-items: center; }
  .nav { position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; }
}

.breadcrumb { padding-block: 14px 0; font-size: .875rem; color: var(--muted); }
.breadcrumb a { color: inherit; }

/* Secciones */
.hero { padding-block: clamp(56px, 10vw, 120px); }
.page-hero { padding-block: clamp(32px, 6vw, 64px) clamp(16px, 3vw, 28px); }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section.alt { background: var(--surface); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-decoration: none; transition: border-color .2s, transform .2s var(--ease-out); }
.card strong { font-family: var(--f-display); font-size: 1.1rem; }
.card span { color: var(--muted); }
@media (hover: hover) { .card:hover { border-color: var(--accent); transform: translateY(-2px); } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0; font: 600 .95rem/1.6 var(--f-mono); color: var(--accent); }

.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 400 1.5rem var(--f-mono); color: var(--accent); transition: rotate .2s var(--ease-out); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Banda final */
.cta-band { background: var(--dark); color: var(--dark-ink); padding-block: clamp(48px, 8vw, 88px); }
.cta-title { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; margin: 0; max-width: 24ch; }
.on-dark .btn-outline { color: var(--dark-ink); }
.on-dark .btn-ghost { color: var(--dark-ink); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-options { display: grid; gap: 12px; }
.contact-card { display: grid; gap: 2px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; overflow-wrap: anywhere; }
.contact-card span { font-weight: 600; }
.contact-card small { color: var(--muted); }
.form-card { padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
form { display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select, textarea { width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
[aria-invalid="true"] { border-color: #c0392b; }
.check { grid-template-columns: auto 1fr; align-items: start; font-weight: 400; }
.check input { width: 20px; min-height: 20px; margin-top: 3px; accent-color: var(--accent); }
.field-error { color: #c0392b; font-weight: 500; font-size: .875rem; }
.alert { border-left: 4px solid #c0392b; background: color-mix(in srgb, #c0392b 8%, transparent); padding: 12px 16px; border-radius: 8px; }
.alert p { margin: 0; }
.hp { position: absolute; left: -9999px; }
.form-ok { font-size: 1.1rem; }
.info-datos { margin-top: 18px; font-size: .875rem; color: var(--muted); }
.info-datos summary { cursor: pointer; font-weight: 600; }
.info-datos dl { margin: 12px 0 0; display: grid; gap: 8px; }
.info-datos dt { font-weight: 600; color: var(--ink); }
.info-datos dd { margin: 0; }

/* Legales */
.legal .tabla { overflow-x: auto; }
.legal table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
mark.pendiente { background: #ffe066; color: #16171d; padding: 0 .25em; border-radius: 3px; }

/* Pie */
.site-footer { background: var(--dark); color: var(--dark-muted); padding-block: 56px 28px; font-size: .95rem; }
.site-footer a { color: var(--dark-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; overflow-wrap: anywhere; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .12); font-size: .875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer .link-btn { color: var(--dark-ink); }

/* Aviso de cookies */
.cookies { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: 560px; margin-inline: auto; padding: 18px; border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: 0 12px 40px rgb(0 0 0 / .25); }
.cookies p { margin: 0 0 12px; font-size: .95rem; }
.cookies-acc { display: flex; gap: 10px; }
.cookies-acc .btn { flex: 1; }

/* Aparición al hacer scroll (main.js añade .is-in). Sin JS o con movimiento reducido, todo visible. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease-out), translate .6s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; translate: 0 0; }
}


/* ==========================================================================
   Autoescuela Apolo-I
   ========================================================================== */
h1, h2 { font-weight: 700; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.08; max-width: 22ch; margin-bottom: .7em; }
.icon { flex: none; width: 1.15em; height: 1.15em; }
.btn-primary { box-shadow: 0 8px 22px -10px rgb(226 0 26 / .7); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent-dark); }
  .btn-outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
}
.btn-light { background: #fff; color: var(--accent); }
@media (hover: hover) { .btn-light:hover { background: var(--ink); color: #fff; } }

/* Cabecera */
.site-header { background: color-mix(in srgb, #fff 90%, transparent); }
.header-inner { min-height: 76px; }
.logo { height: 46px; width: auto; }
.nav { gap: 26px; }
.nav a:not(.btn) { font-weight: 500; }
@media (max-width: 1020px) and (min-width: 861px) { .nav { gap: 16px; font-size: .95rem; } }
@media (max-width: 860px) { .logo-header { height: 38px; } }

/* Hero */
.hero { padding-block: clamp(36px, 7vw, 96px) clamp(48px, 8vw, 104px); background:
  radial-gradient(60rem 30rem at 85% -10%, var(--accent-soft), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-top: 1.1rem; }
.hero-facts { list-style: none; padding: 0; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: .97rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.hero-facts .icon { color: var(--accent); }
.hero-facts a { text-decoration: none; }
.hero-art { position: relative; max-width: 520px; justify-self: end; width: 100%; }
.road { width: 100%; border-radius: 36px; box-shadow: 0 40px 80px -40px rgb(29 29 33 / .55); }
.road .car { offset-path: path("M-20 520 C 120 520, 140 380, 260 360 S 420 300, 400 180 S 300 40, 540 30"); offset-rotate: auto 90deg; offset-distance: 46%; }
@media (prefers-reduced-motion: no-preference) {
  .road .car { animation: drive 9s cubic-bezier(.45, .05, .55, .95) infinite; }
  .road .road-line { animation: dash 1.2s linear infinite; }
}
@keyframes drive { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } }
@keyframes dash { to { stroke-dashoffset: -42; } }
.hero-card { position: absolute; display: grid; gap: 2px; padding: 14px 18px; border-radius: 18px; background: #fff; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .45); line-height: 1.15; }
.hero-card strong { font: 700 1.7rem/1 var(--f-display); color: var(--accent); letter-spacing: -.02em; }
.hero-card span { font-size: .85rem; color: var(--muted); font-weight: 500; }
.hero-card-a { left: -22px; top: 12%; }
.hero-card-b { right: -18px; top: 46%; }
.hero-card-c { left: 8%; bottom: -22px; background: var(--accent); }
.hero-card-c strong, .hero-card-c span { color: #fff; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { justify-self: center; max-width: 340px; margin-top: 8px; }
  .hero-card-a { left: -6px; }
  .hero-card-b { right: -6px; }
}

/* Permisos */
.permisos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .permisos { grid-template-columns: 1fr; } }
.permiso { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: #fff; transition: border-color .2s, transform .25s var(--ease-out), box-shadow .25s; scroll-margin-top: 96px; }
@media (hover: hover) { .permiso:hover { border-color: transparent; transform: translateY(-3px); box-shadow: 0 24px 50px -28px rgb(29 29 33 / .4); } }
.permiso-tag { display: inline-grid; place-items: center; min-width: 64px; height: 64px; padding: 0 14px; border-radius: 18px; background: var(--accent); color: #fff; font: 700 1.6rem/1 var(--f-display); letter-spacing: -.02em; margin-bottom: 20px; }
.permiso-tag-alt { background: var(--ink); }
.permiso-tag .icon { width: 28px; height: 28px; }
.permiso p { color: var(--muted); }
.permiso p strong, .motivos strong, .ruta strong, .ofertas strong { display: block; font: 600 1.3rem/1.2 var(--f-display); color: var(--ink); margin-bottom: 8px; letter-spacing: -.01em; }
.ticks { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: .97rem; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E2001A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Por qué (oscuro) */
.section.dark { background: var(--dark); color: #fff; }
.section.dark .lead { color: var(--dark-muted); }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.big-num { margin-top: 2rem; font: 600 1.1rem/1.2 var(--f-display); color: var(--dark-muted); }
.big-num span { display: block; font-size: clamp(5rem, 12vw, 9rem); line-height: .9; color: var(--accent); letter-spacing: -.05em; font-weight: 800; }
.motivos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { .motivos { grid-template-columns: 1fr; } }
.motivos li { padding: 22px; border-radius: 20px; background: #26262b; color: var(--dark-muted); border: 1px solid #303036; }
.motivos li strong { color: #fff; font-size: 1.12rem; }

/* Ruta */
.ruta { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: r; position: relative; }
.ruta li { counter-increment: r; position: relative; padding-top: 74px; color: var(--muted); }
.ruta li::before { content: counter(r); position: absolute; top: 0; left: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--accent); color: var(--accent); font: 700 1.3rem/1 var(--f-display); z-index: 1; }
.ruta li::after { content: ""; position: absolute; top: 25px; left: 60px; right: -10px; border-top: 2px dashed var(--line); }
.ruta li:last-child::after { display: none; }
.ruta li:last-child::before { background: var(--accent); color: #fff; }
@media (max-width: 860px) {
  .ruta { grid-template-columns: 1fr; gap: 26px; }
  .ruta li { padding: 6px 0 0 74px; min-height: 52px; }
  .ruta li::after { top: 60px; left: 25px; right: auto; bottom: -22px; border-top: 0; border-left: 2px dashed var(--line); }
}

/* Ofertas */
.ofertas { padding-block: 0 clamp(48px, 8vw, 96px); }
.ofertas-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: clamp(26px, 4vw, 44px); border-radius: 28px; background: var(--accent); color: #ffe3e6;
  background-image: repeating-linear-gradient(-45deg, transparent 0 22px, rgb(255 255 255 / .05) 22px 44px); }
.ofertas-inner p { margin: 0; max-width: 60ch; }
.ofertas strong { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

/* FAQ */
.faq { background: var(--surface); }
.faq h2 { max-width: none; }
.faq details { border-bottom-color: #e2dcd9; }
.faq summary { font-size: 1.06rem; }

/* Contacto */
.contacto-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .contacto-grid { grid-template-columns: 1fr; } }
.contacto-cards { display: grid; gap: 12px; }
.contact-card { grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; padding: 18px 22px; border-radius: 20px; transition: border-color .2s, transform .2s var(--ease-out); }
.contact-card .icon { grid-row: span 2; width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.contact-card small { font-size: 1rem; color: var(--ink); }
.contact-card span { font-size: .85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
@media (hover: hover) { .contact-card:hover { border-color: var(--accent); transform: translateY(-2px); } }

/* Pie */
.logo-footer { filter: brightness(0) invert(1); height: 44px; margin-bottom: 14px; }
.site-footer { background: #141417; }
