/* Proposal deck - light 16:9 slides, simple */

:root {
  --bg: #f6f4ef;
  --bg-slide: #fffefb;
  --ink: #1a1916;
  --muted: #5c574e;
  --line: #e4dfd4;
  --gold: #9a7b2f;
  --gold-soft: rgba(154, 123, 47, 0.12);
  --vio: #5b35b5;
  --vio-soft: rgba(91, 53, 181, 0.1);
  --mono: "Libertinus Mono", "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --chrome-h: 52px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #fff; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
}
.skip:focus { left: 8px; top: 8px; }

/* Chrome */
.chrome {
  height: var(--chrome-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-slide);
  position: relative;
  z-index: 20;
  gap: 12px;
}
.chrome-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  justify-self: start;
  min-width: 0;
  white-space: nowrap;
  line-height: 1.2;
}
.cb-p {
  letter-spacing: 0.12em;
  color: var(--ink);
  flex: 0 0 auto;
}
.cb-mid {
  display: inline-block;
  font-size: 0.78em;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--muted);
  font-weight: 500;
  flex: 0 0 auto;
  padding: 0 0.1em;
}
/* Wide enough for letterspaced T W I S T across all cycle fonts */
.cb-t-slot {
  display: inline-flex;
  align-items: baseline;
  min-width: 6.75em;
  flex: 0 0 auto;
  font-family: var(--mono);
  overflow: visible;
  line-height: 1.2;
}
.cb-t {
  letter-spacing: 0.12em;
  color: var(--vio);
  display: inline-block;
  transition: color 0.28s var(--ease);
}
.chrome-mid {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0.08em;
  justify-self: center;
  text-align: center;
  white-space: nowrap;
}
.chrome-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  padding: 8px 12px 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(154, 123, 47, 0.35);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  transition: background 0.15s var(--ease);
}
.chrome-link .chrome-arrow {
  font-size: 14px;
  line-height: 1;
  transition: transform 0.15s var(--ease);
}
.chrome-link:hover { background: var(--gold-soft); }
.chrome-link:hover .chrome-arrow { transform: translateX(2px); }
.chrome-link:active { transform: scale(0.96); }

/* Deck */
.deck {
  height: calc(100dvh - var(--chrome-h) - var(--nav-h));
  overflow: hidden;
  position: relative;
  outline: none;
  isolation: isolate;
  z-index: 0;
}

/* Dither: bottom→~70%, own stacking context, never above slides/chrome */
.dither-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: 70%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.62;
  mix-blend-mode: multiply;
  isolation: isolate;
  contain: layout paint;
  -webkit-mask-image: linear-gradient(
    to top,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.7) 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to top,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.7) 82%,
    transparent 100%
  );
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  z-index: 1;
}
.slide.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 1;
}

/* 16:9 frame */
.slide-frame {
  width: min(100%, calc((100dvh - var(--chrome-h) - var(--nav-h) - 40px) * 16 / 9));
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - var(--chrome-h) - var(--nav-h) - 40px);
  background: var(--bg-slide);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 48px rgba(26, 25, 22, 0.06);
  padding: clamp(28px, 4.5vw, 48px) clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.h1, .h2 {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--ink);
  margin-bottom: 14px;
}
.h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  max-width: 18ch;
}
.h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  max-width: 22ch;
  margin-bottom: 22px;
}

.lede {
  font-size: clamp(0.95rem, 1.35vw, 1.1rem);
  color: var(--muted);
  max-width: 42ch;
  text-wrap: pretty;
  margin-bottom: 20px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg);
}

/* ASCII: no border, same page ground */
.ascii-box {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 20px;
  padding: 4px 0;
  background: transparent;
  border: none;
  overflow: visible;
}
.ascii-box-hero {
  margin-bottom: 22px;
}
.ascii-box-hero .ascii,
.ascii-box-hero .ascii-brand {
  font-size: clamp(14px, 1.55vw, 18px);
  line-height: 1.45;
  margin: 0;
}
.ascii-brand {
  font-family: var(--mono);
  white-space: pre;
  margin: 0;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  width: fit-content;
}
.ascii-brand .ab-l,
.ascii-brand .ab-r {
  font-family: var(--mono);
  flex: 0 0 auto;
}
/* Slot width locked to base mono so trailing | never moves */
.ascii-brand .ab-twist-slot {
  display: inline-block;
  width: 9ch;
  font-family: var(--mono);
  flex: 0 0 9ch;
  overflow: visible;
  text-align: left;
}
.ascii-brand .ab-twist {
  display: inline-block;
  color: var(--vio);
  transition: color 0.28s var(--ease);
  font-variant-ligatures: none;
  white-space: pre;
}
.ascii-box-sm {
  width: 100%;
  margin-bottom: 12px;
  padding: 4px 0;
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ascii-box-path {
  width: 100%;
  margin: 0;
  min-height: 11rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 4px 0;
}

.ascii {
  font-family: var(--mono);
  font-size: clamp(11px, 1.15vw, 14px);
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
  white-space: pre;
  text-align: left;
  font-variant-ligatures: none;
}

/* Grids */
.tri {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 4px;
}
.quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  min-height: 0;
}
.card h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}
.card-ascii {
  display: flex;
  flex-direction: column;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

/* Path slide */
.path-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.path-tab {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.12s var(--ease);
}
.path-tab:hover { color: var(--ink); border-color: #d0c9bb; }
.path-tab:active { transform: scale(0.96); }
.path-tab.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.path-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.path-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 4px 0;
}
.path-copy h3 {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 400;
}
.path-copy p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 32ch;
}
.path-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.path-steps li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--ink);
  border: 1px solid rgba(154, 123, 47, 0.2);
}

/* Price */
.price-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}
.price-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}
.price {
  font-family: var(--mono);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 6px 0 12px;
}
.price span:first-child {
  font-size: 0.5em;
  color: var(--gold);
  vertical-align: super;
  margin-right: 2px;
}
.per {
  font-size: 0.35em;
  color: var(--muted);
  letter-spacing: 0;
}
.price-desc {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.45;
}
.price-join {
  font-family: var(--mono);
  font-size: 1.5rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.timeline {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.5;
  max-width: 52ch;
  margin-top: 10px;
  text-wrap: pretty;
}

/* Bottom nav */
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-slide);
  position: relative;
  z-index: 20;
}
.nav-btn {
  min-height: 44px;
  min-width: 88px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.12s var(--ease);
}
.nav-btn:hover:not(:disabled) { color: var(--ink); background: var(--bg); }
.nav-btn:active:not(:disabled) { transform: scale(0.96); }
.nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.nav-btn-main {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.nav-btn-main:hover:not(:disabled) { background: #2c2a26; color: #fff; }

.dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.dot.is-on {
  background: var(--ink);
  transform: scale(1.15);
}
.dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

/* Mobile: stack, drop fixed 16:9 */
@media (max-width: 820px) {
  html, body {
    overflow: auto;
    height: auto;
  }
  .dither-waves {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--nav-h);
    top: auto;
    width: 100%;
    height: min(70dvh, calc(100dvh - var(--chrome-h) - var(--nav-h)));
    opacity: 0.48;
    z-index: 0;
    pointer-events: none;
    isolation: isolate;
    contain: layout paint;
  }
  .deck {
    height: auto;
    overflow: visible;
    z-index: 1;
    isolation: isolate;
  }
  .slide {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    padding: 12px 14px;
    display: flex;
  }
  .slide + .slide {
    border-top: none;
  }
  .slide-frame {
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    max-height: none;
    height: auto;
    padding: 24px 20px;
    border-radius: 14px;
  }
  .tri,
  .quad,
  .path-panel,
  .price-row {
    grid-template-columns: 1fr;
  }
  .price-join {
    transform: none;
    padding: 0;
    font-size: 1.1rem;
  }
  .nav {
    position: sticky;
    bottom: 0;
  }
  .h1 { max-width: none; }
  .h2 { max-width: none; }
  .ascii {
    font-size: 11px;
  }
  .ascii-box-path {
    min-height: 8rem;
  }
}

@media (max-width: 420px) {
  .chrome { padding: 0 12px; }
  .nav-btn { min-width: 72px; padding: 0 12px; }
}
