:root {
  --navy: #0b1f3a;
  --blue: #1e5eff;
  --text: #1c2636;
  --muted: #5b6678;
  --line: #d9dfe9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f7f9fc;
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

a { color: var(--blue); }

.hero {
  padding: 56px 16px;
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.hero h1 { margin: 12px 0 0; font-size: 40px; }
.hero p { max-width: 560px; margin: 8px auto; }
.tagline { font-size: 20px; font-weight: 600; }

main { max-width: 680px; margin: 0 auto; padding: 32px 16px; }
h1 { line-height: 1.2; }
h2 { margin-top: 32px; font-size: 20px; }

footer {
  padding: 24px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.note {
  padding: 12px;
  border-radius: 8px;
  background: #e7f1fb;
}

form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.field { margin-bottom: 16px; }
label { display: block; margin-bottom: 4px; font-weight: 600; }

input, select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

button {
  padding: 10px 24px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.error { margin-top: 4px; color: #c62828; font-size: 14px; }

form h2 { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1.6fr 1.3fr 1fr auto; gap: 12px; align-items: start; }
.form-row .field { margin-bottom: 0; }
.form-row #save { margin-top: 30px; padding: 9px 20px; }

.saved-table { width: 100%; border: 1px solid var(--line); border-radius: 8px; border-collapse: separate; border-spacing: 0; background: #fff; }
.saved-table th, .saved-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.saved-table th { color: var(--muted); font-size: 14px; }
.saved-table tbody tr:last-child td { border-bottom: 0; }

.practice-head { margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.practice-head a:not(.button) { font-size: 14px; }
.practice-head h1 { margin: 4px 0 2px; font-size: 26px; }
.practice-head p { margin: 0; color: var(--muted); }
.practice-steps { margin-top: 16px; padding: 10px 0; }
.practice-steps summary { font-size: 15px; }
.practice-steps ol { margin: 8px 0 0; padding-left: 22px; }

/* Landing page */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

.landing main { padding: 0; max-width: none; }
.landing h1 { margin: 0 0 16px; font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.02em; }
.landing h2 { margin: 0 0 16px; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.01em; }
.landing img { max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--navy);
}

.topbar nav { display: flex; align-items: center; gap: 22px; }
.topbar a { white-space: nowrap; }
.topbar nav a:not(.button) { color: #d6deee; text-decoration: none; font-size: 15px; }
.topbar nav a:not(.button):hover { color: #fff; }

.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 19px; font-weight: 700; text-decoration: none; }

.button {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover { filter: brightness(1.1); }
.button.small { padding: 8px 16px; font-size: 15px; }
.button.ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.button.light { background: #fff; color: var(--navy); }
.button.coffee { background: #ffb020; color: var(--navy); }

.landing .hero {
  padding: 72px 0;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  text-align: left;
}

.hero-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: center; max-width: 1360px; }
.hero-grid > * { min-width: 0; }
.eyebrow { margin: 0 0 12px; color: #b9cdf7; font-size: 15px; font-weight: 600; }
.hero .lead { margin: 0 0 28px; font-size: 19px; color: #e4ebf8; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.shot { display: block; border-radius: 12px; box-shadow: 0 16px 48px rgba(11, 31, 58, .3); }

.demo-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.demo-stage img { grid-area: 1 / 1; opacity: 0; transition: opacity .35s; }
.demo-stage img.on { opacity: 1; }

.demo-spot {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 8px;
  outline: 3px solid #ffb020;
  outline-offset: 2px;
  background: transparent;
  cursor: pointer;
  animation: demo-glow 1.6s ease-in-out infinite;
}
.demo-spot[hidden] { display: none; }
.demo-spot::after { content: ''; position: absolute; inset: -10px; } /* An easier target at small sizes. */
.demo-spot:focus-visible { outline-color: #fff; }
.demo-spot.press { background: rgba(255, 176, 32, .45); }

.demo-cursor {
  position: absolute;
  z-index: 1;
  filter: drop-shadow(0 2px 3px rgba(11, 31, 58, .5));
  pointer-events: none;
  transform-origin: 4px 2px;
  transition: left .9s ease-in-out, top .9s ease-in-out, transform .12s;
}
.demo-cursor[hidden] { display: none; }
.demo-cursor.press { transform: scale(.8); }

@keyframes demo-glow {
  50% { box-shadow: 0 0 0 7px rgba(255, 176, 32, .35); }
}

.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.demo-bar[hidden] { display: none; }
.demo-tabs { display: flex; flex: 1; flex-wrap: wrap; justify-content: center; gap: 4px; }
.demo-bar button {
  min-height: 36px;
  padding: 4px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e4ebf8;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.demo-bar button:hover { background: rgba(255, 255, 255, .14); }
.demo-bar button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.demo-bar button[aria-current] { background: #fff; color: var(--navy); }
.demo-bar .demo-arrow { width: 36px; padding: 0 0 4px; font-size: 28px; line-height: 1; }
.demo-bar .demo-play { min-width: 68px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.demo-hint { flex-basis: 100%; margin: 0; color: #e4ebf8; font-size: 14px; text-align: center; }

.band { padding: 72px 0; }
.band.alt { background: #fff; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.steps b, .cards b { display: block; margin-bottom: 4px; font-size: 17px; }
.steps span, .cards span, .muted { color: var(--muted); }

.how-grid { display: grid; gap: 36px; }
.how-grid > * { min-width: 0; }
.how-grid h2 { text-align: center; }
.how-grid .steps { gap: 16px; margin-top: 8px; }
.how-grid .steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-content: start;
  align-items: center;
  column-gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11, 31, 58, .05);
}
.how-grid .steps li::before { width: 30px; height: 30px; margin: 0; font-size: 15px; }
.how-grid .steps b { margin: 0; font-size: 16px; }
.how-grid .steps span { grid-column: 1 / -1; margin-top: 10px; font-size: 15px; line-height: 1.5; }
.how-grid .demo { width: 100%; max-width: 920px; margin: 0 auto; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, var(--navy), var(--blue)); box-shadow: 0 16px 40px rgba(11, 31, 58, .22); }

.guide-video { position: relative; }
.guide-video video { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--navy); box-shadow: 0 16px 40px rgba(11, 31, 58, .22); }
.video-play {
  position: absolute;
  left: 50%;
  bottom: 2.5%;
  padding: 11px 22px;
  border-radius: 999px;
  background: #ffb020;
  color: var(--navy);
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(11, 31, 58, .35);
  transform: translateX(-50%);
}
.video-play[hidden] { display: none; }
.video-play:hover { filter: brightness(1.06); }
.video-play:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.about-grid p { margin: 0 0 12px; }
.coffee-card { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 10px 28px rgba(11, 31, 58, .08); }
.coffee-card h3 { margin: 0 0 8px; font-size: 22px; }
.coffee-card p { margin: 0 0 18px; color: var(--muted); }

.try-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 40px;
  padding: 32px 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: 0 16px 40px rgba(11, 31, 58, .22);
  color: #fff;
}
.try-card h3 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; }
.try-card p { margin: 0; color: #e4ebf8; }
.try-card .button { flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips li { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 14px; font-weight: 600; }

.feature { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; margin-bottom: 64px; }
.feature.flip > div { order: 2; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.cards li { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.muted { margin: 24px 0 0; }

details { padding: 14px 0; border-bottom: 1px solid var(--line); }
summary { font-size: 17px; font-weight: 600; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); }

.cta { padding: 72px 0; background: var(--navy); color: #fff; text-align: center; }
.cta p { max-width: 560px; margin: 0 auto 24px; color: #d6deee; }

.landing footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  .demo-stage img, .demo-cursor { transition: none; }
  .demo-spot { animation: none; }
}

@media (max-width: 1040px) {
  .topbar nav a:not(.button) { display: none; }
}

@media (max-width: 860px) {
  .hero-grid, .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip > div { order: 0; }
  .steps, .cards { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .try-card { flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px; }
  .landing .hero, .band, .cta { padding: 48px 0; }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row #save { margin-top: 0; }
}

@media (max-width: 520px) {
  .coffee-text { display: none; }
  .video-play { bottom: 2%; padding: 5px 14px; font-size: 14px; }
  .topbar nav { gap: 8px; }
  .demo-tabs { flex-basis: 100%; order: -1; }
  .demo-bar .demo-play { margin: 0 auto; }
  .steps, .cards { grid-template-columns: 1fr; }
}

.cta .help { margin: 20px auto 0; }
.cta .help a { color: #fff; }
