:root {
  color-scheme: dark;
  background: #07090a;
  color: #ded8c7;
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  --room: min(1200px, calc(100% - 88px), calc(133.77svh - 202px));
  --interface: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body, h1, figure { margin: 0; }
body {
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 72% 52% at 50% 39%, rgba(46,57,118,.28), transparent 74%),
    radial-gradient(ellipse 60% 42% at 43% 70%, rgba(33,45,99,.19), transparent 76%),
    linear-gradient(100deg, #06080b, #0d1123 48%, #06080b);
}
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid #eee9dc; outline-offset: 4px; }
.skip-link {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(calc(-100% - 14px));
  background: #07090a;
  color: #eee9dc;
  font: 16px/1.3 var(--interface);
}
.skip-link:focus { transform: none; }

header, main {
  width: var(--room);
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: clamp(56px, 7.3svh, 76px);
}

h1 {
  color: #d4bf83;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -.055em;
}

nav { display: flex; margin-inline-end: -10px; }
nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font: 12px/1.3 var(--interface);
  text-underline-offset: .35em;
  text-decoration-thickness: 1px;
  justify-content: center;
  min-width: 44px;
  color: #a5a49f;
  text-decoration: none;
}

nav a[aria-current], nav a:hover {
  color: #eee9dc;
  text-decoration: underline;
}

main { padding-bottom: clamp(80px, 14svh, 150px); }
.photograph img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  padding-top: 12px;
  line-height: 1.35;
}

figcaption > span, figcaption > h2 {
  display: block;
  color: #dec780;
  font-size: clamp(17px, 1.22vw, 19px);
}
figcaption > h2 { margin: 0; font-weight: 400; }

.voice {
  display: block;
  width: fit-content;
  padding-block: 4px 8px;
  color: #bdb8ae;
  font: italic 16px/1.4 "Iowan Old Style", Baskerville, Georgia, serif;
}

.book-note {
  display: flex;
  align-items: baseline;
}

.book-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 32px;
  color: #bdb8ae;
  font: 16px/1 var(--interface);
  text-decoration: none;
}
.book-link:hover, .book-link:focus-visible { color: #eee9dc; }

.photograph + .photograph { margin-top: clamp(72px, 11svh, 120px); }
.film-error + .photograph { margin-top: clamp(86px, 14svh, 150px); }
.series-caption {
  display: flex;
  align-items: baseline;
}
.series-caption .book-link { margin-block: -6px; }
.film {
  margin-top: clamp(96px, 16svh, 168px);
}

.screen { position: relative; }
video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.play::before {
  content: "";
  grid-area: 1 / 1;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 50%;
  background: rgba(15,15,15,.72);
}

.play::after {
  content: "";
  grid-area: 1 / 1;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent currentColor;
}

.play:hover::before { background: rgba(15,15,15,.93); }
.film-error {
  margin: 10px 0 0;
  font: 14px/1.5 var(--interface);
}

.film-error p { margin: 0; }
.retry {
  min-height: 44px;
  padding: 0 2px;
  border: none;
  background: transparent;
  color: #dec780;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .25em;
  cursor: pointer;
}

@media (max-width: 700px) {
  :root { --room: calc(100% - 28px); }
  header { min-height: 57px; }
  h1 { font-size: 23px; }
  nav a { min-width: 44px; }
  figcaption { padding-top: 10px; }
  .book-link { min-width: 44px; min-height: 44px; }
  .film-error + .photograph { margin-top: 82px; }
  .photograph + .photograph { margin-top: 62px; }
  .film { margin-top: 88px; }
  .play::before { width: 46px; height: 46px; }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 1000px) {
  :root { --room: min(calc(100% - 32px), 128svh); }
}

#signos-intangibles {
  /* Keep the scroll position at the foot of the page as the eye opens. */
  min-height: calc(var(--eye-height, 0px) + 2.6rem);
}
.zoom-stage {
  position: relative;
  width: 100%;
  height: var(--eye-height, auto);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  background: #07090a;
}
/* Real, smaller car photo underneath while the responsive JPEG decodes. */
.zoom-stage[data-view="car"] {
  background: #07090a url("media/signos-intangibles/coche-0000-800.jpg") center top / 100% auto no-repeat;
}
.zoom-stage #signos-car { width: 100%; height: auto; }
.zoom-stage #signos-eye {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.zoom-stage .zoom-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.zoom-surface {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  width: 100%;
  height: var(--car-height, 100%);
  border: 0;
  padding: 0;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: zoom-out;
  touch-action: manipulation;
}
.zoom-stage[data-view="eye"] .zoom-surface { height: 100%; cursor: zoom-in; }
.zoom-surface[aria-disabled="true"] { cursor: progress; }
.zoom-surface:focus-visible { outline: 2px solid #eee9dc; outline-offset: -2px; }
.zoom-stage + figcaption { position: relative; pointer-events: none; }
.zoom-stage[data-view="car"] + figcaption {
  transform: translateY(calc(var(--car-height, 0px) - var(--eye-height, 0px)));
}
.zoom-stage:is(.is-moving, [data-view="eye"]) + figcaption .voice,
.zoom-stage:has(.zoom-surface:disabled) + figcaption .voice { visibility: hidden; }
.zoom-stage.is-moving + figcaption { will-change: transform; }
.zoom-stage:focus-within + figcaption h2 { text-decoration: underline; text-underline-offset: .24em; }
.zoom-error {
  margin: 8px 0 0;
  font: 14px/1.45 var(--interface);
}
