* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --background: #101014;
  --surface: #17171d;
  --surface-deep: #0b0b0e;
  --text: #f8f3df;
  --muted: rgba(248, 243, 223, .64);
  --line: rgba(248, 243, 223, .22);
  --cream: #ffe7bd;
  --accent: #ffb86b;
}

html { background: var(--background); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
}

button, a { -webkit-tap-highlight-color: transparent; }

main {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 38px 0 34px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0 0 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(248, 243, 223, .2);
}

.site-nav a {
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(30px, 5vw, 64px);
  line-height: .96;
  letter-spacing: -.035em;
}

.slider { width: 100%; }

.stage {
  position: relative;
  display: grid;
  min-height: min(72vh, 760px);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 184, 107, .08), transparent 42%),
    var(--surface-deep);
  isolation: isolate;
  touch-action: pan-y;
  user-select: none;
}

.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .34);
}

#slide-image {
  width: 100%;
  height: 100%;
  min-height: min(72vh, 760px);
  object-fit: contain;
  opacity: 1;
  transform: scale(1);
  transition: opacity .22s ease, transform .42s cubic-bezier(.2, .75, .2, 1);
}

.stage.is-changing #slide-image {
  opacity: .16;
  transform: scale(.992);
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin: -17px;
  border: 3px solid rgba(248, 243, 223, .2);
  border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: spin .8s linear infinite;
  transition: opacity .15s ease;
}

.stage.is-changing .loading { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

.arrow,
.play {
  border: 1px solid rgba(248, 243, 223, .55);
  background: rgba(16, 16, 20, .78);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 70px;
  padding: 0;
  font-size: 29px;
  transform: translateY(-50%);
}

.arrow-prev { left: 16px; }
.arrow-next { right: 16px; }

.arrow:hover,
.arrow:focus-visible,
.play:hover,
.play:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.slide-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 44px 18px 16px;
  background: linear-gradient(transparent, rgba(11, 11, 14, .88));
  pointer-events: none;
}

.slide-bar > div { display: flex; align-items: baseline; gap: 12px; }

.slide-bar strong {
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.slide-bar span { color: var(--muted); font-size: 13px; }

.play {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 15px;
  pointer-events: auto;
}

.play[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

.hint {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

footer {
  margin-top: 28px;
  color: rgba(248, 243, 223, .62);
  font-size: 14px;
}

footer a { color: var(--cream); text-underline-offset: 3px; }

@media (max-width: 720px) {
  main { width: min(100% - 20px, 1180px); padding-top: 22px; }
  .site-nav { gap: 9px 16px; margin-bottom: 22px; }
  .page-heading { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
  .stage, #slide-image { min-height: min(68vh, 620px); }
  .arrow { width: 44px; height: 58px; font-size: 24px; }
  .arrow-prev { left: 8px; }
  .arrow-next { right: 8px; }
  .slide-bar { padding-right: 10px; padding-left: 10px; }
  .slide-bar span { display: none; }
  .hint { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Keep portrait and landscape photos fully visible within the viewport. */
.stage { height: var(--maqueta-stage-height, 65dvh); min-height: 0; grid-template-rows: minmax(0, 1fr) auto; }
#slide-image { display: block; width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; }
.slide-bar { position: relative; inset: auto; padding: 10px 18px; background: var(--surface-deep); pointer-events: auto; }
@media(max-width:720px) { .stage, #slide-image { min-height: 0; } .slide-bar { padding: 8px 10px; } }
