/* Colors come from the app icon: the teal night of the background and the warm light behind the door. */
:root {
  --night: #0a2f3a;
  --dusk: #16697b;
  --light: #ffcf70;
  --frame: #e9f1f2;
  --paper: #f2f6f7;
  --ink: #12262c;
  --muted: #4a6168;
  --rule: #cfdcdf;
  --link: #135e6e;
  --code-bg: #e2ebed;
  --measure: 38rem;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 100%;
  line-height: 1.55;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #081f27;
    --ink: #e4edef;
    --muted: #9db3b9;
    --rule: #1f414b;
    --link: #ffcf70;
    --code-bg: #12343e;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #081f27;
  --ink: #e4edef;
  --muted: #9db3b9;
  --rule: #1f414b;
  --link: #ffcf70;
  --code-bg: #12343e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--light); outline-offset: 3px; border-radius: 4px; }

code, kbd, pre {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
.install code { overflow-wrap: normal; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--light);
  color: var(--night);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 1;
}
.skip:focus { top: 1rem; }

/* Hero: the one loud part of the page. */
.hero {
  background: radial-gradient(ellipse 70% 60% at 72% 70%, #17697a 0%, transparent 70%),
    linear-gradient(180deg, var(--dusk) 0%, var(--night) 75%);
  color: var(--frame);
  padding: 0 1rem 5rem;
  overflow: hidden;
}

.bar {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bar a { color: var(--frame); text-decoration: none; font-weight: 600; }
.bar a:hover { color: var(--light); }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 1.1rem; }

.hero-body {
  max-width: 72rem;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 4rem;
  align-items: center;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 0 0 2rem;
  color: var(--frame);
  max-width: 30rem;
}

.get-it { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.download {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border-radius: 10px;
  background: var(--light);
  color: var(--night);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 40px rgb(255 207 112 / 0.3);
}
.download:hover { background: #ffdb93; }
.download:focus-visible { outline: 3px solid var(--frame); outline-offset: 3px; }
.download-note { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--frame); }
.or { margin: 1.75rem 0 0.5rem; font-size: 0.9rem; color: var(--frame); }

.install {
  display: flex;
  align-items: stretch;
  max-width: 30rem;
  border-radius: 10px;
  background: rgb(4 22 28 / 0.55);
  border: 1px solid rgb(255 207 112 / 0.35);
}
.install pre { margin: 0; padding: 0.85rem 1rem; overflow-x: auto; flex: 1; }
.install code { background: none; padding: 0; color: var(--light); font-size: 0.95rem; }
.copy {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 5.5rem;
  border: 0;
  border-left: 1px solid rgb(255 207 112 / 0.35);
  border-radius: 0 9px 9px 0;
  background: transparent;
  color: var(--light);
  cursor: pointer;
}
.copy:hover { background: rgb(255 207 112 / 0.12); }

.fine { font-size: 0.9rem; color: var(--frame); margin: 0.9rem 0 0; }

/* The demo stands in the lit doorway, with its light spilling onto the floor. */
.doorway {
  position: relative;
  margin: 0;
  padding: 10px;
  background: var(--light);
  border-radius: 14px;
  box-shadow: 0 0 0 6px var(--frame), 0 0 90px 10px rgb(255 207 112 / 0.35);
}
.doorway::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: calc(100% + 6px);
  height: 5rem;
  background: linear-gradient(180deg, rgb(255 207 112 / 0.45), transparent);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.doorway img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* Content: quiet, one reading column. */
main { padding: 1rem 1rem 2rem; }
main section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 0 0;
}
main section + section { border-top: 1px solid var(--rule); margin-top: 3.5rem; }

h2 {
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
p { margin: 0 0 1rem; }

.features dl { margin: 0; display: grid; gap: 1.25rem; }
.features dt { font-weight: 650; }
.features dd { margin: 0.15rem 0 0; color: var(--muted); }

.keys table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; }
.keys th, .keys td { text-align: left; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.keys th { font-weight: 400; padding-right: 1.5rem; white-space: nowrap; }
kbd {
  display: inline-block;
  min-width: 1.7em;
  text-align: center;
  padding: 0.05em 0.4em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--code-bg);
}

.get h3 { font-size: 1.15rem; margin: 1.75rem 0 0.6rem; }
.get h3:first-of-type { margin-top: 0; }
.get ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.get li { margin-bottom: 0.5rem; }

footer {
  width: min(var(--measure), 100% - 2rem);
  margin: 4rem auto 0;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 52rem) {
  .hero-body { grid-template-columns: minmax(0, 1fr); gap: 3rem; margin-top: 1.5rem; }
  .hero { padding-bottom: 4.5rem; }
  .keys th { white-space: normal; }
}

@media (max-width: 26rem) {
  .install code { font-size: 0.8rem; }
}
