/* Sobre TempusDB: secuencia editorial de capítulos a pantalla completa. */
html:not(.night-mode):has(.about-story),
body:not(.night-mode).page-about {
  --watches-catalog-page: #fcfcfa;
  --watches-catalog-surface: #ffffff;
  --watches-catalog-card: #f3f3f1;
  --watches-catalog-ink: #292929;
  --watches-catalog-muted: #707070;
  --watches-catalog-line: rgba(41, 41, 41, 0.11);
  --watches-catalog-line-strong: rgba(41, 41, 41, 0.2);
  --watches-catalog-gold: #6f6b65;
  --theme-surface-bg: var(--watches-catalog-page);
  --surface-bg: var(--watches-catalog-page);
  --surface-text: var(--watches-catalog-ink);
  background-color: var(--watches-catalog-page);
  background-image: none;
}

html.night-mode:has(.about-story) {
  background-color: var(--theme-surface-bg);
}

html:has(.about-story.is-enhanced),
body.page-about:has(.about-story.is-enhanced) {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.night-mode.page-about {
  --watches-catalog-page: var(--surface-bg);
  --watches-catalog-surface: color-mix(in srgb, var(--surface-bg) 94%, var(--surface-text) 6%);
  --watches-catalog-card: color-mix(in srgb, var(--surface-bg) 92%, var(--surface-text) 8%);
  --watches-catalog-ink: var(--surface-text);
  --watches-catalog-muted: color-mix(in srgb, var(--surface-text) 70%, transparent);
  --watches-catalog-line: color-mix(in srgb, var(--surface-text) 14%, transparent);
  --watches-catalog-line-strong: color-mix(in srgb, var(--surface-text) 24%, transparent);
  --watches-catalog-gold: var(--accent-blue);
  background-color: var(--surface-bg);
  background-image: none;
}

body.page-about {
  --page-bg-el-a: none;
  --page-bg-el-b: none;
  --page-bg-el-c: none;
  --page-bg-horse: none;
  --page-bg-stonehenge: none;
  --page-bg-circle-a: none;
  --page-bg-circle-b: none;
  --page-bg-circle-c: none;
  padding-bottom: 0;
}

body.page-about::before {
  content: none;
}

body.page-about main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  background-color: var(--watches-catalog-page);
}

body.page-about:has(.about-story.is-enhanced) main {
  height: calc(100dvh - var(--header-offset, 96px) - var(--ios-safe-top-physical, 0px));
  overflow: hidden;
}

.about-story,
.about-story *,
.about-story *::before,
.about-story *::after {
  box-sizing: border-box;
}

.about-story {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  height: calc(100dvh - var(--header-offset, 96px) - var(--ios-safe-top-physical, 0px));
  min-height: 0;
  overflow: hidden;
  overflow: clip;
  background: var(--watches-catalog-page);
  color: var(--watches-catalog-ink);
  text-align: left;
}

.about-story-masthead {
  position: absolute;
  top: 0;
  right: clamp(20px, 4.6vw, 76px);
  left: clamp(20px, 4.6vw, 76px);
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-width: 0;
  padding: clamp(15px, 2vh, 24px) 0;
  border-bottom: 1px solid var(--watches-catalog-line);
  pointer-events: none;
}

.about-story-brand,
.about-story-location,
.about-story .about-section-label,
.about-story-chapter-number {
  margin: 0;
  font-family: var(--font-header-menu);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.about-story-brand {
  flex: 0 0 auto;
  color: var(--watches-catalog-ink);
}

.about-story-location {
  min-width: 0;
  overflow: hidden;
  color: var(--watches-catalog-muted);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.about-story-exit {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  color: var(--watches-catalog-ink);
  font-family: var(--font-header-menu);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  pointer-events: auto;
}

.about-story-exit::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0.35;
}

.about-story-exit:hover::after,
.about-story-exit:focus-visible::after {
  opacity: 1;
}

.about-story-exit:focus-visible {
  outline: 1px solid var(--watches-catalog-gold);
  outline-offset: 4px;
}

.about-story-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
}

.about-story-stage:focus-visible {
  outline: 1px solid var(--watches-catalog-gold);
  outline-offset: -5px;
}

.about-story-panels {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.about-story-chapter {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(22px, 3vw, 54px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding:
    clamp(82px, 12vh, 132px)
    clamp(20px, 6vw, 96px)
    clamp(94px, 14vh, 150px);
  overflow: hidden;
  background: transparent;
  color: var(--watches-catalog-ink);
  scrollbar-color: var(--watches-catalog-line-strong) transparent;
  scrollbar-width: thin;
}

.about-story.is-enhanced .about-story-chapter {
  position: absolute;
  inset: 0;
  z-index: 0;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity, filter;
}

.about-story.is-enhanced .about-story-chapter.is-active,
.about-story.is-enhanced .about-story-chapter.is-departing {
  visibility: visible;
}

.about-story.is-enhanced .about-story-chapter.is-active {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.about-story.is-enhanced .about-story-chapter.is-departing {
  z-index: 1;
  pointer-events: none;
}

.about-story-chapter-number {
  grid-column: 12;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  color: var(--watches-catalog-muted);
  white-space: nowrap;
}

.about-story-chapter-heading {
  grid-column: 1 / 8;
  grid-row: 2;
  align-self: center;
  min-width: 0;
}

.about-story .about-section-label {
  color: var(--watches-catalog-gold);
}

.about-story-chapter :is(h1, h2) {
  max-width: 930px;
  margin: clamp(10px, 1.5vw, 18px) 0 0;
  color: var(--watches-catalog-ink);
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 5.6vw, 6.6rem);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 0.94;
  text-wrap: balance;
}

.about-story-chapter-lead {
  max-width: 660px;
  margin: clamp(20px, 3vw, 34px) 0 0;
  color: var(--watches-catalog-muted);
  font-size: clamp(1rem, 1.45vw, 1.3rem);
  line-height: 1.55;
}

.about-story-chapter-copy {
  display: grid;
  grid-column: 9 / 13;
  grid-row: 2;
  align-self: center;
  min-width: 0;
  max-width: 620px;
  gap: clamp(12px, 1.5vw, 20px);
}

.about-story-chapter-copy p {
  margin: 0;
  color: var(--watches-catalog-muted);
  font-size: clamp(0.94rem, 1.12vw, 1.12rem);
  line-height: 1.72;
}

.about-story-chapter:nth-child(3) .about-story-chapter-heading {
  grid-column: 1 / 9;
}

.about-story-chapter:nth-child(3) .about-story-chapter-copy {
  grid-column: 9 / 13;
  padding-left: clamp(0px, 1vw, 18px);
  border-left: 1px solid var(--watches-catalog-line-strong);
}

.about-story-chapter:nth-child(4) .about-story-chapter-heading {
  grid-column: 2 / 8;
}

.about-story-chapter:nth-child(4) .about-story-chapter-copy {
  grid-column: 9 / 13;
}

.about-story-chapter:nth-child(5) .about-story-chapter-heading {
  grid-column: 6 / 13;
}

.about-story-chapter:nth-child(5) .about-story-chapter-copy {
  grid-column: 1 / 5;
}

.about-story-chapter:nth-child(6) .about-story-chapter-heading {
  grid-column: 2 / 9;
}

.about-story-chapter:nth-child(6) .about-story-chapter-copy {
  grid-column: 9 / 13;
  align-self: end;
  padding-bottom: clamp(10px, 3vh, 38px);
}

.about-story .about-wordmark {
  color: var(--watches-catalog-ink);
}

.about-story .about-wordmark-highlight {
  color: var(--watches-catalog-gold);
}

.about-story-navigation {
  position: absolute;
  right: clamp(20px, 4.6vw, 76px);
  bottom: 0;
  left: clamp(20px, 4.6vw, 76px);
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  min-width: 0;
  padding: clamp(13px, 2vh, 22px) 0;
  border-top: 1px solid var(--watches-catalog-line);
  pointer-events: none;
}

.about-story-progress {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  min-width: 0;
}

.about-story-counter {
  display: flex;
  gap: 6px;
  margin: 0;
  color: var(--watches-catalog-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.about-story-progress-rail {
  position: relative;
  width: 100%;
  height: 1px;
  overflow: hidden;
  background: var(--watches-catalog-line-strong);
}

.about-story-progress-rail > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 16.6667%;
  background: var(--watches-catalog-ink);
  transition: width 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.about-story-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  min-width: 0;
  pointer-events: auto;
}

.about-story-dot {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.about-story-dot::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--watches-catalog-line-strong);
  content: "";
  transition: transform 160ms ease, background-color 160ms ease;
}

.about-story-dot:hover::before,
.about-story-dot:focus-visible::before,
.about-story-dot.is-active::before {
  background: var(--watches-catalog-ink);
  transform: scale(1.65);
}

.about-story-dot:focus-visible {
  outline: 1px solid var(--watches-catalog-gold);
  outline-offset: -4px;
}

.about-story-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  pointer-events: auto;
}

.about-story-control {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid var(--watches-catalog-line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--watches-catalog-ink);
  font: inherit;
  font-size: 1.18rem;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.about-story-control:hover,
.about-story-control:focus-visible {
  border-color: var(--watches-catalog-gold);
  background: var(--watches-catalog-card);
  outline: none;
}

.about-story-control:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--watches-catalog-gold) 20%, transparent);
}

.about-story-control:disabled {
  cursor: default;
  opacity: 0.34;
}

.about-story :is(h1, h2, h3, p, li, a, button) {
  overflow-wrap: anywhere;
}

.about-story :is(img, svg, video, canvas, iframe, table, pre) {
  max-width: 100%;
}

.about-story:not(.is-enhanced) {
  height: auto;
  min-height: calc(100svh - var(--header-offset, 96px));
}

.about-story:not(.is-enhanced) .about-story-panels {
  display: grid;
  height: auto;
}

.about-story:not(.is-enhanced) .about-story-chapter {
  height: auto;
  min-height: calc(100svh - var(--header-offset, 96px) - 110px);
  border-bottom: 1px solid var(--watches-catalog-line);
  overflow: visible;
}

@media (max-width: 899px) {
  .about-story-masthead,
  .about-story-navigation {
    right: clamp(16px, 5vw, 28px);
    left: clamp(16px, 5vw, 28px);
  }

  .about-story-chapter {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: clamp(18px, 3.5vh, 30px);
    padding:
      clamp(72px, 11vh, 106px)
      clamp(18px, 6vw, 42px)
      clamp(96px, 15vh, 126px);
  }

  .about-story-chapter-number {
    grid-column: 1;
    grid-row: 1;
  }

  .about-story-chapter .about-story-chapter-heading,
  .about-story-chapter:nth-child(n) .about-story-chapter-heading {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
  }

  .about-story-chapter .about-story-chapter-copy,
  .about-story-chapter:nth-child(n) .about-story-chapter-copy {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    max-width: 740px;
    padding: 0;
    border: 0;
  }

  .about-story-chapter :is(h1, h2) {
    max-width: 760px;
    font-size: clamp(2.15rem, 8vw, 4.8rem);
    line-height: 0.98;
  }

  .about-story-chapter:nth-child(6) .about-story-chapter-copy {
    padding-bottom: 0;
  }
}

@media (max-width: 620px) {
  .about-story {
    height: calc(100dvh - var(--header-offset, 96px) - var(--ios-safe-top-physical, 0px));
  }

  .about-story-masthead {
    padding-block: 12px;
  }

  .about-story-brand {
    display: none;
  }

  .about-story-location {
    grid-column: 1;
    max-width: 100%;
    text-align: left;
  }

  .about-story-exit {
    grid-column: 3;
  }

  .about-story-chapter {
    align-content: start;
    gap: clamp(10px, 2.5vh, 18px);
    padding:
      clamp(58px, 11vh, 90px)
      clamp(18px, 6vw, 42px)
      clamp(88px, 17vh, 128px);
  }

  .about-story-chapter :is(h1, h2) {
    font-size: clamp(1.55rem, min(10.5vw, 5.2vh), 3.35rem);
  }

  .about-story-chapter-lead {
    margin-top: clamp(9px, 2vh, 16px);
    font-size: clamp(0.84rem, 2.2vh, 1rem);
    line-height: 1.42;
  }

  .about-story-chapter-copy {
    gap: clamp(7px, 1.5vh, 11px);
  }

  .about-story-chapter-copy p {
    font-size: clamp(0.76rem, 2vh, 0.94rem);
    line-height: 1.46;
  }

  .about-story-navigation {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-block: 10px;
  }

  .about-story-progress {
    grid-template-columns: auto minmax(52px, 1fr);
    gap: 10px;
  }

  .about-story-dots {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .about-story-dot {
    width: 32px;
    height: 32px;
  }

  .about-story-controls {
    gap: 5px;
  }

  .about-story-control {
    width: 44px;
    height: 44px;
  }
}

@media (max-height: 680px) and (min-width: 621px) {
  .about-story-masthead,
  .about-story-navigation {
    padding-block: 10px;
  }

  .about-story-chapter {
    padding-top: 66px;
    padding-bottom: 80px;
  }

  .about-story-chapter :is(h1, h2) {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-story-progress-rail > span,
  .about-story-dot::before,
  .about-story-control {
    transition: none;
  }
}
