/* Cursaqui · hoja de estilos
   Colores tomados del logotipo y de la papelería de Cursaqui. */
:root {
  --sky: #38B6FF;
  --sky-ink: #0A6FAE;
  --mist: #EAF6FE;
  --ink: #1D2335;
  --slate: #4A5272;
  --muted: #5B6380;
  --red: #D9442E;
  --sun: #F6C838;
  --green: #2F9E6E;
  --paper: #FFFFFF;
  --line: #D7DDEA;

  --f-display: "Rajdhani", "Arial Narrow", sans-serif;
  --f-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-ink); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 700; color: var(--ink); }
h3 { font-size: 1.55rem; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
:lang(zh) { font-family: var(--f-zh); }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--slate); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-wa { background: #1FAF5A; color: #fff; }
.btn-wa:hover { background: #178a47; color: #fff; }
.btn-ig { background: #C13584; color: #fff; }
.btn-ig:hover { background: #9B2A6A; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand img { width: 168px; }
.menu { display: flex; align-items: center; gap: 26px; }
.menu a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.menu a:not(.btn):hover { color: var(--sky-ink); }
.menu .btn { min-height: 42px; font-size: 1.05rem; }
.menu-toggle { display: none; background: none; border: 0; width: 48px; height: 48px; cursor: pointer; padding: 12px; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s ease; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -7px; } .menu-bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Portada */
.hero { padding: clamp(36px, 6vw, 80px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-place { color: var(--slate); font-weight: 500; }
.hero-title { margin-top: 10px; min-height: 2.1em; display: flex; align-items: flex-end; font-size: clamp(3.6rem, 9.5vw, 8.4rem); line-height: .92; letter-spacing: -.01em; color: var(--ink); }
.hero-phrase { display: inline-block; transition: opacity .22s ease, transform .22s ease; }
.hero-phrase.is-out { opacity: 0; transform: translateY(14px); }
.hero-phrase:lang(zh) { font-size: .8em; letter-spacing: .04em; }
.hero-gloss { margin-top: 12px; min-height: 1.6em; color: var(--muted); font-size: 1rem; }
.hero-gloss b { color: var(--ink); font-weight: 600; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip {
  font-family: var(--f-display); font-weight: 700; font-size: 1.1rem;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { background: var(--mist); }
.chip[aria-pressed="true"] { background: var(--chip, var(--ink)); border-color: var(--chip, var(--ink)); color: var(--chip-ink, #fff); }
.chip[data-lang="en"] { --chip: var(--red); }
.chip[data-lang="fr"] { --chip: var(--sky); --chip-ink: var(--ink); }
.chip[data-lang="zh"] { --chip: var(--sun); --chip-ink: var(--ink); }
.chip[data-lang="de"] { --chip: var(--slate); }
.chip[data-lang="math"] { --chip: var(--green); }
.chip[data-lang="ia"] { --chip: var(--ink); }
.chip-main { font-size: 1.2rem; min-height: 50px; padding: 0 22px; border-width: 2.5px; }
.hero-sub { margin-top: 26px; max-width: 34em; font-size: 1.15rem; color: var(--slate); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-visual { position: relative; padding: 0 0 28px 28px; }
.hero-visual::before {
  content: ""; position: absolute; inset: 40px 0 0 0;
  background: var(--accent, var(--sky)); border-radius: var(--radius-l);
  transition: background-color .35s ease;
}
.hero-frame { position: relative; aspect-ratio: 4 / 4.6; border-radius: var(--radius-l); overflow: hidden; background: var(--mist); transform: translate(-28px, 0); }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.hero-frame img.is-out { opacity: 0; }
.hero-caption {
  position: absolute; right: 18px; bottom: 0; transform: translateY(40%);
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  padding: 8px 18px; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem;
}

/* Secciones */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--mist); }
.section-dark { background: var(--ink); color: #E8ECF6; }
.section-dark h2 { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 40px; margin-bottom: 36px; }
.section-head p { max-width: 30em; color: var(--muted); }

/* Cursos */
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.course-open {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; height: 100%; width: 100%;
  border-radius: var(--radius-m); background: var(--paper); border: 2px solid var(--line);
  transition: border-color .15s ease, transform .15s ease;
}
.course-open:hover { border-color: var(--c); }
.course-open:focus-visible { outline: 3px solid var(--sky-ink); outline-offset: 3px; }
.course-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 14px 14px 0 0; background: var(--mist); }
.course-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.course-open:hover .course-img img { transform: scale(1.04); }
.course-body { display: flex; flex-direction: column; gap: 4px; padding: 0 22px 22px; position: relative; }
.course-word {
  align-self: flex-start; margin-top: -22px; margin-bottom: 8px;
  background: var(--c); color: #fff; border-radius: var(--radius-s);
  font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; line-height: 1; padding: 9px 14px 7px;
}
.course[data-course="frances"] .course-word,
.course[data-course="chino"] .course-word { color: var(--ink); }
.course-word:lang(zh) { font-family: var(--f-zh); font-size: 1.35rem; padding-top: 8px; }
.course-name { font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; }
.course-line { color: var(--muted); font-size: 1rem; }
.course-more .course-open { background: var(--ink); border-color: var(--ink); color: #fff; justify-content: flex-end; min-height: 260px; }
.course-more .course-body { padding-top: 22px; }
.course-more .course-word { margin-top: 0; background: var(--sun); color: var(--ink); }
.course-more .course-line { color: #C9D0E4; }

.course-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.course-featured .course-img { aspect-ratio: 4 / 3.4; }
.course-featured .course-name { font-size: 2.1rem; }
.course-featured .course-word { font-size: 2rem; padding: 11px 16px 9px; }
.course-featured .course-open { border-width: 2.5px; border-color: var(--c); }
.course-featured .course[data-course="chino"] .course-open { background: #FFF8DC; }
.course-sub { margin: 56px 0 18px; font-size: 1.9rem; }
.course-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.course-compact .course-img { aspect-ratio: 16 / 10; }
.course-compact .course-name { font-size: 1.45rem; }
.course-compact .course-word { font-size: 1.3rem; }
.course-compact .course-line { font-size: .95rem; }
.course-compact .course-more .course-open { min-height: 100%; }
.finder-note { font-size: .95rem; color: var(--slate); min-height: 1.4em; }

/* Ventana de curso */
.course-dialog { border: 0; padding: 0; border-radius: var(--radius-l); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--ink); }
.course-dialog::backdrop { background: rgba(29,35,53,.55); }
.dialog-inner { padding: 34px 30px 30px; border-top: 10px solid var(--dc, var(--sky)); display: flex; flex-direction: column; gap: 14px; }
.dialog-inner h3 { font-size: 2.2rem; padding-right: 48px; }
.dialog-inner ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.dialog-inner .btn-row { margin-top: 8px; }
.dialog-close { position: absolute; top: 22px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--mist); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.dialog-close svg { width: 20px; height: 20px; }
.course-dialog[open] { animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* Buscador */
.finder-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.finder-intro p { margin-top: 14px; color: var(--slate); max-width: 26em; }
.finder { background: var(--paper); border-radius: var(--radius-l); padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 22px; border: 2px solid var(--ink); }
.finder fieldset { border: 0; margin: 0; padding: 0; }
.finder legend { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; margin-bottom: 10px; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opts span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); font-weight: 500; transition: background-color .15s ease, border-color .15s ease; }
.opts input:hover + span { border-color: var(--slate); }
.opts input:checked + span { background: var(--sky); border-color: var(--sky); color: var(--ink); font-weight: 600; }
.opts input:focus-visible + span { outline: 3px solid var(--sky-ink); outline-offset: 2px; }
.finder-out { border-top: 2px dashed var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.finder-label { font-size: .95rem; color: var(--muted); }
.finder-msg { font-size: 1.15rem; line-height: 1.5; background: var(--mist); border-radius: var(--radius-m); padding: 14px 18px; width: 100%; }

/* Modalidades */
.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.mode { border-radius: var(--radius-m); padding: 28px; display: flex; flex-direction: column; gap: 10px; background: var(--mist); }
.mode:first-child { background: var(--sun); }
.mode:last-child { background: var(--sky); }
.mode p { color: var(--ink); }
.mode-photo { padding: 0; background: var(--ink); color: #fff; overflow: hidden; }
.mode-photo img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--slate); }
.mode-photo > div { padding: 22px 28px 28px; display: flex; flex-direction: column; gap: 10px; }
.mode-photo p { color: #DDE3F1; }

/* Empresas */
.biz-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.biz-photo img { border-radius: var(--radius-l); aspect-ratio: 10 / 8; object-fit: cover; width: 100%; background: var(--slate); }
.biz-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.biz-copy > p { color: #C9D0E4; font-size: 1.15rem; }
.biz-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.biz-list li { padding-left: 26px; position: relative; }
.biz-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 14px; height: 4px; border-radius: 2px; background: var(--red); }
.biz-list strong { color: #fff; }
.section-dark .btn-primary { background: var(--sky); color: var(--ink); }
.section-dark .btn-primary:hover { background: #fff; color: var(--ink); }

/* Cómo empezar */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; counter-reset: paso; }
.steps li { counter-increment: paso; padding: 26px 0 0; border-top: 3px solid var(--ink); display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: counter(paso); font-family: var(--f-display); font-weight: 700; font-size: 4.2rem; line-height: .8; color: var(--sky); }
.steps p { color: var(--muted); }

/* Preguntas */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(24px, 5vw, 64px); }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--paper); border-radius: var(--radius-m); border: 2px solid transparent; }
.faq details[open] { border-color: var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font-weight: 600; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 22px 20px; color: var(--slate); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: stretch; }
.contact-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.contact-copy > p { color: var(--slate); }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-k { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--slate); }
.contact-list a { font-size: 1.15rem; font-weight: 500; color: var(--ink); text-decoration-color: var(--sky); text-underline-offset: 4px; }
.map { border-radius: var(--radius-l); overflow: hidden; min-height: 340px; background: var(--mist); border: 2px solid var(--ink); }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* Pie */
.site-footer { background: var(--mist); padding: 40px 0 96px; border-top: 4px solid var(--sky); }
.footer-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--slate); }
.footer-logo { width: 150px; margin-bottom: 6px; }
.footer-small { font-size: .95rem; }

/* Botón flotante de WhatsApp */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #1FAF5A; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(29,35,53,.25); }
.wa-float:hover { background: #178a47; color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* Páginas de texto */
.legal { padding: 56px 0 96px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 18px; }
.legal h2 { font-size: 1.6rem; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--slate); }
.legal p + p { margin-top: 10px; }

/* Responsivo */
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 18px; display: none;
  }
  .menu.is-open { display: flex; }
  .menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 14px; }
  .hero-grid, .finder-grid, .biz-grid, .faq-wrap, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 520px; }
  .course-grid, .course-featured, .course-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-featured .course:first-child { grid-column: 1 / -1; }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .brand img { width: 138px; }
  .course-grid, .course-featured, .course-compact { grid-template-columns: minmax(0, 1fr); }
  .course-featured .course:first-child { grid-column: auto; }
  .hero-title { min-height: 1.95em; }
  .hero-frame { aspect-ratio: 4 / 3.6; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
