:root {
  --deck-bar: 72px;
  --roll-ease: cubic-bezier(.2, .72, .22, 1);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.presentation-ready { padding-bottom: calc(var(--deck-bar) + env(safe-area-inset-bottom, 0px)); }
.deck-slide[hidden], .presentation-controls[hidden], .ticker-toggle[hidden] { display: none !important; }
.presentation-ready #toast { bottom: calc(var(--deck-bar) + 16px + env(safe-area-inset-bottom, 0px)); }

.hero { min-height: 0; }
.hero-center { isolation: isolate; }
.hero-center > img:not(.invite-sticker) { position: relative; z-index: 1; }
.hero-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: .24;
  pointer-events: none;
}
.hero-traces .trace-sparks { stroke: var(--cream); stroke-width: 3; }
.side-note { z-index: 1; font-weight: 700; }
.hero-center > .invite-sticker {
  position: absolute;
  z-index: 2;
  right: 2%;
  top: 15%;
  width: clamp(128px, 15vw, 204px);
  transform: rotate(8deg);
  transform-origin: 46% 68%;
}

.ticker {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  padding: 0;
  border-block: 1px solid var(--ink);
}
.ticker-window { overflow: hidden; }
.ticker-track { display: flex; width: max-content; }
.ticker-group {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: 0 0 auto;
  gap: clamp(12px, 2vw, 32px);
  min-width: 100vw;
  padding: 12px clamp(12px, 2vw, 32px) 12px 0;
  white-space: nowrap;
  font: 800 clamp(20px, 2.7vw, 36px)/1.05 Manrope, Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: -.035em;
}
.ticker-group i { color: var(--red); font-size: .65em; font-style: normal; }
.ticker-toggle {
  position: relative;
  min-width: 52px;
  min-height: 46px;
  padding: 0 12px;
  color: var(--cream);
  background: var(--ink);
  border: 0;
  border-left: 1px solid #fff7ed42;
}
.ticker-toggle:hover { background: #2b2626; }
.ticker-toggle:focus-visible { outline-offset: -4px; }
.ticker .ticker-toggle span { font: 700 15px/1 Inter, sans-serif; letter-spacing: 0; }

.presentation-controls {
  position: fixed;
  z-index: 10;
  inset: auto 0 0;
  min-height: calc(var(--deck-bar) + env(safe-area-inset-bottom, 0px));
  padding: 8px 5% calc(8px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  background: var(--cream);
  border-top: 1px solid var(--line);
}
.presentation-progress { position: absolute; inset: -1px 0 auto; height: 2px; }
.presentation-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform: scaleX(var(--slide-progress, 0));
  transform-origin: left;
  transition: transform .32s var(--roll-ease);
}
.slide-select { display: flex; align-items: center; gap: 13px; min-width: 0; }
.slide-select label, #slide-status { font: 700 10px/1.2 Inter, sans-serif; letter-spacing: .1em; }
.slide-select label { text-transform: uppercase; }
#slide-status { font-variant-numeric: tabular-nums; white-space: nowrap; }
.slide-select select {
  min-height: 44px;
  max-width: 100%;
  min-width: 0;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: 650 12px Inter, sans-serif;
}
.slide-select select:focus-visible { outline: 3px solid #2959c9; outline-offset: 2px; }
.slide-arrows { display: flex; justify-self: end; gap: 8px; }
.slide-arrows button {
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 50%;
  font: 700 22px/1 Inter, sans-serif;
}
.slide-arrows button:not(:disabled):hover { color: var(--ink); background: var(--red); }
.slide-arrows button:disabled {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  opacity: .62;
  cursor: default;
}
.top nav a[aria-current="location"] { text-decoration: underline; text-underline-offset: 5px; }

.presentation-ready .palette-section { padding-top: 72px; }
.graphic-grid .ribbon-card {
  position: relative;
  display: grid;
  gap: 28px;
  align-content: center;
  isolation: isolate;
}
.ribbon-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -60% -26%;
  border: 2px solid #17151540;
  border-radius: 50%;
  transform: rotate(-21deg);
}
.ribbon-layout { display: grid; grid-template-columns: minmax(72px, .7fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.ribbon-layout > img { transform: rotate(-8deg); width: 100%; max-width: 196px; }
.ribbon-layout .ribbons { margin: 0; transform: rotate(-8deg); }
.ribbon-layout .ribbons b {
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  font-size: clamp(12px, 1.55vw, 22px);
  line-height: 1.08;
}
.ribbon-layout .ribbons b:nth-child(2) { margin-left: 4px; }

.icon-card .icon-grid { height: auto; min-height: 220px; }
.icon-card .icon-grid img {
  width: min(100%, 72px);
  background: #ed332b12;
  padding: 8px;
  border: 1px solid #ed332b32;
  border-radius: 18px;
}
.category-nav button { transition: border-color .2s, background .2s; }
.category-nav button.active { box-shadow: inset 0 0 0 1px var(--red); }

@media (prefers-reduced-motion: no-preference) {
  .presentation-ready .ticker-track { animation: roll 29s linear infinite; }
  .ticker[data-paused] .ticker-track { animation-play-state: paused; }
  .presentation-ready .is-current { animation: chapter-in .42s var(--roll-ease) both; }
  .is-current .invite-sticker { animation: stamp-in .75s var(--roll-ease) both; }
  .is-current .hero-traces { animation: traces-in .85s var(--roll-ease) both; }
  .is-current .ribbons b { animation: ribbon-in .55s var(--roll-ease) .10s both; }
  .is-current .ribbons b:nth-child(2) { animation-delay: .18s; }
  .product-card.category-enter { animation: product-in .25s var(--roll-ease) both; }
}
@keyframes roll { to { transform: translateX(-50%); } }
@keyframes chapter-in { from { opacity: .5; } to { opacity: 1; } }
@keyframes stamp-in {
  from { opacity: 0; transform: translate(9px, 14px) rotate(18deg) scale(.89); }
  to { opacity: 1; transform: rotate(8deg); }
}
@keyframes traces-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: .24; } }
@keyframes ribbon-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; } }
@keyframes product-in { from { opacity: .68; transform: translateY(4px); } to { opacity: 1; } }

@media (max-width: 760px) {
  :root { --deck-bar: 64px; }
  .hero-center { min-height: 295px; padding-top: 53px; }
  .hero-center > .invite-sticker { width: clamp(94px, 27vw, 138px); top: 0; right: -1%; }
  .hero-traces { opacity: .18; }
  .presentation-controls { grid-template-columns: minmax(0, 1fr) auto auto; padding-inline: 12px; gap: 8px; }
  .slide-select label { display: none; }
  .slide-select select { width: 100%; font-size: 11px; padding: 0 5px; }
  .slide-arrows { gap: 5px; }
  .slide-arrows button { min-width: 44px; min-height: 44px; }
  #slide-status { letter-spacing: .02em; font-size: 10px; }
  .presentation-ready .palette-section { padding-top: 55px; }
  .graphic-grid .ribbon-card { min-height: 220px; padding: 20px; }
  .ribbon-layout .ribbons b { font-size: clamp(13px, 3.5vw, 20px); }
  .icon-card .icon-grid img { border-radius: 12px; padding: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-toggle { display: none !important; }
}
