:root {
  --ink: #171718;
  --paper: #eceae7;
  --accent: #7a252c;
  --accent-dark: #51171b;
  --nav: rgba(248, 247, 245, 0.94);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
  background: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .news-content {
    animation: none;
  }
}

.topbar {
  position: relative;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 56px);
}

.brand {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: lowercase;
}

.page-counter {
  color: rgba(23, 32, 42, 0.62);
  font-size: 0.9rem;
}

.page {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 36px clamp(18px, 5vw, 70px);
}

.showcase {
  position: relative;
  width: min(780px, 72vw);
  height: auto;
  aspect-ratio: 780 / 620;
  min-height: 0;
  overflow: visible;
  border: 10px solid #171718;
  border-radius: 28px;
  background: #dad8d4;
  box-shadow: 0 24px 65px rgba(23, 32, 42, 0.16);
  isolation: isolate;
}

.image-placeholder,
.drawer {
  border-radius: 18px;
}

.orbit-text {
  position: absolute;
  z-index: 1;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  overflow: hidden;
  pointer-events: none;
}

.orbit-track {
  position: absolute;
  display: flex;
  align-items: center;
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  overflow: hidden;
}

.orbit-track span {
  flex: none;
}

.orbit-horizontal {
  left: 10px;
  right: 10px;
  height: 10px;
}

.orbit-top {
  top: 0;
  border-radius: 28px 28px 0 0;
}

.orbit-bottom {
  bottom: 0;
  border-radius: 0 0 28px 28px;
}

.orbit-horizontal .orbit-group {
  display: inline-flex;
  flex: none;
  min-width: max-content;
  padding-right: 1.5em;
  animation: orbit-horizontal 60s linear infinite;
}

.orbit-bottom .orbit-group {
  animation-direction: reverse;
}

.orbit-vertical {
  top: 10px;
  bottom: 10px;
  width: 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  align-items: center;
  justify-content: flex-start;
}

.orbit-left {
  left: 0;
  border-radius: 28px 0 0 28px;
}

.orbit-right {
  right: 0;
  border-radius: 0 28px 28px 0;
}

.orbit-vertical .orbit-group {
  display: inline-block;
  min-height: max-content;
  animation: orbit-vertical 60s linear infinite;
}

.orbit-right .orbit-group {
  animation-direction: reverse;
}

@keyframes orbit-horizontal {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes orbit-vertical {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}

.image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(128deg, transparent 0 23px, rgba(23, 23, 24, 0.07) 24px 25px),
    repeating-linear-gradient(38deg, transparent 0 31px, rgba(122, 37, 44, 0.055) 32px 33px),
    linear-gradient(145deg, #efeee9 0%, #d0cdca 55%, #f5f3ef 100%);
}

.image-placeholder::before {
  content: "";
  width: 46%;
  height: 46%;
  border: 2px solid rgba(23, 23, 24, 0.48);
  border-radius: 50% 46% 52% 44%;
  transform: rotate(-8deg);
  box-shadow:
    34px -28px 0 -2px transparent,
    34px -28px 0 0 rgba(122, 37, 44, 0.34),
    -42px 38px 0 -2px transparent,
    -42px 38px 0 0 rgba(23, 23, 24, 0.22);
}

.image-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  object-fit: contain;
  background: #eceae7;
}

.drawer {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 185px;
  max-height: 78%;
  padding: 28px clamp(22px, 4vw, 44px) 30px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 38px rgba(23, 32, 42, 0.14);
  transform: translateY(calc(100% - 64px));
  transition: transform 220ms ease;
  touch-action: none;
}

.drawer:not(.open) {
  height: 64px;
  max-height: 64px;
  padding: 0;
}

.drawer.open {
  position: fixed;
  z-index: 40;
  left: var(--drawer-open-left, 0);
  top: var(--drawer-open-top, 50%);
  bottom: auto;
  right: auto;
  width: var(--drawer-open-width, 100%);
  height: var(--drawer-open-height, 50vh);
  max-height: 100%;
  border-radius: 24px 24px 0 0;
  transform: translateY(0);
  transition: none;
  overflow: hidden;
}

.drawer h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.drawer:not(.open) h1 {
  position: absolute;
  left: clamp(22px, 4vw, 44px);
  right: 72px;
  bottom: 14px;
  margin: 0;
  white-space: nowrap;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.drawer:not(.open) p {
  display: none;
}

.drawer p {
  max-width: 62ch;
  margin: 0;
  color: rgba(23, 32, 42, 0.72);
  line-height: 1.65;
}

.drawer.open p {
  max-height: calc(100% - 72px);
  padding-right: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.drawer-grip {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  transform: none;
  cursor: grab;
}

.drawer-grip::before {
  display: none;
}

.drawer-grip::after {
  content: "\2193";
  position: absolute;
  left: 50%;
  top: 11px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
}

.drawer.open .drawer-grip::after {
  content: "\2191";
  top: 11px;
}

.drawer-grip:active {
  cursor: grabbing;
}

.nav-arrow {
  position: fixed;
  top: 50%;
  z-index: 5;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 50%;
  color: var(--ink);
  background: var(--nav);
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.12);
  text-decoration: none;
  font-size: 1.55rem;
  transform: translateY(-50%);
  transition: 180ms ease;
}

.nav-arrow:hover,
.nav-arrow:focus-visible {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.06);
  outline: none;
}

.nav-prev {
  left: clamp(12px, 3vw, 42px);
}

.nav-next {
  right: clamp(12px, 3vw, 42px);
}

.home {
  width: min(900px, 86vw);
  padding: clamp(30px, 6vw, 70px);
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 65px rgba(23, 32, 42, 0.10);
}

.home h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.home p {
  max-width: 70ch;
  color: rgba(23, 32, 42, 0.68);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.75;
}

.enter {
  display: inline-flex;
  margin-top: 12px;
  padding: 14px 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: 180ms ease;
}

.enter:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.news-background {
  position: fixed;
  z-index: 6;
  inset: 72px 0 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.28;
}

.news-row {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.news-row.top {
  top: 4%;
}

.news-row.middle {
  top: 40%;
}

.news-row.bottom {
  top: 76%;
  bottom: auto;
}

.news-row.high {
  top: 22%;
}

.news-row.low {
  top: 58%;
}

.news-row.extra-bottom {
  top: 94%;
  bottom: auto;
}

.news-row.upper-middle {
  top: 13%;
}

.news-row.lower-middle {
  top: 67%;
}

.news-row.upper-middle {
  top: 14%;
}

.news-row.lower-middle {
  top: 68%;
}

.news-content {
  position: absolute;
  left: 0;
  top: 5px;
  display: block;
  width: 250px;
  height: 82px;
  animation: none;
}

.news-card {
  position: absolute;
  left: 0;
  top: 5px;
  width: 250px;
  height: 82px;
  margin-right: 10px;
  display: grid;
  grid-template-columns: 82px 1fr;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 24, 0.12);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(23, 23, 24, 0.08);
  text-decoration: none;
  backdrop-filter: blur(7px);
  white-space: normal;
  animation: card-cross 58s linear var(--lane-delay, 0s) infinite;
}

@keyframes card-cross {
  from {
    left: -280px;
  }
  to {
    left: calc(100vw + 280px);
  }
  pointer-events: auto;
}

@keyframes card-drift {
  from {
    transform: translateX(-10px);
  }
  to {
    transform: translateX(18px);
  }
}

.news-card-no-image {
  grid-template-columns: 1fr;
}

.news-card img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  filter: grayscale(100%) contrast(0.92);
}

.news-card-copy {
  min-width: 0;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
}

.news-card-source {
  color: rgba(23, 23, 24, 0.78);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-card-title {
  display: -webkit-box;
  margin: 5px 0;
  overflow: hidden;
  color: rgba(23, 23, 24, 0.58);
  font-size: 12px;
  line-height: 1.25;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.12);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-card-meta {
  color: rgba(23, 23, 24, 0.40);
  font-size: 9px;
  text-transform: uppercase;
}

.led-letter {
  display: inline;
  animation: led-flicker 7s steps(1, end) infinite;
  animation-delay: var(--led-delay, 0s);
}

@keyframes led-flicker {
  0%, 17%, 19%, 52%, 54%, 100% {
    color: rgba(23, 23, 24, 0.82);
    text-shadow:
      0 0 2px rgba(23, 23, 24, 0.18),
      0 0 5px rgba(255, 255, 255, 0.42);
  }
  18%, 53% {
    color: rgba(23, 23, 24, 0.38);
    text-shadow: 0 0 1px rgba(23, 23, 24, 0.08);
  }
}

@keyframes news-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); }
}

@media (max-width: 700px) {
  .topbar {
    height: 60px;
    padding-inline: 14px;
  }

  .brand {
    max-width: 72%;
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  .page-counter {
    flex: none;
    font-size: 12px;
  }

  .page {
    min-height: calc(100vh - 60px);
    display: grid;
    place-items: center;
    padding: 12px 10px 66px;
  }

  .showcase {
    width: min(92vw, 580px);
    max-height: calc(100dvh - 150px);
    min-height: 220px;
    border-width: 6px;
    border-radius: 20px;
  }

  .drawer {
    height: 150px;
    padding: 24px 16px 18px;
  }

  .drawer.open {
    width: var(--drawer-open-width, 92vw);
    left: var(--drawer-open-left, 4vw);
    max-height: 100%;
  }

  .drawer h1 {
    font-size: 1.35rem;
  }

  .drawer:not(.open) h1 {
    left: 16px;
    right: 72px;
  }

  .drawer-grip {
    left: auto;
    right: 10px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .drawer-grip::before {
    display: none;
  }

  .drawer-grip::after {
    top: 11px;
  }

  .drawer.open .drawer-grip::after {
    top: 11px;
  }

  .drawer p {
    max-height: calc(100dvh - 230px);
    overflow: auto;
    font-size: 14px;
    line-height: 1.45;
  }

  .drawer p a {
    overflow-wrap: anywhere;
  }

  .nav-arrow {
    top: auto;
    bottom: 14px;
    width: 48px;
    height: 48px;
    transform: none;
  }

  .nav-prev {
    left: 14px;
  }

  .nav-next {
    right: 14px;
  }

  .nav-arrow:hover,
  .nav-arrow:focus-visible {
    transform: scale(1.06);
  }

  .news-background {
    inset: 60px 0 0;
  }

  .news-card {
    width: 220px;
  }
}

@media (max-width: 380px) {
  .topbar {
    height: 56px;
  }

  .brand {
    max-width: 68%;
    font-size: 11px;
  }

  .page {
    min-height: calc(100vh - 56px);
    padding-bottom: 72px;
  }

  .nav-arrow {
    bottom: 10px;
    width: 44px;
    height: 44px;
  }
}
