/* Sunna's web page. It borrows the app icon's scene: a night sky, and the
   sun rising behind the app's window. Everything else stays quiet, so the
   screenshots carry the color. */

:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --panel: #14151a;
  --text: #f2f2f4;
  --text-2: #a4a6ae;
  --text-3: #6f727b;
  --line: rgba(255, 255, 255, 0.08);
  --sky: #1b1c42;
  --sun: #ffb467;
  --sun-deep: #ff8448;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sun); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font: 0.86em var(--mono);
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 5px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
kbd {
  font: 0.9em var(--font);
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 {
  font-size: clamp(40px, 6.4vw, 70px);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 800;
}
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 750; }
h3 { font-size: 20px; line-height: 1.3; }

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 12, 16, 0.72);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  backdrop-filter: saturate(1.4) blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(28px, calc(50% - 532px));
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.nav nav { display: flex; gap: 28px; }
.nav nav a { color: var(--text-2); font-size: 15px; }
.nav nav a:hover { color: var(--text); text-decoration: none; }

main { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* The hero: night sky above the window, the sun coming up behind it. */

.hero {
  position: relative;
  isolation: isolate;
  padding-top: 76px;
  text-align: center;
}
.lede { max-width: 620px; margin: 22px auto 0; font-size: 19px; color: var(--text-2); }
.actions { display: flex; justify-content: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.2s, transform 0.2s var(--ease-out);
}
.button:hover { text-decoration: none; background: rgba(255, 255, 255, 0.12); }
.button:active { transform: scale(0.97); }
.button.primary {
  color: #231304;
  background: linear-gradient(180deg, #ffd08f, var(--sun-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 24px -8px rgba(255, 132, 72, 0.6);
}
.button.primary:hover { filter: brightness(1.05); }
.fine { margin: 18px 0 0; font-size: 14px; color: var(--text-3); }

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

/* The window in these screenshots starts 5.5% down the image (above it is
   its shadow), so that's where the horizon goes. */
.stage { position: relative; max-width: 1060px; margin: 150px auto 0; --horizon: 5.5%; }
.stage::before,
.stage::after {
  content: "";
  position: absolute;
  left: 50%;
  z-index: -1;
  pointer-events: none;
}
/* The sky above the horizon and the water below it, with the horizon
   line and the sun's light on both. */
.stage::before {
  top: calc(var(--horizon) - 640px);
  width: 100vw;
  height: 1060px;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent 6%, rgba(255, 200, 150, 0.5) 50%, transparent 94%) 0 640px / 100% 1px no-repeat,
    radial-gradient(760px 300px at 50% 640px, rgba(255, 140, 80, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(27, 28, 66, 0) 0, var(--sky) 640px, #121329 640px, rgba(11, 12, 16, 0) 100%);
  animation: dawn 2.4s var(--ease-out) both;
}
/* The sun, half behind the window. */
.stage::after {
  top: var(--horizon);
  width: 250px;
  height: 250px;
  border-radius: 50%;
  translate: -50% -50%;
  background: linear-gradient(180deg, #fff6dc 0%, #ffd07a 26%, #ff8c4e 50%);
  box-shadow: 0 0 70px 16px rgba(255, 150, 80, 0.32), 0 0 220px 90px rgba(255, 120, 70, 0.14);
  animation: rise 2.4s var(--ease-out) both;
}
@keyframes rise {
  from { transform: translateY(70%); opacity: 0.3; }
}
@keyframes dawn {
  from { opacity: 0; }
}

/* Feature rows */

.row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0;
}
.row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.row.flip .row-text { order: 2; }
.row-text h2 { margin-bottom: 18px; }
.row-text p { margin: 0 0 14px; color: var(--text-2); font-size: 18px; }
.row-text em { font-style: normal; color: var(--text); }
.hero + .row { padding-top: 112px; }

/* The fast lane chart, on a 0–40 ms scale. */
.lanes {
  margin: 0;
  padding: 32px 32px 26px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  --scale: 40;
}
.lane {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.lane .name { font-weight: 600; font-size: 15px; }
.lane .value { font: 600 15px var(--mono); text-align: right; color: var(--text-2); }
.lane.fast .value { color: var(--sun); }
.track { position: relative; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); }
.bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--to) / var(--scale) * 100%);
  min-width: 6px;
  border-radius: 6px;
  /* Solid up to the fastest measurement, lighter to the slowest. */
  background: linear-gradient(90deg, #8b8e98 calc(var(--from) / var(--to) * 100%), #50535c 0);
  transform-origin: left;
}
.lane.fast .bar { background: linear-gradient(90deg, #ffd07a, var(--sun-deep)); }
.axis {
  display: flex;
  justify-content: space-between;
  margin: 4px 100px 0 108px;
  font: 12px var(--mono);
  color: var(--text-3);
}
.axis span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.axis span:last-child { justify-content: flex-end; }
.lanes figcaption { margin-top: 22px; font-size: 14px; line-height: 1.5; color: var(--text-3); }

@supports (animation-timeline: view()) {
  .bar {
    animation: grow linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 45%;
  }
  @keyframes grow { from { transform: scaleX(0); } }
}

/* Details: a spec sheet. */

.details { padding: 88px 0 72px; }
.details h2 { margin-bottom: 26px; }
.details dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; }
.details dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.details dt { font-weight: 600; font-size: 15px; }
.details dd { margin: 0; color: var(--text-2); font-size: 15.5px; }

/* Install */

.install { padding: 72px 0; }
.install > h2 { text-align: center; }
.install > .lede { margin-bottom: 44px; text-align: center; }
.step {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.step-text { position: relative; padding-left: 52px; }
.num {
  position: absolute;
  left: 0;
  top: -3px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 15px;
  color: #231304;
  background: linear-gradient(180deg, #ffd08f, var(--sun-deep));
}
.num.or { color: var(--text-2); background: rgba(255, 255, 255, 0.08); font-weight: 600; font-size: 13px; }
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-2); font-size: 16px; }
.step .note { margin-top: 12px; font-size: 14.5px; color: var(--text-3); }
.step .note code { white-space: nowrap; }
.step-code { display: flex; align-items: center; gap: 20px; }
.step-code pre { flex: 1; min-width: 0; }
.app-icon { flex: none; width: 96px; height: 96px; }
pre {
  margin: 0;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: #07080a;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow-x: auto;
}
pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.65; color: #e6e6ea; overflow-wrap: normal; }
pre.output code { color: var(--text-2); }

/* Questions */

.questions { max-width: 760px; margin: 0 auto; padding: 72px 0 96px; }
.questions h2 { text-align: center; margin-bottom: 30px; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 19px 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}
details[open] summary::after { transform: translateY(2px) rotate(225deg); }
details p { margin: -4px 4px 20px; color: var(--text-2); }

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 36px 28px 48px;
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.footer span { color: var(--text-2); font-weight: 600; margin: 0 12px 0 -8px; }
.footer a { color: var(--text-3); }

@media (max-width: 900px) {
  .row, .row.flip, .step { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .row.flip .row-text { order: 0; }
  .row { padding: 48px 0; }
  .details dl { grid-template-columns: minmax(0, 1fr); }
  .stage { margin-top: 110px; }
  .stage::after { width: 170px; height: 170px; }
  .nav nav a:not(:last-child) { display: none; }
}
@media (max-width: 520px) {
  main { padding: 0 18px; }
  .hero { padding-top: 48px; }
  .lanes { padding: 24px 20px 20px; }
  .lane { grid-template-columns: 70px minmax(0, 1fr) 72px; gap: 10px; }
  .axis { margin: 4px 82px 0 80px; }
  .details dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .step-text { padding-left: 0; }
  .num { position: static; margin-bottom: 12px; }
  .app-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
