:root {
  --et-paper: #f5f4ec;
  --et-paper-deep: #ecebdc;
  --et-ink: #11231f;
  --et-muted: #52625d;
  --et-line: #cdd7d1;
  --et-blue: #1455b7;
  --et-cyan: #33c6e9;
  --et-green: #78ef78;
  --et-yellow: #ffdc1d;
  --et-white: #fffefa;
  --et-radius-sm: 14px;
  --et-radius: 22px;
  --et-radius-lg: 32px;
  --et-shadow: 0 18px 50px rgba(17, 35, 31, 0.11);
  --et-shadow-sharp: 8px 8px 0 rgba(17, 35, 31, 0.95);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--et-paper) !important;
  background-image:
    linear-gradient(rgba(20, 85, 183, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 85, 183, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--et-ink);
}

body::selection {
  background: var(--et-yellow);
  color: var(--et-ink);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--et-blue) !important;
  outline-offset: 3px !important;
}

:where(.home-page, .label-page, .about-page) > header {
  padding-top: 12px !important;
}

:where(.home-page, .label-page, .about-page) [data-etiquetia-nav],
:where(.home-page, .label-page, .about-page) [data-etiquetia-lang] {
  border: 1px solid rgba(17, 35, 31, 0.18) !important;
  border-radius: 18px !important;
  background: rgba(255, 254, 250, 0.92) !important;
  box-shadow: 0 10px 30px rgba(17, 35, 31, 0.08) !important;
  backdrop-filter: blur(18px) saturate(130%);
}

:where(.home-page, .label-page, .about-page) [data-etiquetia-nav] a {
  border-radius: 12px !important;
  letter-spacing: -0.01em;
}

:where(.home-page, .label-page, .about-page) [data-etiquetia-nav] a:hover {
  transform: translateY(-2px) rotate(-0.35deg);
}

:where(.home-page, .label-page, .about-page) [data-language-choice] {
  min-width: 38px;
  border-radius: 10px !important;
}

:where(.home-page, .label-page, .about-page) [data-language-choice][aria-pressed="true"] {
  background: var(--et-blue) !important;
  color: white !important;
}

[data-mobile-menu] {
  border: 1px solid var(--et-line) !important;
  border-radius: 22px !important;
  background: rgba(255, 254, 250, 0.97) !important;
}

/* Homepage: Z-shaped first viewport with one clear primary action. */
.home-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  min-height: min(780px, 100svh);
}

.home-hero-visual {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
  display: grid;
  gap: 1.35rem;
  width: 100%;
}

.home-hero-editorial {
  min-width: 0;
  width: auto !important;
  margin-left: 0 !important;
  border: 2px solid var(--et-ink);
  border-radius: var(--et-radius-lg) !important;
  background: var(--et-cyan) !important;
  box-shadow: 14px 14px 0 var(--et-yellow) !important;
  transform: rotate(0.8deg);
}

.geep-collaboration-card {
  justify-self: end;
  display: grid;
  box-sizing: border-box;
  width: fit-content;
  max-width: calc(100% - 14px);
  gap: 0.28rem;
  padding: 0.95rem 1.25rem;
  border: 2px solid var(--et-ink);
  border-radius: 18px;
  background: #d9d7b6;
  color: var(--et-ink);
  box-shadow: 8px 8px 0 var(--et-yellow);
  text-decoration: none;
  overflow: visible;
  transform: rotate(0.8deg);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.geep-collaboration-card strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.2;
}

.geep-collaboration-card span {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
}

.geep-collaboration-card strong,
.geep-collaboration-card span {
  font-weight: 900;
}

.geep-collaboration-card:hover {
  background: #e8e5c5;
  box-shadow: 11px 11px 0 var(--et-yellow);
  transform: translate(-2px, -3px) rotate(0.8deg);
}

.home-app-promo {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0.75rem;
  width: clamp(230px, 24vw, 330px);
  height: clamp(108px, 11vw, 145px);
  overflow: hidden;
  pointer-events: none;
}

.home-app-promo img {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
}

.home-hero-editorial img {
  display: block;
  width: 100%;
  max-width: 100%;
}

.home-hero-copy {
  grid-column: 1;
  grid-row: 1;
  margin: 0 !important;
  max-width: 650px !important;
  text-align: left !important;
  min-width: 0;
  overflow: hidden;
}

.home-typewriter-line,
.home-typewriter-slot {
  display: block !important;
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.home-typewriter-line {
  height: 1.9em;
  overflow: hidden;
}

.home-typewriter-slot {
  line-height: 0.94;
}

.home-hero-copy::before {
  content: "EDUCATION × AI";
  display: inline-flex;
  margin-bottom: 1.15rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--et-ink);
  border-radius: 999px;
  background: var(--et-yellow);
  color: var(--et-ink);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.home-hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 6vw, 5.5rem) !important;
  line-height: 0.94 !important;
  letter-spacing: -0.055em !important;
}

.home-hero-copy > p {
  margin-left: 0 !important;
  max-width: 58ch !important;
  color: var(--et-muted) !important;
}

.home-hero-copy > div:last-child {
  justify-content: flex-start !important;
}

.home-hero-copy a:first-child {
  border: 2px solid var(--et-ink) !important;
  border-radius: 14px !important;
  background: var(--et-blue) !important;
  color: white !important;
  box-shadow: 5px 5px 0 var(--et-ink) !important;
}

.home-hero-copy a:last-child {
  border: 1px solid var(--et-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.home-hero-copy a:hover {
  transform: translate(-1px, -2px) !important;
}

.home-page #about {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  background: transparent !important;
  overflow: visible !important;
}

.home-page #about [data-story-scene] {
  min-height: auto !important;
  padding-block: clamp(4rem, 9vw, 8rem) !important;
  overflow: visible;
}

.home-page #about [data-story-scene]:first-of-type {
  padding-bottom: clamp(5.5rem, 10vw, 9rem) !important;
}

.home-page #about .story-inner {
  border: 1px solid rgba(17, 35, 31, 0.13);
  border-radius: var(--et-radius-lg);
  background: rgba(255, 254, 250, 0.72);
  box-shadow: var(--et-shadow);
  padding: clamp(1.5rem, 5vw, 4.5rem);
  overflow: visible;
}

.home-page #about h2 {
  max-width: 18ch;
  margin-inline: auto;
  font-size: clamp(2.5rem, 6vw, 5.4rem) !important;
  letter-spacing: -0.04em;
}

.home-page #labels > a {
  min-height: 430px;
  border: 2px solid var(--et-ink) !important;
  border-radius: var(--et-radius) !important;
  box-shadow: 7px 7px 0 var(--et-ink) !important;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-page #labels > a:nth-child(1) { transform: rotate(-0.7deg); }
.home-page #labels > a:nth-child(2) { transform: translateY(18px) rotate(0.5deg); }
.home-page #labels > a:nth-child(3) { transform: rotate(-0.35deg); }

.home-page #labels > a:hover {
  transform: translate(-2px, -7px) rotate(0deg) !important;
  box-shadow: 11px 13px 0 var(--et-ink) !important;
}

.home-page #labels h2 {
  letter-spacing: -0.045em;
}

.home-page #labels + section > div,
.home-page section:has(> div > [data-i18n="seo.guideTitle"]) > div {
  border: 1px solid var(--et-line) !important;
  border-radius: var(--et-radius-lg) !important;
  background: var(--et-white) !important;
  box-shadow: var(--et-shadow) !important;
}

/* Product and institutional pages use the same modular card language. */
.label-page main > section:first-child,
.about-page main > section:first-child {
  gap: clamp(2rem, 6vw, 5.5rem) !important;
  min-height: min(760px, 90svh);
}

.label-page main > section:first-child > div:first-child,
.about-page main > section:first-child > div:first-child {
  position: relative;
}

.label-page main > section:first-child > div:first-child img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.label-page main > section:first-child h1,
.about-page main > section:first-child h1 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 7vw, 6.5rem) !important;
  letter-spacing: -0.055em;
}

.label-page main article,
.about-page main article,
.about-page #diagnostico-ia > div,
.guide-page article,
.guide-page section > div {
  border: 1px solid var(--et-line) !important;
  border-radius: var(--et-radius) !important;
  background: var(--et-white) !important;
  box-shadow: 0 14px 40px rgba(17, 35, 31, 0.08) !important;
}

.label-page main > section:nth-child(2) > div {
  border: 2px solid var(--et-ink) !important;
  border-radius: var(--et-radius) !important;
  box-shadow: var(--et-shadow-sharp) !important;
}

.label-human main > section:nth-child(2) > div { background: var(--et-cyan) !important; }
.label-assisted main > section:nth-child(2) > div { background: var(--et-green) !important; }
.label-generated main > section:nth-child(2) > div { background: var(--et-yellow) !important; }

.about-page #diagnostico-ia input,
.about-page #diagnostico-ia select,
.about-page #diagnostico-ia fieldset {
  border-color: var(--et-line) !important;
  border-radius: var(--et-radius-sm) !important;
  background: #f8f8f2 !important;
}

.about-page #diagnostico-ia button {
  border: 2px solid var(--et-ink) !important;
  border-radius: var(--et-radius-sm) !important;
  background: var(--et-blue) !important;
  box-shadow: 5px 5px 0 var(--et-ink) !important;
}

.guide-page > header,
.guide-page > main,
.guide-page > footer {
  width: min(100% - 2rem, 1280px);
  margin-inline: auto;
}

.guide-page h1,
.guide-page h2 {
  letter-spacing: -0.04em;
}

.guide-page p {
  max-width: 68ch;
}

/* Tools remain serious and usable, while sharing the refreshed brand frame. */
.tool-page,
.legal-page,
.error-page {
  background-color: var(--et-paper) !important;
}

.tool-page :where(.panel, .generator-page, .generator-tools, .tool-card, .upload-card, .settings-panel, .sidebar, .workspace),
.legal-page :where(main, .panel),
.error-page :where(main, .panel) {
  border-color: var(--et-line) !important;
}

.tool-page :where(.panel, .tool-card, .upload-card, .settings-panel, .sidebar) {
  border-radius: var(--et-radius) !important;
  box-shadow: 0 14px 40px rgba(17, 35, 31, 0.08) !important;
}

.tool-page :where(.btn-primary, button[type="submit"], #startTest) {
  border-radius: var(--et-radius-sm) !important;
}

.tool-page h1,
.tool-page h2,
.legal-page h1,
.error-page h1 {
  letter-spacing: -0.035em;
}

.literacy-test-page .ai-test-hero h1 {
  font-family: "Peace Sans", ui-sans-serif, system-ui, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: -0.045em !important;
}

.generator-privacy-badge {
  width: fit-content;
  max-width: 100%;
  margin: 1.25rem auto 0;
  padding: 0.75rem 1rem;
  border: 2px solid var(--et-ink);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--et-yellow), var(--et-green), var(--et-cyan));
  color: var(--et-ink);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
  box-shadow: 4px 4px 0 var(--et-ink);
}

footer {
  color: var(--et-muted);
}

@media (max-width: 900px) {
  .home-hero-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 2.25rem;
    padding-top: 7.5rem !important;
  }

  .home-hero-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .home-hero-visual {
    grid-column: 1;
    grid-row: 2;
  }

  .home-hero-editorial {
    box-shadow: 8px 8px 0 var(--et-yellow) !important;
  }

  .geep-collaboration-card {
    justify-self: center;
    width: fit-content;
    transform: rotate(0.5deg);
  }

  .home-app-promo {
    position: relative;
    top: auto;
    right: auto;
    justify-self: center;
    width: min(78vw, 330px);
    height: clamp(108px, 34vw, 145px);
    margin-top: -0.35rem;
  }

  .home-hero-copy h1 {
    max-width: 13ch;
  }

  .home-typewriter-line {
    height: 1.9em;
  }

  .home-page #labels > a,
  .home-page #labels > a:nth-child(2) {
    min-height: 360px;
    transform: none;
  }

  .label-page main > section:first-child,
  .about-page main > section:first-child {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  :where(.home-page, .label-page, .about-page) > header {
    padding-inline: 0.75rem !important;
  }

  :where(.home-page, .label-page, .about-page) [data-etiquetia-nav],
  :where(.home-page, .label-page, .about-page) [data-etiquetia-lang] {
    border-radius: 15px !important;
  }

  .home-hero-copy::before {
    font-size: 0.62rem;
  }

  .home-hero-copy h1 {
    font-size: clamp(2.8rem, 14vw, 4.2rem) !important;
  }

  .home-typewriter-line {
    height: 1.9em;
  }

  .home-hero-copy > div:last-child {
    align-items: stretch !important;
  }

  .home-hero-editorial {
    border-radius: 22px !important;
  }

  .home-page #about [data-story-scene] {
    padding-block: 3rem !important;
  }

  .home-page #about .story-inner {
    border-radius: 22px;
  }

  .home-page #about h2 {
    font-size: clamp(2.25rem, 11vw, 3.4rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
