@layer reset, base, components, slides, responsive;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  html,
  body {
    margin: 0;
    min-width: 320px;
  }
  button,
  a {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  button {
    cursor: pointer;
  }
  img {
    display: block;
    max-width: 100%;
  }
  [hidden] {
    display: none !important;
  }
  h1,
  h2,
  h3,
  p,
  figure,
  blockquote {
    margin: 0;
  }
}

@layer base {
  :root {
    --ink: #252332;
    --ink-soft: #605c6d;
    --paper: #faf7f2;
    --accent: #69518f;
    --lavender: #e8e0f5;
    --peach: #f8e2d8;
    --mint: #deeee4;
    --line: rgba(70, 52, 91, 0.13);
    --surface: rgba(255, 255, 255, 0.72);
    --radius: 1.75rem;
    --gutter: clamp(1.25rem, 4.5vw, 5.5rem);
    --shadow: 0 24px 70px -35px rgba(81, 59, 104, 0.25);
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
  }
  body {
    overflow: hidden;
  }
  a,
  button {
    color: inherit;
  }
  a:focus-visible,
  button:focus-visible,
  main:focus-visible,
  h1:focus-visible,
  h2:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
  }
  ::selection {
    background: var(--lavender);
    color: var(--ink);
  }
  h1,
  h2 {
    font-weight: 650;
    letter-spacing: -0.065em;
    line-height: 1.04;
    text-wrap: balance;
  }
  h1 {
    font-size: clamp(3.5rem, 6.8vw, 7.5rem);
  }
  h2 {
    font-size: clamp(2.65rem, 4.5vw, 5.5rem);
  }
  h1 span,
  h2 span {
    color: var(--accent);
  }
  h3 {
    font-size: clamp(1.1rem, 1.5vw, 1.55rem);
    font-weight: 620;
    letter-spacing: -0.035em;
    line-height: 1.25;
  }
  p {
    text-wrap: pretty;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .skip-link {
    position: fixed;
    z-index: 100;
    top: -6rem;
    left: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 1rem;
  }
  .skip-link:focus {
    top: 1rem;
  }
  .noscript-note {
    position: fixed;
    inset: auto 1rem 1rem;
    z-index: 30;
    padding: 1rem;
    background: white;
  }
}

@layer components {
  .deck-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100svh;
    height: 100dvh;
    background:
      radial-gradient(ellipse at 88% 22%, #e8e0f580, transparent 54%),
      radial-gradient(ellipse at 3% 95%, #f8e2d890, transparent 48%), var(--paper);
  }
  .deck-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: max(1rem, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right))
      0.75rem max(var(--gutter), env(safe-area-inset-left));
    z-index: 10;
  }
  .wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.045em;
    text-decoration: none;
    min-height: 44px;
  }
  .wordmark-mark {
    width: 1.65rem;
    height: 1.65rem;
  }
  .toolbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  .text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
  }
  .text-link:hover {
    color: var(--accent);
  }
  .icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
  }
  .icon-button svg {
    width: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
  }
  .collapse-icon,
  :fullscreen .expand-icon {
    display: none;
  }
  :fullscreen .collapse-icon {
    display: block;
  }
  .slides {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cfc2de transparent;
  }
  .slide {
    display: grid;
    align-content: safe center;
    gap: clamp(1.5rem, 3.5vh, 3rem);
    min-height: 100%;
    max-width: 1680px;
    margin-inline: auto;
    padding: clamp(1.5rem, 3vh, 3rem) max(var(--gutter), env(safe-area-inset-right))
      clamp(1.5rem, 3vh, 3rem) max(var(--gutter), env(safe-area-inset-left));
  }
  .slide > *,
  .slide article,
  .slide li {
    min-width: 0;
  }
  .eyebrow {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.1rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 720;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }
  .eyebrow-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #7ca38a;
    box-shadow: 0 0 0 5px #deeee4;
  }
  .lede {
    max-width: 36rem;
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    line-height: 1.65;
  }
  .cover-copy .lede,
  .product-copy .lede,
  .trust-copy .lede,
  .demo-copy .lede {
    margin-top: 1.5rem;
  }
  .bottom-note {
    color: var(--ink-soft);
    font-size: 0.85rem;
    line-height: 1.6;
  }
  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    min-height: 52px;
    padding: 0.95rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    transition:
      background 180ms,
      box-shadow 180ms;
  }
  .button-primary {
    color: #fff;
    background: #34303f;
    box-shadow: 0 8px 24px -12px #44325680;
  }
  .button-primary:hover {
    background: #544364;
    box-shadow: 0 12px 28px -10px #44325650;
  }
  .cover-copy .button,
  .demo-copy .button {
    margin-top: 1.75rem;
  }
  .deck-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem max(var(--gutter), env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    border-top: 1px solid var(--line);
  }
  .chapter-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.78rem;
    font-weight: 580;
  }
  .chapter-label {
    color: var(--ink-soft);
    padding-right: 1.25rem;
    border-right: 1px solid var(--line);
  }
  .slide-navigation {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  .nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.8rem;
    transition: background 160ms;
  }
  .nav-button:hover:not(:disabled),
  .icon-button:hover {
    background: var(--lavender);
  }
  .nav-button:disabled {
    opacity: 0.35;
    cursor: default;
  }
  .slide-count {
    min-width: 4rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
  }
  .slide-count b {
    color: var(--ink);
  }
  #deck-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    appearance: none;
    border: 0;
    background: transparent;
    color: #9e85bb;
  }
  #deck-progress::-webkit-progress-bar {
    background: transparent;
  }
  #deck-progress::-webkit-progress-value {
    background: linear-gradient(90deg, #a48cbd, #d5af9f, #95b6a0);
    transition: width 250ms;
  }
  #deck-progress::-moz-progress-bar {
    background: #a48cbd;
  }
  .slide.is-active .reveal {
    animation: reveal-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .slide.is-active .reveal-late {
    animation-delay: 80ms;
  }
  .slide.is-active .reveal-later {
    animation-delay: 150ms;
  }
  @keyframes reveal-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
