:root {
  color-scheme: dark;

  --bg: #18181a;
  --bg-deep: #101012;
  --surface: #222225;
  --line: #ffffff16;
  --cream: #f5f3ef;
  --coral: #e58b70;
  --coral-bright: #efa086;
  --action: #bd583f;
  --action-hover: #ad4e38;
  --gold: #e5c17e;
  --text: #b8b6b4;
  --text-dim: #a3a09d;
  --radius: 15px;
  --card-shadow: 0 2px 4px #00000026, 0 12px 28px #00000020;
  --display:
    -apple-system, blinkmacsystemfont, "SF Pro Display", system-ui,
    "Helvetica Neue", sans-serif;
  --body:
    -apple-system, blinkmacsystemfont, "SF Pro Text", system-ui,
    "Helvetica Neue", sans-serif;
  --brand: "Baloo 2", system-ui, sans-serif;
  --mono:
    "JetBrains Mono", ui-monospace, "SFMono-Regular", menlo, consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--cream);
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 5px;
}

svg {
  flex-shrink: 0;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(1200px, 100%);
  margin-inline: auto;
  padding-inline: 32px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  padding: 12px 20px;
  background: var(--surface);
  z-index: 10;
  border-radius: 999px;
}

.skip-link:focus {
  top: 12px;
}

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

/* Familiar Mac typography, with CaskHub's warm accent. */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.brand .cask {
  color: var(--cream);
}

.brand .hub {
  color: var(--coral);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 550;
}

.nav-links a {
  color: var(--text);
}

.nav-links a:hover {
  color: var(--coral);
}

.nav-links .gh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
}

.nav-links .nav-download {
  color: var(--bg-deep);
  background: var(--cream);
  padding: 8px 18px;
  border-radius: 999px;
}

.nav-links .nav-download:hover {
  background: var(--coral);
  color: var(--bg-deep);
}

.hero {
  text-align: center;
  padding-top: 66px;
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  box-shadow: 0 6px 16px #37261615;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 720;
  font-size: clamp(42px, 6.3vw, 78px);
  line-height: 1.04;
  color: var(--cream);
  margin: 26px auto 24px;
  max-width: 20ch;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--action);
}

.hero p.lede {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.65;
  letter-spacing: -0.018em;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero .cta-row {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 13px 25px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  min-height: 48px;
  transition:
    background 0.18s,
    transform 0.18s;
}

.btn-primary {
  color: #fff;
  background: var(--action);
  box-shadow: 0 4px 18px #00000012;
}

.btn-primary:hover {
  color: #fff;
  background: var(--action-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--cream);
  background: var(--surface);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--bg-deep);
}

#gh-stars {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 12px;
}

.hero .meta {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-dim);
}

.hero .meta span {
  margin-inline: 7px;
}

.terminal {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 38px auto 0;
  text-align: left;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 15px 26px;
  box-shadow: 0 24px 60px #00000045;
  font: 500 16px var(--mono);
}

.terminal .prompt {
  color: var(--coral);
  user-select: none;
}

.terminal code {
  min-width: 0;
  color: var(--cream);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--gold);
  background: none;
  border: 0;
  border-radius: 999px;
  transition:
    color 0.15s,
    transform 0.15s;
}

.copy-btn:hover {
  color: var(--cream);
  transform: scale(1.1);
}

.copy-btn .check {
  display: none;
  color: #8fcea8;
}

.copy-btn.copied .check {
  display: block;
}

.copy-btn.copied .dup {
  display: none;
}

.hero .badges {
  margin-top: 22px;
}

.hero .badges img {
  display: block;
  width: 250px;
  height: auto;
}

.demo-stage {
  position: relative;
  aspect-ratio: 2728 / 1772;
  margin: 60px 3.8% 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px #0000004d;
}

.app-shot {
  display: block;
  width: 100%;
  height: auto;
}

/* Frame the app window while retaining the original recording's pixels. */
video.app-shot {
  position: absolute;
  max-width: none;
  width: 108.2111%;
  left: -4.1056%;
  top: -4.2889%;
}

section:not(.hero) {
  padding-top: 116px;
}

.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

h2 {
  font-family: var(--display);
  font-weight: 670;
  font-size: clamp(30px, 3.6vw, 46px);
  color: var(--cream);
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 14px 0 18px;
  text-wrap: balance;
}

.section-head {
  max-width: 680px;
  margin-bottom: 42px;
}

.section-head > p:not(.kicker) {
  font-size: 16px;
  line-height: 1.7;
}

.section-head.center {
  text-align: center;
  margin-inline: auto;
}

/* Separate surfaces share the app's soft corners and restrained depth. */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card,
.step,
.faq-item {
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.card {
  padding: 27px 0 30px;
}

.bento .card {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px 14px;
  align-content: start;
  padding: 28px 26px;
}

.bento .card .icon {
  grid-row: 1;
  margin: 0;
  padding-top: 1px;
}

.bento .card p {
  grid-column: 1 / -1;
}

.card .icon {
  display: inline-flex;
  color: var(--coral);
  margin-bottom: 18px;
}

.card .icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.6;
}

.card h3,
.step h3 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 650;
  color: var(--cream);
  letter-spacing: -0.025em;
  margin-bottom: 9px;
}

.bento .card h3 {
  margin-bottom: 0;
}

.card p,
.step p {
  font-size: 14px;
  line-height: 1.75;
}

.card code,
.step code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  padding: 28px;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font: 500 12px var(--mono);
  color: var(--coral);
  margin-bottom: 38px;
}

.appearance-controls {
  display: flex;
  justify-content: center;
  margin: -14px 0 32px;
}

.segmented {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-deep);
}

.segmented::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc((100% - 8px) / 2);
  border-radius: 999px;
  background: #3a3837;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.segmented[data-mode="light"]::before {
  transform: translateX(0);
}

.segmented button {
  position: relative;
  padding: 7px 21px;
  min-height: 36px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 550;
  transition: color 0.25s;
}

.segmented button[aria-pressed="true"] {
  color: var(--cream);
}

.themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.theme-figure {
  min-width: 0;
}

.screenshot-button {
  display: grid;
  width: 100%;
  border-radius: 20px;
  border: 0;
  background: transparent;
}

.screenshot-button img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2952 / 1996;
  object-fit: contain;
  opacity: 0;
  transform: translateY(7px) scale(0.985);
  transition:
    opacity 0.36s ease,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.screenshot-button img.is-visible {
  opacity: 1;
  transform: none;
}

.theme-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 3.8% 0;
  align-items: flex-start;
}

.theme-figure h3 {
  font-size: 16px;
  font-weight: 650;
  color: var(--cream);
  letter-spacing: -0.02em;
}

.theme-figure p {
  font-size: 13px;
  margin-top: 3px;
}

.trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.trust .card {
  padding: 32px;
}

.faq {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin-inline: auto;
}

.faq-item {
  padding: 24px 28px;
}

.faq-item h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 7px;
  letter-spacing: -0.02em;
}

.faq-item p {
  font-size: 14px;
}

.final {
  text-align: center;
  padding-bottom: 80px;
}

.final h2 {
  margin-bottom: 30px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  color: var(--text-dim);
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 12px;
  font-weight: 500;
}

.foot-links a {
  color: var(--text);
}

.foot-links a:hover {
  color: var(--coral);
}

.foot-note {
  margin-top: 24px;
  font-size: 11px;
}

.screenshot-dialog {
  width: min(1440px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  color: var(--cream);
  overflow: auto;
}

.screenshot-dialog::backdrop {
  background: #181716c9;
  backdrop-filter: blur(8px);
}

.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  gap: 16px;
}

.dialog-bar h2 {
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.02em;
}

.dialog-close {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 36px;
  background: var(--surface);
  padding: 4px 14px;
  color: var(--cream);
  font-size: 12px;
}

.screenshot-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 112px);
  object-fit: contain;
}

@media (width <= 860px) {
  .wrap {
    padding-inline: 24px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-links a[href="#how"] {
    display: none;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento .card:last-child {
    grid-column: 1 / -1;
  }

  .steps {
    gap: 12px;
  }

  .step {
    padding: 22px;
  }

  .themes {
    gap: 16px;
  }

  .trust .card {
    padding: 26px;
  }
}

@media (width <= 600px) {
  .wrap {
    padding-inline: 20px;
  }

  nav {
    min-height: 78px;
  }

  .brand {
    font-size: 21px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .nav-links a:not(.nav-download) {
    display: none;
  }

  .hero {
    padding-top: 46px;
  }

  .hero h1 {
    margin-top: 24px;
    font-size: clamp(38px, 10.5vw, 60px);
  }

  .hero p.lede {
    font-size: 16px;
    line-height: 1.65;
  }

  .hero .meta {
    font-size: 11px;
    max-width: 290px;
    margin-inline: auto;
  }

  .hero .meta span {
    margin-inline: 4px;
  }

  .btn {
    padding-inline: 16px;
    font-size: 13px;
  }

  .terminal {
    padding: 12px 17px;
    gap: 10px;
    font-size: clamp(11px, 3.1vw, 14px);
  }

  .demo-stage {
    margin-top: 34px;
  }

  section:not(.hero) {
    padding-top: 74px;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .bento,
  .steps,
  .themes,
  .trust {
    grid-template-columns: 1fr;
  }

  .bento .card {
    padding: 24px;
  }

  .card .icon {
    margin-bottom: 12px;
  }

  .step::before {
    margin-bottom: 19px;
  }

  .themes {
    gap: 30px;
  }

  .theme-figure figcaption {
    padding-top: 12px;
  }

  .trust {
    gap: 16px;
  }

  .trust .card {
    padding: 24px;
  }

  .foot-links {
    gap: 19px;
  }

  .screenshot-dialog {
    width: calc(100vw - 16px);
    padding: 10px 4px;
    border-radius: 13px;
  }

  .final {
    padding-bottom: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
