@font-face {
  font-family: "JP Editorial";
  src: url("assets/editorial-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JP Editorial";
  src: url("assets/editorial-italic.woff") format("woff");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JP Humanist";
  src: url("assets/humanist-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --navy: #071427;
  --navy-soft: #10223d;
  --ink: #111827;
  --paper: #f5f1eb;
  --paper-deep: #e8e2d9;
  --white: #fff;
  --copper: #c77949;
  --copper-light: #e4a67e;
  --teal: #14939a;
  --muted: #667085;
  --line: rgba(7, 20, 39, .16);
  --topbar: 76px;
  --controls: 72px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 24px);
  background: var(--navy);
}

body {
  min-height: 100%;
  margin: 0;
  padding-bottom: var(--controls);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(20, 147, 154, .17), transparent 28rem),
    linear-gradient(180deg, #071427 0, #0c1e35 48%, #030b16 100%);
  color: var(--paper);
  font-family: "JP Humanist", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--navy);
}

.skip-link:focus {
  top: 12px;
}

.atlas-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  height: var(--topbar);
  padding: 0 24px;
  border-bottom: 1px solid rgba(228, 166, 126, .25);
  background: rgba(3, 11, 22, .92);
  backdrop-filter: blur(16px);
}

.atlas-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  text-decoration: none;
}

.atlas-brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.atlas-brand span {
  font-family: "JP Editorial", Georgia, serif;
  font-size: 1.15rem;
}

.atlas-titlebar {
  min-width: 0;
  text-align: center;
}

.atlas-titlebar strong {
  display: block;
  overflow: hidden;
  color: var(--copper-light);
  font-size: .86rem;
  letter-spacing: .11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.atlas-titlebar span {
  color: #b9c4d2;
  font-size: .78rem;
}

.atlas-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(228, 166, 126, .45);
  border-radius: 999px;
  color: var(--paper);
  font-size: .88rem;
  text-decoration: none;
}

.atlas-back:hover,
.atlas-back:focus-visible {
  border-color: var(--copper);
  background: var(--copper);
  color: var(--navy);
}

.atlas-stage {
  position: relative;
  padding: 34px 20px 96px;
  outline: 0;
  background-image: radial-gradient(circle at center, rgba(228, 166, 126, .13) 0 1px, transparent 1px);
  background-size: 36px 36px;
}

.atlas-world {
  display: grid;
  gap: 72px;
  width: min(1380px, 100%);
  margin: 0 auto;
}

.atlas-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .27);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 32px 85px rgba(0, 0, 0, .32);
  color: var(--ink);
  scroll-margin-top: calc(var(--topbar) + 24px);
}

.atlas-frame.is-current {
  border-color: rgba(228, 166, 126, .78);
  box-shadow: 0 38px 100px rgba(0, 0, 0, .45);
}

.atlas-frame-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 102px;
  padding: 23px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 241, 235, .98);
}

.atlas-frame-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--copper-light);
  font-size: .8rem;
  letter-spacing: .08em;
}

.atlas-frame-heading {
  min-width: 0;
}

.atlas-frame-heading p {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.atlas-frame-heading h2 {
  margin: 0;
  color: var(--navy);
  font-family: "JP Editorial", Georgia, serif;
  font-size: clamp(2rem, 3.25vw, 3.35rem);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.02;
}

.atlas-frame-header img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.atlas-frame-body {
  display: block;
}

.atlas-media {
  padding: clamp(14px, 2.2vw, 30px);
  border-bottom: 1px solid var(--line);
  background: #ece8e1;
}

.atlas-media a {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  cursor: zoom-in;
}

.atlas-media a::after {
  content: "Ampliar lámina  ↗";
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(228, 166, 126, .52);
  border-radius: 999px;
  background: rgba(7, 20, 39, .9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  color: var(--paper);
  font-size: .78rem;
  letter-spacing: .035em;
}

.atlas-media a:hover::after,
.atlas-media a:focus-visible::after {
  border-color: var(--copper);
  background: var(--copper);
  color: var(--navy);
}

.atlas-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 15px 28px rgba(7, 20, 39, .11));
}

.atlas-copy {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: 26px 48px;
  padding: 34px 38px 30px;
  background: var(--white);
}

.atlas-copy-intro {
  grid-column: 1;
  margin: 0;
  color: var(--navy);
  font-family: "JP Editorial", Georgia, serif;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.38;
}

.atlas-points {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 25px;
  margin: 0;
}

.atlas-points div {
  padding-left: 15px;
  border-left: 3px solid var(--copper);
}

.atlas-points dt {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .015em;
}

.atlas-points dd {
  margin: 0;
  color: #455166;
  font-size: 1rem;
  line-height: 1.58;
}

.atlas-source-list {
  grid-column: 1;
  align-self: end;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.atlas-source-list summary {
  min-height: 38px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.atlas-source-list ul {
  margin: 8px 0 0;
  padding-left: 19px;
  line-height: 1.55;
}

.atlas-source-list a {
  overflow-wrap: anywhere;
}

.atlas-frame-note {
  margin: 0;
  padding: 0 38px 25px;
  background: var(--white);
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
  letter-spacing: .01em;
}

.atlas-cover {
  min-height: min(820px, calc(100svh - var(--topbar) - 54px));
  border-color: rgba(228, 166, 126, .56);
  background: var(--navy);
  color: var(--paper);
}

.atlas-cover-inner {
  display: grid;
  grid-template-areas: "copy art";
  grid-template-columns: minmax(360px, .82fr) minmax(0, 1.18fr);
  align-items: center;
  min-height: inherit;
}

.atlas-cover-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 66px 22px 90px 66px;
}

.atlas-cover-logo {
  width: 92px;
  height: 92px;
  margin-bottom: 34px;
  object-fit: contain;
}

.atlas-kicker {
  margin: 0 0 20px;
  color: var(--copper-light);
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.atlas-cover h1 {
  margin: 0;
  font-family: "JP Editorial", Georgia, serif;
  font-size: clamp(3.7rem, 6vw, 6.2rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .92;
}

.atlas-cover h1 em {
  display: block;
  color: var(--copper-light);
  font-weight: 400;
}

.atlas-cover-deck {
  max-width: 560px;
  margin: 27px 0 31px;
  color: #cbd4df;
  font-size: 1.08rem;
  line-height: 1.58;
}

.atlas-start {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  background: var(--copper);
  color: var(--navy);
  font-weight: 700;
}

.atlas-start:hover,
.atlas-start:focus-visible {
  background: var(--paper);
}

.atlas-cover-art {
  grid-area: art;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 48px 38px 72px 10px;
  background: radial-gradient(circle at center, rgba(20, 147, 154, .2), transparent 61%);
}

.atlas-cover-art img {
  display: block;
  width: min(100%, 800px);
  height: auto;
  max-height: none;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55));
}

.atlas-cover-signature {
  position: absolute;
  left: 66px;
  bottom: 35px;
  margin: 0;
  color: var(--copper-light);
  font-size: .8rem;
  letter-spacing: .06em;
}

.atlas-controls {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: var(--controls);
  padding: 0 24px;
  border-top: 1px solid rgba(228, 166, 126, .25);
  background: rgba(3, 11, 22, .92);
  backdrop-filter: blur(16px);
}

.atlas-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.atlas-control-group:last-child {
  justify-content: flex-end;
}

.atlas-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(228, 166, 126, .42);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-size: .88rem;
}

.atlas-control:hover,
.atlas-control:focus-visible {
  border-color: var(--copper);
  background: var(--copper);
  color: var(--navy);
}

.atlas-control:disabled {
  cursor: not-allowed;
  opacity: .32;
}

.atlas-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 270px;
}

.atlas-progress-track {
  position: relative;
  width: 190px;
  height: 2px;
  background: rgba(255, 255, 255, .18);
}

.atlas-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--copper);
  transition: width .35s ease;
}

.atlas-progress-label {
  min-width: 66px;
  color: #cad3df;
  font-size: .8rem;
  letter-spacing: .08em;
  text-align: center;
}

.atlas-overview-panel {
  position: fixed;
  z-index: 40;
  top: calc(var(--topbar) + 16px);
  right: 18px;
  bottom: calc(var(--controls) + 16px);
  width: min(380px, calc(100vw - 36px));
  overflow: auto;
  padding: 23px;
  border: 1px solid rgba(228, 166, 126, .42);
  border-radius: 20px;
  background: rgba(7, 20, 39, .98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5);
  backdrop-filter: blur(18px);
}

.atlas-overview-panel[hidden] {
  display: none;
}

.atlas-overview-panel h2 {
  margin: 0;
  font-family: "JP Editorial", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
}

.atlas-overview-panel > p {
  margin: 8px 0 18px;
  color: #bdc7d4;
  font-size: .94rem;
  line-height: 1.5;
}

.atlas-overview-list {
  display: grid;
  gap: 7px;
}

.atlas-overview-list button {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  color: var(--paper);
  font-size: .9rem;
  text-align: left;
}

.atlas-overview-list button span:first-child {
  color: var(--copper-light);
  font-size: .76rem;
  letter-spacing: .08em;
}

.atlas-overview-list button:hover,
.atlas-overview-list button:focus-visible,
.atlas-overview-list button[aria-current="location"] {
  background: var(--copper);
  color: var(--navy);
}

.atlas-overview-list button[aria-current="location"] span:first-child {
  color: var(--navy);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.analytics-consent[hidden] {
  display: none;
}

.analytics-consent {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(var(--controls) + 16px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: min(880px, calc(100vw - 32px));
  padding: 19px 21px;
  transform: translateX(-50%);
  border: 1px solid rgba(228, 166, 126, .45);
  border-radius: 18px;
  background: rgba(7, 20, 39, .97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  color: var(--paper);
  backdrop-filter: blur(18px);
}

.analytics-consent-copy p {
  margin: 0;
}

.analytics-consent-copy p + p {
  margin-top: 6px;
  color: #c4cfdb;
  font-size: .86rem;
  line-height: 1.45;
}

.analytics-consent-label {
  display: block;
  margin-bottom: 6px;
  color: var(--copper-light);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.analytics-consent-actions {
  display: flex;
  gap: 9px;
}

.analytics-consent-actions button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: .82rem;
  white-space: nowrap;
}

.analytics-consent-accept {
  border: 1px solid var(--copper);
  background: var(--copper);
  color: var(--navy);
  font-weight: 700;
}

.analytics-consent-decline {
  border: 1px solid rgba(228, 166, 126, .42);
  background: transparent;
  color: var(--paper);
}

.analytics-consent-actions button:hover,
.analytics-consent-actions button:focus-visible {
  border-color: var(--paper);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--paper);
}

@media (max-width: 980px) {
  .atlas-copy {
    grid-template-columns: 1fr;
  }

  .atlas-copy-intro,
  .atlas-points,
  .atlas-source-list {
    grid-column: 1;
    grid-row: auto;
  }

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

  .atlas-cover-inner {
    grid-template-areas:
      "art"
      "copy";
    grid-template-columns: 1fr;
  }

  .atlas-cover-art {
    padding: 34px 30px 0;
  }

  .atlas-cover-art img {
    width: min(100%, 760px);
  }

  .atlas-cover-copy {
    padding: 24px 44px 92px;
  }

  .atlas-cover-logo {
    margin-bottom: 24px;
  }

  .atlas-cover-signature {
    left: 44px;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar: 64px;
    --controls: 66px;
  }

  .atlas-topbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 12px;
  }

  .atlas-brand img {
    width: 42px;
    height: 42px;
  }

  .atlas-brand span {
    font-size: 1rem;
  }

  .atlas-titlebar {
    display: none;
  }

  .atlas-back {
    min-height: 38px;
    padding: 0 12px;
    font-size: .8rem;
  }

  .atlas-stage {
    padding: 16px 10px 70px;
  }

  .atlas-world {
    gap: 34px;
  }

  .atlas-frame {
    border-radius: 18px;
  }

  .atlas-frame-header {
    grid-template-columns: auto 1fr auto;
    min-height: 80px;
    padding: 15px 17px;
  }

  .atlas-frame-number {
    width: 42px;
    height: 42px;
  }

  .atlas-frame-heading h2 {
    font-size: clamp(1.65rem, 7vw, 2.35rem);
  }

  .atlas-frame-header img {
    width: 40px;
    height: 40px;
  }

  .atlas-media {
    padding: 9px;
  }

  .atlas-media a::after {
    right: 8px;
    bottom: 8px;
    padding: 8px 10px;
    font-size: .72rem;
  }

  .atlas-copy {
    gap: 22px;
    padding: 25px 21px 23px;
  }

  .atlas-points {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .atlas-frame-note {
    padding: 0 21px 22px;
  }

  .atlas-cover {
    min-height: auto;
  }

  .atlas-cover-art {
    padding: 25px 14px 0;
  }

  .atlas-cover-art img {
    width: 100%;
    height: auto;
  }

  .atlas-cover-copy {
    padding: 16px 25px 84px;
  }

  .atlas-cover-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
  }

  .atlas-cover h1 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .atlas-cover-deck {
    font-size: 1rem;
  }

  .atlas-cover-signature {
    left: 25px;
    bottom: 25px;
    right: 25px;
  }

  .atlas-controls {
    grid-template-columns: auto 1fr auto;
    gap: 7px;
    padding: 0 10px;
  }

  .atlas-control-group {
    gap: 7px;
  }

  .atlas-control .control-text {
    display: none;
  }

  .atlas-control {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .atlas-progress {
    justify-content: center;
    min-width: 0;
  }

  .atlas-progress-track {
    display: none;
  }

  .atlas-overview-panel {
    top: calc(var(--topbar) + 10px);
    right: 10px;
    bottom: calc(var(--controls) + 10px);
    width: calc(100vw - 20px);
  }

  .analytics-consent {
    grid-template-columns: 1fr;
    gap: 14px;
    bottom: calc(var(--controls) + 10px);
    padding: 17px;
  }

  .analytics-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .analytics-consent-actions button {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .atlas-brand span {
    display: none;
  }

  .atlas-frame-header {
    grid-template-columns: auto 1fr;
  }

  .atlas-frame-header > img {
    display: none;
  }

  .atlas-frame-heading p {
    font-size: .72rem;
  }

  .atlas-media a::after {
    content: "Ampliar  ↗";
  }
}

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

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