:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #5c677d;
  --line: #d7dee8;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #c2410c;
  --shadow: 0 18px 45px rgba(20, 33, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: var(--brand);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a[aria-current="page"] {
  color: var(--brand-strong);
}

main {
  margin: 0 auto;
  max-width: 1160px;
  padding: 28px clamp(16px, 4vw, 36px) 56px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 22px;
}

.eyebrow,
.viewer-meta {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: 4rem;
}

.hero-copy {
  color: var(--muted);
  margin: 0;
  max-width: 520px;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin: 0 0 18px;
}

.toolbar label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.toolbar select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
}

.status {
  color: var(--muted);
  padding: 30px 0;
  text-align: center;
}

.status[hidden] {
  display: none;
}

.slides-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.slide-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(20, 33, 61, 0.08);
  cursor: pointer;
  display: grid;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.slide-card:focus-visible,
.icon-button:focus-visible,
.nav-button:focus-visible,
.cta-button:focus-visible,
.primary-action:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.32);
  outline-offset: 3px;
}

.cover {
  align-items: center;
  aspect-ratio: 3 / 4;
  background: #e8edf3;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.cover img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.card-body {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.card-body h2 {
  font-size: 1rem;
}

.card-meta {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0;
}

.viewer,
.lead-sheet {
  border: 0;
  border-radius: 0;
  height: 100dvh;
  margin: 0;
  max-height: none;
  max-width: none;
  padding: 0;
  width: 100vw;
}

.viewer::backdrop,
.lead-sheet::backdrop {
  background: rgba(20, 33, 61, 0.55);
}

.viewer-shell {
  background: var(--soft);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: 100%;
}

.viewer-header,
.lead-form header {
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 34px);
}

.viewer-header h2,
.lead-form h2 {
  font-size: 1.45rem;
}

.icon-button {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.2rem;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  line-height: 1;
  width: 40px;
}

.viewer-stage {
  align-items: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.slide-track {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  height: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.slide-track::-webkit-scrollbar {
  display: none;
}

.slide-frame {
  align-items: center;
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 14px;
  scroll-snap-align: start;
}

.slide-frame img {
  background: #e8edf3;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  height: 100%;
  max-height: calc(100dvh - 230px);
  max-width: min(100%, 560px);
  object-fit: contain;
  width: auto;
}

.nav-button {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 2.2rem;
  font-weight: 500;
  height: 56px;
  line-height: 1;
  margin: 10px;
  width: 44px;
  z-index: 2;
}

.slide-controls {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 12px;
  justify-content: center;
  padding: 8px 16px 12px;
}

.dots {
  display: flex;
  gap: 7px;
}

.dot {
  background: #b5c0ce;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 8px;
  padding: 0;
  width: 8px;
}

.dot[aria-current="true"] {
  background: var(--brand);
  width: 22px;
}

.cta-row {
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  padding: 12px clamp(16px, 4vw, 34px) max(12px, env(safe-area-inset-bottom));
}

.cta-button,
.primary-action {
  align-items: center;
  border: 1px solid var(--brand);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
}

.cta-button {
  background: var(--paper);
  color: var(--brand-strong);
}

.cta-button.primary,
.primary-action {
  background: var(--brand);
  color: white;
}

.lead-sheet {
  background: transparent;
}

.lead-form {
  background: var(--paper);
  border-radius: 14px 14px 0 0;
  bottom: 0;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  left: 0;
  margin: auto auto 0;
  max-width: 560px;
  padding: 0 0 max(18px, env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
}

.lead-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 6px;
  padding: 0 18px;
}

.lead-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 0 12px;
}

.lead-form .primary-action {
  margin: 0 18px;
}

.form-status {
  color: var(--muted);
  margin: 0;
  min-height: 20px;
  padding: 0 18px;
}

.form-status.error {
  color: #b42318;
}

.form-status.success {
  color: var(--brand-strong);
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  }
}

@media (max-width: 680px) {
  h1 {
    font-size: 2.5rem;
  }

  .viewer-header h2,
  .lead-form h2 {
    font-size: 1.15rem;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .slides-grid {
    grid-template-columns: 1fr;
  }

  .viewer-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-button {
    display: none;
  }

  .slide-frame {
    padding: 10px;
  }

  .slide-frame img {
    max-height: calc(100dvh - 220px);
    max-width: 100%;
  }
}
