:root {
  --navy-950: #081a2c;
  --navy-900: #10243d;
  --navy-800: #172f4f;
  --coral: #ee6455;
  --coral-dark: #c9483d;
  --sage: #6e9f89;
  --sage-light: #dfece5;
  --mint: #58dfb7;
  --ai-blue: #81abff;
  --gold: #f2c66d;
  --ivory: #fffaf2;
  --paper: #fffdf9;
  --ink: #13263d;
  --muted: #5e6b79;
  --line: #dce1df;
  --shadow: 0 24px 70px rgba(16, 36, 61, .11);
  --radius-lg: 32px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: white;
  background: var(--navy-950);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  width: min(1440px, calc(100% - 40px));
  margin: 20px auto 0;
  overflow: hidden;
  background: rgba(255, 253, 249, .95);
  border: 1px solid rgba(16, 36, 61, .1);
  border-radius: 26px;
  box-shadow: 0 14px 45px rgba(16, 36, 61, .08);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 96px;
  padding: 16px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  flex: 0 0 62px;
  width: 62px;
  height: 56px;
}

.brand-room,
.brand-door {
  position: absolute;
  bottom: 2px;
  width: 29px;
  height: 46px;
  border-radius: 13px 13px 7px 7px;
}

.brand-room-left {
  left: 2px;
  background: var(--navy-900);
  transform: skewY(23deg);
}

.brand-room-right {
  right: 2px;
  background: var(--coral);
  transform: skewY(-23deg);
}

.brand-door {
  z-index: 2;
  left: 21px;
  bottom: 0;
  width: 20px;
  height: 38px;
  background: var(--gold);
  border: 4px solid var(--paper);
  border-bottom: 0;
  border-radius: 10px 10px 2px 2px;
}

.brand-door::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 3px;
  width: 4px;
  height: 4px;
  background: var(--navy-900);
  border-radius: 50%;
}

.brand-name {
  display: grid;
  line-height: 1.25;
}

.brand-name strong {
  font-size: clamp(1rem, 2vw, 1.18rem);
  letter-spacing: -.02em;
}

.brand-name span {
  margin-top: 4px;
  color: var(--muted);
  font-size: .85rem;
}

.language-selector {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  background: #f3f1eb;
  border: 1px solid rgba(16, 36, 61, .09);
  border-radius: 999px;
}

.language-selector a {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  color: var(--navy-900);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}

.language-selector a:hover {
  background: white;
}

.language-selector a[aria-current="page"] {
  color: white;
  background: var(--coral);
}

.aiservit-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1px 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding: 12px 24px;
  overflow: hidden;
  color: white;
  background: var(--navy-950);
  text-decoration: none;
}

.aiservit-banner::after {
  content: "";
  position: absolute;
  top: -110px;
  right: 4%;
  width: 260px;
  height: 180px;
  border: 1px solid rgba(88, 223, 183, .15);
  border-radius: 0 0 0 180px;
  pointer-events: none;
}

.aiservit-brand {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.045em;
}

.aiservit-brand b {
  color: var(--mint);
}

.aiservit-brand span {
  color: white;
}

.aiservit-brand strong {
  color: var(--ai-blue);
}

.aiservit-divider {
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, .2);
}

.aiservit-copy {
  display: grid;
  line-height: 1.25;
}

.aiservit-copy small {
  margin-bottom: 3px;
  color: var(--mint);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.aiservit-copy > span {
  font-weight: 700;
}

.aiservit-cta {
  position: relative;
  z-index: 1;
  padding: 10px 15px;
  color: var(--mint);
  border: 1px solid rgba(88, 223, 183, .45);
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 800;
  transition: background .2s ease, color .2s ease;
}

.aiservit-banner:hover .aiservit-cta {
  color: var(--navy-950);
  background: var(--mint);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  align-items: center;
  gap: clamp(45px, 8vw, 120px);
  width: min(1240px, calc(100% - 48px));
  min-height: 590px;
  margin: 0 auto;
  padding: 80px 0 70px;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 80px;
  right: -190px;
  width: 530px;
  height: 530px;
  background: var(--sage-light);
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--coral-dark);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1,
h2,
p {
  text-wrap: balance;
}

h1 {
  max-width: 820px;
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(3rem, 6.5vw, 6.3rem);
  line-height: .97;
  letter-spacing: -.065em;
}

h1 span {
  color: var(--coral);
}

.hero-intro {
  max-width: 730px;
  margin: 30px 0 0;
  color: #435267;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-primary,
.student-panel button {
  color: white;
  background: var(--coral);
}

.button-secondary {
  color: var(--navy-900);
  border: 1px solid rgba(16, 36, 61, .22);
  background: transparent;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.quiet-card {
  position: relative;
  padding: 38px 34px 34px;
  color: white;
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.quiet-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  background: var(--coral);
  border-radius: 0 var(--radius-lg) 0 90px;
}

.quiet-orbit {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
}

.quiet-orbit span {
  display: block;
  width: 26px;
  height: 26px;
  background: var(--gold);
  border-radius: 50%;
}

.quiet-card p {
  max-width: 280px;
  margin: 0 0 22px;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
}

.quiet-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quiet-card li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #dfe7ef;
}

.quiet-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
}

.forms-intro {
  max-width: 720px;
  margin: 0 auto 44px;
  padding: 75px 24px 0;
  text-align: center;
}

.forms-intro h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.forms-intro > p:last-child {
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 90px;
}

/* En todas las portadas, cada destino ocupa una sección propia. */
.form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  width: min(980px, calc(100% - 48px));
}

.owner-panel {
  order: 1;
}

.student-panel {
  order: 2;
}

.form-panel {
  scroll-margin-top: 28px;
}

.panel-heading {
  min-height: auto;
}

.panel-heading > p:last-child {
  max-width: 760px;
  font-size: 1.05rem;
}

.form-panel form {
  max-width: 760px;
}

.form-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4vw, 48px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 55px rgba(16, 36, 61, .07);
}

.student-panel {
  border-top: 6px solid var(--coral);
}

.owner-panel {
  border-top: 6px solid var(--sage);
}

.panel-heading {
  min-height: 230px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.panel-number {
  position: absolute;
  top: 28px;
  right: 34px;
  color: rgba(16, 36, 61, .08);
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 1;
}

.panel-label {
  margin: 0 0 12px;
  color: var(--coral-dark);
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.owner-panel .panel-label {
  color: #477662;
}

.panel-heading h2 {
  max-width: 420px;
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.panel-heading > p:last-child {
  max-width: 510px;
  margin: 20px 0 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: 18px;
  padding-top: 30px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

label,
legend {
  color: var(--navy-900);
  font-size: .84rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  color: var(--ink);
  background: white;
  border: 1px solid #ccd4d7;
  border-radius: 11px;
  font: inherit;
  font-size: .95rem;
}

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

input:focus,
textarea:focus,
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(242, 198, 109, .85);
  outline-offset: 3px;
}

fieldset {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 16px;
  border: 1px solid #ccd4d7;
  border-radius: 12px;
}

legend {
  padding: 0 7px;
}

.check-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #46566a;
  font-weight: 600;
}

.check-field input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--coral);
}

.owner-panel .check-field input {
  accent-color: var(--sage);
}

button {
  justify-self: start;
  margin-top: 8px;
  padding-inline: 25px;
}

.owner-panel button {
  color: white;
  background: #527f6c;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px max(24px, calc((100% - 1240px) / 2));
  color: #dbe3ec;
  background: var(--navy-950);
  font-size: .85rem;
}

footer p {
  margin: 0;
}

.footer-notices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
}

.footer-notices a {
  color: white;
  text-underline-offset: 3px;
}

.legal-document {
  width: min(860px, calc(100% - 40px));
  margin: 64px auto 80px;
  padding: clamp(26px, 5vw, 58px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.legal-document h1 {
  margin-bottom: 32px;
  font-size: clamp(2.5rem, 6vw, 4.7rem);
}

.legal-document h2 {
  margin: 32px 0 10px;
  color: var(--navy-900);
  font-size: 1.25rem;
}

.legal-document p,
.legal-document li {
  color: #435267;
}

.legal-document a {
  color: var(--coral-dark);
}

.cookie-notice {
  position: fixed;
  z-index: 50;
  bottom: 18px;
  left: 18px;
  width: min(390px, calc(100% - 36px));
  padding: 18px;
  color: white;
  background: rgba(8, 26, 44, .97);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(8, 26, 44, .25);
}

.cookie-notice[hidden] {
  display: none;
}

.cookie-notice p {
  margin: 0;
  font-size: .88rem;
}

.cookie-actions {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}

.cookie-actions button {
  min-height: 40px;
  margin: 0;
  padding: 9px 16px;
  font-size: .82rem;
}

.cookie-accept {
  color: var(--navy-950);
  background: var(--mint);
}

.cookie-reject {
  color: white;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .45);
}

@media (max-width: 900px) {
  .site-header {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .header-main {
    gap: 14px;
    padding: 13px 15px;
  }

  .brand-name {
    display: none;
  }

  .language-selector {
    max-width: calc(100vw - 110px);
    overflow-x: auto;
  }

  .language-selector a {
    min-width: 42px;
  }

  .aiservit-banner {
    grid-template-columns: auto 1px 1fr;
    gap: 13px;
    padding: 12px 16px;
  }

  .aiservit-cta {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    width: min(680px, calc(100% - 36px));
    padding-top: 65px;
  }

  .hero::before {
    top: auto;
    right: -260px;
    bottom: 0;
  }

  .quiet-card {
    max-width: 520px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    width: min(680px, calc(100% - 28px));
  }

  .panel-heading {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    flex-basis: 50px;
    width: 50px;
    height: 46px;
    transform: scale(.82);
    transform-origin: left center;
  }

  .header-main {
    min-height: 76px;
  }

  .language-selector a {
    min-width: 38px;
    min-height: 40px;
  }

  .aiservit-copy > span {
    font-size: .82rem;
  }

  .hero {
    min-height: auto;
    padding: 55px 0 60px;
  }

  h1 {
    font-size: clamp(2.75rem, 13vw, 4.2rem);
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .forms-intro {
    padding-top: 55px;
  }

  .form-panel {
    padding: 26px 20px 30px;
    border-radius: 23px;
  }

  .form-grid {
    gap: 34px;
    width: min(680px, calc(100% - 28px));
  }

  .panel-number {
    top: 22px;
    right: 20px;
    font-size: 3.8rem;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  footer {
    display: grid;
    text-align: center;
  }

  .footer-notices {
    justify-content: center;
    margin-left: 0;
  }

  .cookie-notice {
    bottom: 10px;
    left: 10px;
    width: calc(100% - 20px);
  }

  .cookie-actions button {
    width: auto;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
