/* Portada: misma marca, navegación y catálogo; presentación acotada al inicio. */
.site-topbar { border: 0; background: var(--cream); box-shadow: none; }
.site-header { min-height: 84px; gap: clamp(12px, 1.4vw, 22px); flex-wrap: nowrap; }
.site-header > .brand { flex: none; }
.site-header > .brand strong { font-size: 1.2rem; }
.site-header > .brand small { display: none; }
.site-header > .brand .brand-mark { width: 30px; height: auto; }
.site-header nav { display: flex; flex: 1; justify-content: space-between; gap: clamp(12px, 1.4vw, 22px); margin: 0; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 0; color: var(--navy); font-size: .9rem; font-weight: 700; border: 0; white-space: nowrap; }
.site-header nav a:hover:not([aria-disabled]) { text-decoration: underline; text-underline-offset: 5px; }
.site-header nav a.active { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-header nav a:active:not([aria-disabled]) { color: #073745; }
.site-header nav [data-nav-pending] { cursor: default; gap: .3em; }
.site-header nav [data-nav-pending] span { font-size: .8em; font-weight: 500; }
.site-header nav .mobile-home-link { display: none; }
.site-header .header-aula { margin: 0; flex: none; min-height: 48px; padding: 12px 19px; border-radius: 18px; white-space: nowrap; color: white; }
.site-header .header-aula svg { width: 22px; height: 22px; stroke: currentColor; }
.site-header .account-avatar { width: 44px; height: 44px; flex: 0 0 44px; margin: 0; }
.site-header .menu-btn { display: none; border-radius: 12px; }
.home-topbar .site-header { max-width: 1320px; }
.home-topbar .site-header nav a { font-size: 1rem; }
.home-topbar .site-header .header-aula { font-size: 1rem; padding-inline: 22px; }

.home-page .home-hero { position: relative; isolation: isolate; display: flex; align-items: flex-start; justify-content: center; min-height: 0; margin: 0; padding: 40px 20px 64px; border-radius: 0; overflow: hidden; background: var(--cream); }
.home-hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1000px; min-width: 0; }
/* Scale the existing mark and wordmark together; do not redraw the brand. */
.home-logo { position: relative; container-type: inline-size; width: min(500px, 100%); margin: 0 0 16px; }
.home-logo .brand { display: flex; justify-content: center; gap: 3.90625cqw; width: 100%; }
.home-logo .brand-mark { width: 28.645833cqw; height: auto; }
.home-logo .brand strong { font-size: 25cqw; font-weight: 900; line-height: .94; letter-spacing: -.055em; }
.home-logo .brand strong span { display: block; box-shadow: none; }
.home-logo .brand small { display: none; }
.home-page .home-hero h1 { max-width: 100%; margin: 0; font-size: 48px; line-height: 1.18; font-weight: 800; letter-spacing: -.025em; text-align: center; text-wrap: balance; color: var(--navy); }
.home-page .home-hero h1::after { display: none; }
/* Keep the previous responsive footprint so the search and grades never move.
   The supplied lockup is displayed unchanged, cropped only to its artwork. */
.home-lockup { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.home-lockup .home-logo .brand { visibility: hidden; }
.home-lockup #home-claim { opacity: 0; }
.home-lockup-link { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(500px, 85vw); max-width: 100%; height: 100%; display: block; isolation: isolate; }
.home-lockup-link .home-lockup-art { display: block; width: 100%; height: 100%; stroke: none; }
.home-lockup-art image { mix-blend-mode: darken; }
.home-page .home-hero .home-search { display: flex; align-items: center; width: 100%; max-width: 980px; min-height: 90px; margin: 32px 0 0; padding: 8px 14px 8px 36px; gap: 12px; border: 1px solid #0f4c5c0c; border-radius: 100px; background: white; box-shadow: 0 9px 26px #d5a52b19, 0 3px 12px #0f4c5c08; }
.home-page .home-hero .home-search input { flex: 1; min-width: 0; width: 100%; margin: 0; border: 0; background: transparent; color: var(--navy); font: inherit; font-size: 26px; line-height: 1.4; font-weight: 500; padding: 12px 0; }
.home-page .home-hero .home-search input::placeholder { color: #687882; opacity: 1; }
.home-search button { display: grid; place-items: center; flex: 0 0 68px; width: 68px; min-height: 68px; padding: 12px; border: 0; border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; }
.home-search button svg { width: 42px; height: 42px; }
.home-search button:hover { background: var(--surface-sky); }
.home-search button:active { background: var(--blue); }
.home-grades { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; width: 100%; max-width: 970px; margin-top: 26px; }
.home-grade { display: grid; place-items: center; min-height: 114px; padding: 16px 8px; border-radius: 25px; box-shadow: 0 5px 12px #0f4c5c0c; color: var(--navy); font-size: 48px; font-weight: 900; line-height: 1; transition: transform .15s ease, box-shadow .15s ease; }
.home-grade-1 { background: #70C8F3; }
.home-grade-2 { background: #FF8F96; }
.home-grade-3 { background: #FFD447; }
.home-grade-4 { background: #9BD77C; }
.home-grade-5 { background: #76D5E8; }
.home-grade-6 { background: #A6DB85; }
.home-grade:hover { transform: translateY(-3px); box-shadow: 0 9px 20px #0f4c5c18; text-decoration: underline; text-underline-offset: 6px; }
.home-grade:active { transform: translateY(0); box-shadow: inset 0 0 0 2px var(--navy); }
.home-page .home-hero::before, .home-page .home-hero::after { content: none; display: none; }
/* Non-interactive rays echo the existing isotipo, outside the controls. */
.home-logo::before, .home-logo::after, .home-grades::before, .home-grades::after { content: ''; position: absolute; pointer-events: none; width: 30px; height: 10px; border-radius: 999px; background: #FFD33F; }
.home-logo::before { left: -48px; top: 57%; transform: rotate(27deg); box-shadow: 13px 26px 0 #FFD33F; }
.home-logo::after { right: -48px; top: 57%; transform: rotate(-27deg); box-shadow: -13px 26px 0 #FFD33F; }
.home-grades::before { left: -46px; top: 36%; transform: rotate(27deg); box-shadow: 12px 25px 0 #FFD33F; }
.home-grades::after { right: -46px; top: 36%; transform: rotate(-27deg); box-shadow: -12px 25px 0 #FFD33F; }
.home-page > .home-subjects { padding-top: 44px; }
.home-sr-only, .home-hero .hero-search-label.home-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.footer .site-credit { margin: 30px 20px 0; padding: 0 0 28px; text-align: center; color: #526b74; font-size: .8125rem; line-height: 1.6; }
.site-credit a { display: inline-block; color: inherit; text-underline-offset: 3px; padding-block: 8px; }
.site-credit a:hover { text-decoration: underline; }
.site-credit strong { font-weight: 800; }
:is(.site-header, .home-hero, .site-credit) :is(a, button, input):focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }

@media (max-width: 1279px) {
  .site-header { min-height: 76px; gap: 12px; }
  .site-header .menu-btn { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; margin-right: auto; color: var(--navy); background: transparent; border: 0; cursor: pointer; }
  .site-header .menu-btn:hover { background: var(--surface-sky); }
  .site-header nav { display: none; }
  .site-header nav.open { display: flex; position: absolute; inset: 100% 20px auto; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 18px; background: var(--cream); border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: 0 10px 30px #0f4c5c12; max-height: calc(100dvh - 100px); overflow-y: auto; }
  .site-header nav a, .home-topbar .site-header nav a { min-height: 46px; padding: 11px 8px; white-space: normal; font-size: 1rem; }
  .site-header nav .mobile-home-link { display: inline-flex; }
  .site-header .header-aula { margin-left: 0; }
}
@media (max-width: 1100px) {
  .home-page .home-hero { padding: 36px 0 60px; }
  .home-logo { width: min(460px, 100%); }
  .home-page .home-hero h1 { font-size: 42px; }
  .home-page .home-hero .home-search { min-height: 84px; }
  .home-grades { gap: 16px; }
  .home-grade { min-height: 108px; font-size: 44px; border-radius: 23px; }
  .home-grades::before, .home-grades::after { display: none; }
}
@media (max-width: 850px) {
  .home-logo { width: min(420px, 100%); margin-bottom: 14px; }
  .home-page .home-hero h1 { font-size: 38px; }
  .home-page .home-hero .home-search { min-height: 80px; margin-top: 28px; padding-left: 28px; }
  .home-page .home-hero .home-search input { font-size: 24px; }
  .home-grades { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 500px; gap: 16px; }
}
@media (max-width: 600px) {
  .site-header { padding-inline: 20px; min-height: 72px; gap: 12px; flex-wrap: nowrap; }
  .site-header > .brand { display: none; }
  .site-header .header-aula, .home-topbar .site-header .header-aula { padding: 10px 16px; min-height: 46px; font-size: .9375rem; border-radius: 15px; }
  .site-header .header-aula svg { width: 21px; height: 21px; }
  .home-page { padding-inline: 20px; }
  .home-page .home-hero { padding: 32px 0 60px; }
  .home-logo { width: min(330px, 100%); margin-bottom: 16px; }
  .home-logo::before, .home-logo::after { display: none; }
  .home-page .home-hero h1 { max-width: 350px; font-size: clamp(28px, 7.7vw, 32px); line-height: 1.2; }
  .home-page .home-hero .home-search { min-height: 68px; margin-top: 28px; padding: 6px 6px 6px 22px; gap: 4px; }
  .home-page .home-hero .home-search input { font-size: 20px; }
  .home-search button { width: 54px; min-height: 54px; flex-basis: 54px; padding: 10px; }
  .home-search button svg { width: 32px; height: 32px; }
  .home-grades { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 390px; margin-top: 24px; }
  .home-grade { min-height: 94px; border-radius: 21px; font-size: 38px; }
}
/* Short notebooks keep the same composition in normal document flow. */
@media (min-width: 851px) and (max-height: 820px) {
  .home-page .home-hero { padding-top: 36px; padding-bottom: 56px; }
  .home-logo { width: 450px; margin-bottom: 12px; }
  .home-page .home-hero h1 { font-size: 44px; }
  .home-page .home-hero .home-search { margin-top: 28px; min-height: 84px; }
  .home-grades { margin-top: 24px; }
  .home-grade { min-height: 106px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-grade { transition: none; }
}
