* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --blue: #2e6ca3;
  --ink: #252724;
  --cream: #fff0d3;
  --orange: #ff861c;
  --red: #8f211f;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Trebuchet MS", Arial, sans-serif;
}

a {
  color: inherit;
}

.poster {
  position: relative;
  width: 100%;
  line-height: 0;
  background: var(--blue);
}

.poster-art {
  display: block;
  width: 100%;
  height: auto;
}

.alphabet-hotspots {
  position: absolute;
  inset: 0;
  z-index: 1;
  line-height: normal;
  pointer-events: none;
}

.alphabet-hotspot {
  position: absolute;
  left: var(--letter-x);
  top: var(--letter-y);
  width: var(--letter-width);
  height: var(--letter-height);
  display: block;
  pointer-events: auto;
  cursor: pointer;
}

.alphabet-hotspot > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.alphabet-hotspot canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
}

.alphabet-hotspot:hover canvas,
.alphabet-hotspot:focus-visible canvas {
  opacity: 1;
}

.alphabet-hotspot:focus-visible,
.poster-link:focus-visible,
.record-back:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.poster-links {
  position: absolute;
  inset: 0;
  z-index: 2;
  line-height: normal;
  pointer-events: none;
}

.poster-link {
  position: absolute;
  top: 1.05%;
  height: 3.2%;
  display: block;
  pointer-events: auto;
}

.poster-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.link-archive {
  left: 3%;
  width: 5%;
}

.link-technique {
  left: 9%;
  width: 8%;
}

.link-description {
  left: 19%;
  width: 9%;
}

.link-alphabet {
  left: 45%;
  width: 9%;
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 4rem);
  min-height: 4.5rem;
  padding: 1rem clamp(1.25rem, 5vw, 5rem);
  background: var(--ink);
  color: var(--orange);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-nav a,
.site-footer a {
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--cream);
}

.section-nav .back-to-top {
  margin-left: auto;
}

.editorial-section {
  min-height: 72vh;
  padding: clamp(4rem, 10vw, 10rem) clamp(1.25rem, 11vw, 12rem);
  scroll-margin-top: 4.5rem;
}

.archive-section {
  color: var(--cream);
  background: var(--blue);
}

.technique-section {
  background: #e4dfd7;
}

.description-section {
  color: var(--cream);
  background: var(--red);
}

.alphabet-section {
  background: var(--cream);
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--orange);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.editorial-section h2 {
  max-width: 10ch;
  margin: 0 0 2rem;
  font-size: clamp(3.5rem, 12vw, 11rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.82;
  text-transform: uppercase;
}

.section-copy {
  max-width: 44rem;
  margin: 0 0 1rem;
  font-size: clamp(1.1rem, 2vw, 1.65rem);
  line-height: 1.45;
}

.text-link {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid currentColor;
  color: inherit;
  font-size: 1rem;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--orange);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.25rem, 5vw, 5rem);
  color: var(--cream);
  background: var(--ink);
  font-size: 0.85rem;
}

.hairstyle-page {
  min-height: 100vh;
  background: var(--blue);
}

.hairstyle-poster {
  position: relative;
  width: 100%;
  line-height: 0;
}

.hairstyle-art {
  display: block;
  width: 100%;
  height: auto;
}

.record-back {
  position: absolute;
  top: 1.4%;
  left: 3.2%;
  z-index: 1;
  width: 8%;
  height: 4%;
  display: block;
}

.record-back span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.record-empty {
  min-height: 100vh;
  padding: clamp(2rem, 8vw, 8rem);
  color: var(--cream);
  background: var(--blue);
}

.record-empty[hidden],
.hairstyle-poster[hidden] {
  display: none;
}

.record-empty .eyebrow {
  color: var(--orange);
}

.record-empty h1 {
  max-width: 12ch;
  margin: 0 0 2rem;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-transform: uppercase;
}

.record-empty p {
  max-width: 38rem;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.45;
}

.record-empty a {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--orange);
  text-decoration: none;
}

.record-empty a:hover,
.record-empty a:focus-visible {
  color: var(--cream);
}

@media (max-width: 600px) {
  .section-nav {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    min-height: 0;
    padding: 1rem;
    font-size: 0.7rem;
  }

  .section-nav .back-to-top {
    margin-left: 0;
  }

  .editorial-section {
    min-height: 60vh;
    padding: 4rem 1.25rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

  .alphabet-hotspot canvas {
    transition: none;
  }
}

@keyframes archive-slide-out {
  to {
    opacity: 0;
    transform: translateX(-4vw);
  }
}

@keyframes record-slide-in {
  from {
    opacity: 0;
    transform: translateX(5vw);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body.page-leaving > main {
  animation: archive-slide-out 360ms cubic-bezier(0.7, 0, 0.3, 1) both;
  pointer-events: none;
}

.hairstyle-page {
  animation: record-slide-in 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  body.page-leaving > main,
  .hairstyle-page {
    animation: none;
  }
}

.letter-transition {
  position: fixed;
  z-index: 20;
  display: block;
  pointer-events: none;
  object-fit: fill;
  will-change: left, top, width, height, opacity;
}

.record-empty #record-letter {
  color: var(--orange);
}

@media (prefers-reduced-motion: reduce) {
  .letter-transition {
    display: none;
  }
}
