:root {
  --bg: #f6f7fb;
  --text: #16181d;
  --muted: #5d6270;
  --faint: #8b90a0;
  --card: #ffffff;
  --card-border: rgba(20, 24, 40, 0.07);
  --panel: rgba(246, 246, 248, 0.86);
  --panel-border: rgba(0, 0, 0, 0.1);
  --row: rgba(0, 0, 0, 0.045);
  --accent: #0a84ff;
  --shadow: 0 30px 60px -20px rgba(22, 30, 70, 0.35), 0 8px 20px -8px rgba(22, 30, 70, 0.2);
  --hero-sky: linear-gradient(180deg, #dbe9ff 0%, #f2e6f5 55%, var(--bg) 100%);
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f17;
    --text: #eef0f6;
    --muted: #a3a8b8;
    --faint: #6f7486;
    --card: #161925;
    --card-border: rgba(255, 255, 255, 0.07);
    --panel: rgba(40, 42, 50, 0.86);
    --panel-border: rgba(255, 255, 255, 0.12);
    --row: rgba(255, 255, 255, 0.06);
    --shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8), 0 8px 20px -8px rgba(0, 0, 0, 0.6);
    --hero-sky: linear-gradient(180deg, #161a3a 0%, #2a1f3f 55%, var(--bg) 100%);
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

/* Land the download button mid-screen, with the coffee card visible below. */
#download { scroll-margin-top: 35vh; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}

.sky {
  position: absolute;
  inset: 0;
  background: var(--hero-sky);
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-inner > * { min-width: 0; }

.app-icon {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 10px 18px rgba(30, 40, 90, 0.25));
}

h1 {
  font-family: var(--rounded);
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 22px 0 18px;
  text-wrap: balance;
}

h1 span {
  background: linear-gradient(90deg, #f0855f 0%, #f5a65b 22%, #4f9cf0 55%, #6a5bd0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; margin-top: 36px; margin-bottom: 28px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button.primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.45);
}

.button.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.5); }

.button.ghost {
  color: var(--text);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--card-border);
}

.button.ghost:hover { background: var(--card); }

.fineprint {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--faint);
}

/* ---------- Demo panel ---------- */

.demo-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  max-width: 420px;
  justify-self: end;
}

.menubar {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-radius: 10px 10px 0 0;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 13px;
  font-weight: 500;
}

.menubar-right { display: flex; align-items: center; gap: 10px; }

.globe-pill {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text) 14%, transparent);
}

.globe-pill svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.panel {
  width: 360px;
  max-width: 100%;
  margin-top: 6px;
  margin-right: 8px;
  padding: 14px 12px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 0.5px solid var(--panel-border);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: var(--shadow);
  user-select: none;
  -webkit-user-select: none;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 12px;
}

.panel-header > div { flex: 1; min-width: 0; }

.panel-title {
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 15px;
}

.panel-sub {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.panel-sub.pinned { color: var(--accent); }

.now-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 600 11px -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  cursor: pointer;
}

.now-button svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--row);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.rows { display: flex; flex-direction: column; gap: 8px; }

.row {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--row);
}

.row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.city { font-weight: 600; font-size: 14px; }
.meta { font-size: 11px; color: var(--muted); }

.time {
  font-family: var(--rounded);
  font-size: 26px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-align: right;
}

.time small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}

.day {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}

.badge {
  font: 700 9.5px var(--rounded);
  padding: 1.5px 5px;
  border-radius: 999px;
}

.badge.ahead { color: #e8820c; background: rgba(255, 149, 0, 0.16); }
.badge.behind { color: #a64fd6; background: rgba(175, 82, 222, 0.16); }

.slider {
  position: relative;
  height: 24px;
  cursor: pointer;
  touch-action: none;
}

.track {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.35);
}

.now-mark {
  position: absolute;
  top: 5px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.thumb {
  position: absolute;
  top: 2px;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.slider.dragging .thumb { transform: scale(1.15); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }

.thumb svg { width: 11px; height: 11px; }

.try-it {
  align-self: center;
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--faint);
}

/* ---------- Sections ---------- */

section.wrap { padding-top: 88px; padding-bottom: 88px; }
.install { padding-top: 24px !important; }

h2 {
  font-family: var(--rounded);
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 40px;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid article {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 26px;
}

.f-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font: 700 18px var(--rounded);
  color: #fff;
  background: linear-gradient(135deg, #4f9cf0, #6a5bd0);
  margin-bottom: 16px;
}

.f-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.f-icon svg .fill { fill: currentColor; }

.grid article:nth-child(2) .f-icon { background: linear-gradient(135deg, #f5a65b, #f0855f); }
.grid article:nth-child(3) .f-icon { background: linear-gradient(135deg, #45c4a0, #2f9be0); }
.grid article:nth-child(4) .f-icon { background: linear-gradient(135deg, #f7b733, #f58a3d); }
.grid article:nth-child(5) .f-icon { background: linear-gradient(135deg, #a77bf3, #e46aa5); }
.grid article:nth-child(6) .f-icon { background: linear-gradient(135deg, #3a3f5c, #1b1f3b); }

.grid h3 { font-size: 17px; margin: 0 0 6px; }
.grid p { margin: 0; color: var(--muted); font-size: 15px; }

.install { max-width: 880px; }

.section-lede {
  text-align: center;
  color: var(--muted);
  max-width: 36em;
  margin: -20px auto 40px;
  font-size: 17px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px 24px;
}

.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font: 700 15px var(--rounded);
}

.steps h3 { margin: 4px 0 4px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); }

.footer {
  padding-top: 24px;
  padding-bottom: 48px;
  text-align: center;
  font-size: 14px;
  color: var(--faint);
}

/* ---------- Support ---------- */

.coffee-link { color: var(--muted); font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; }
.coffee-link:hover { color: var(--text); }

section.wrap.support { padding-top: 0; padding-bottom: 40px; margin-top: -60px; }

.support-card {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 832px;
  margin: 0 auto;
  padding: 28px 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 196, 120, 0.22), rgba(240, 133, 95, 0.16));
  border: 1px solid rgba(240, 133, 95, 0.25);
}

.support-cup {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #f5a65b, #f0855f);
}

.support-cup svg, .button.coffee svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-copy { flex: 1; }
.support-copy h2 { text-align: left; font-size: 22px; margin: 0 0 4px; }
.support-copy p { margin: 0; color: var(--muted); }

.button.coffee {
  flex: none;
  background: #f0855f;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(240, 133, 95, 0.7);
}

.button.coffee svg { width: 20px; height: 20px; }
.button.coffee:hover { transform: translateY(-1px); background: #ec774e; }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .demo-area { justify-self: center; align-items: center; }
  .panel { margin-right: 0; }
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  section.wrap { padding-top: 64px; padding-bottom: 64px; }
  .grid { grid-template-columns: 1fr; }
  .lede { font-size: 17px; }
  .menubar-left { display: none; }
  .menubar { justify-content: flex-end; }
  .support-card { flex-direction: column; text-align: center; padding: 28px 22px; }
  .support-copy h2 { text-align: center; }
}
