/* Lamplit's landing page. The night palette and the lamp glow come from the brand kit (brand.md). */

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Arial sized to Outfit's metrics, so headings keep their size and lines while the font loads. */
@font-face {
  font-family: "Outfit Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 99%;
  ascent-override: 101%;
  descent-override: 26%;
  line-gap-override: 0%;
}

:root {
  --night: #07060b;
  --plum: #22103a;
  --indigo: #2c1b4c;
  --violet: #ab84de;
  --lilac: #e6bce7;
  --honey: #fdd56e;
  --amber: #fca545;
  --ember: #f2823e;
  --rosewood: #883548;
  --cream: #fdf5e5;
  --ink-on-amber: #1c1006;

  --text: var(--cream);
  --text-body: rgb(253 245 229 / .8);
  --text-muted: rgb(253 245 229 / .64);
  --line: rgb(171 132 222 / .16);
  --card: linear-gradient(180deg, rgb(44 27 76 / .34), rgb(34 16 58 / .12));

  --font-display: "Outfit", "Outfit Fallback", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --gutter: 16px;
  --content: 1160px;
  --section: clamp(80px, 10vw, 136px);
  --radius: 16px;

  --z-below: -1;
  --z-header: 2;
  --z-skip: 10;

  color-scheme: dark;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text-body);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }
strong { color: var(--text); font-weight: 600; }
p { margin: 0; text-wrap: pretty; }

::selection { background: rgb(252 165 69 / .35); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--font-mono);
  font-size: .9em;
  padding: .1em .4em;
  border-radius: 6px;
  background: rgb(253 245 229 / .08);
  color: var(--text);
}

h1, h2, h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.75rem); line-height: 1.04; }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.08; }
h3 { font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.25rem); line-height: 1.12; }

h4 {
  margin: 0 0 8px;
  color: var(--text);
  font: 600 1.0625rem/1.35 var(--font-body);
  text-wrap: balance;
}

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.center { text-align: center; }

.lead {
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-body);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--amber);
  font-size: .9375rem;
  font-weight: 600;
}

.text-link {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: rgb(252 165 69 / .45);
  text-underline-offset: 3px;
}

.text-link:hover { color: var(--honey); text-decoration-color: currentColor; }

/* Skip link */

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: var(--z-skip);
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { top: 16px; }

/* Header */

.top { position: relative; z-index: var(--z-header); }

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand { display: block; border-radius: 8px; }
.brand img { width: auto; height: 32px; }

.nav {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-body);
  font-size: .9375rem;
  text-decoration: none;
  transition: color .15s ease-out, background-color .15s ease-out;
}

.nav a:hover { color: var(--text); background: rgb(253 245 229 / .06); }

@media (max-width: 559px) {
  .nav-wide { display: none; }
  .nav a { padding: 0 9px; }
  .brand img { height: 28px; }
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 14px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  transition: background-color .15s ease-out, border-color .15s ease-out, transform .15s ease-out;
}

.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }

.btn-primary {
  background: var(--amber);
  color: var(--ink-on-amber);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 12px 32px -12px rgb(252 165 69 / .6);
}

.btn-primary:hover { background: var(--honey); }

.btn-secondary {
  border-color: rgb(253 245 229 / .22);
  background: rgb(253 245 229 / .03);
  color: var(--text);
}

.btn-secondary:hover { border-color: rgb(253 245 229 / .38); background: rgb(253 245 229 / .08); }

@media (max-width: 479px) {
  .actions .btn { flex: 1 1 100%; }
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding-top: clamp(24px, 4.5vw, 64px);
}

/* The TV's violet light at the top of the room */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  z-index: var(--z-below);
  height: 110%;
  background: radial-gradient(45% 55% at 50% 30%, rgb(44 27 76 / .6), rgb(34 16 58 / .25) 55%, transparent 80%);
  pointer-events: none;
}

.hero-copy {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 16px 36px rgb(242 130 62 / .28));
}

.hero .lead { max-width: 640px; margin-inline: auto; }

.meta {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: .875rem;
}

.meta span { margin-inline: 6px; }

/* Screenshots */

.shot { position: relative; margin: 0; }

.shot img {
  width: 100%;
  border-radius: 14px;
  background: #120e1c;
  box-shadow: 0 0 0 1px rgb(253 245 229 / .08), 0 28px 64px -28px rgb(0 0 0 / .9);
}

/* The screensaver's seven scenes take turns, 6 s each, crossfading and drifting slowly closer as the screensaver
   does. Each slide fades in over the one before it, which then fades out underneath; --at starts each one's turn
   1.5 s (its fade) before its 6 s, so the first is already in at load. With reduced motion only the first shows. */
.saver-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #120e1c;
  box-shadow: 0 0 0 1px rgb(253 245 229 / .08), 0 28px 64px -28px rgb(0 0 0 / .9);
}

.saver-slide { position: absolute; inset: 0; }
.saver-slide + .saver-slide { opacity: 0; }

.saver-slide img {
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.saver-slide:nth-child(1) { --at: -1.5s; }
.saver-slide:nth-child(2) { --at: 4.5s; }
.saver-slide:nth-child(3) { --at: 10.5s; }
.saver-slide:nth-child(4) { --at: 16.5s; }
.saver-slide:nth-child(5) { --at: 22.5s; }
.saver-slide:nth-child(6) { --at: 28.5s; }
.saver-slide:nth-child(7) { --at: 34.5s; }

@media (prefers-reduced-motion: no-preference) {
  .saver-slide { opacity: 0; animation: saver-turn 42s linear var(--at) infinite; }
  .saver-slide img { animation: saver-drift 42s linear var(--at) infinite; }
}

/* Of 42 s: the 1.5 s fade is 3.57%, fade and 6 s turn 17.86%. */
@keyframes saver-turn {
  0%, 21.43%, 100% { opacity: 0; }
  3.57%, 17.86% { opacity: 1; }
}

@keyframes saver-drift {
  0% { transform: scale(1); }
  21.43% { transform: scale(1.05); }
  21.44%, 100% { transform: scale(1); }
}

/* The hero screenshot sits in a thin TV bezel, lit from below by the lamp glow. */
.shot-hero {
  max-width: var(--content);
  margin: clamp(40px, 5.5vw, 72px) auto 0;
  padding: clamp(5px, .8vw, 10px);
  border-radius: clamp(14px, 1.8vw, 22px);
  background: linear-gradient(180deg, #17121f, #0b0910);
  box-shadow: 0 0 0 1px rgb(171 132 222 / .18), 0 50px 120px -40px rgb(0 0 0 / .95);
}

.shot-hero img {
  border-radius: clamp(10px, 1.1vw, 13px);
  box-shadow: none;
}

.shot-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -38%;
  z-index: var(--z-below);
  width: 120%;
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(252 165 69 / .3), rgb(242 130 62 / .15) 42%, rgb(136 53 72 / .07) 68%, transparent);
  pointer-events: none;
}

/* Sections */

main { padding-bottom: var(--section); }

.section { position: relative; padding-top: var(--section); }

.intro { text-align: center; }

.feature { padding-top: clamp(72px, 8vw, 112px); }
.intro + .feature { padding-top: clamp(40px, 5vw, 64px); }

.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head .lead { margin-top: 16px; }

.feature-head { max-width: 760px; margin-bottom: 32px; }

/* Cards */

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

@media (min-width: 600px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 600px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card p { font-size: 1rem; }

.support .card h3 {
  margin-bottom: 16px;
  font-size: 1.375rem;
}

/* Feature rows: copy beside a screenshot */

.split {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: 64px; }
  .split.reverse { grid-template-columns: 7fr 5fr; }
  .split.reverse .split-copy { order: 2; }
}

.split-copy > p:not(.eyebrow) { margin-top: 18px; }

.ticks, .dots {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li, .dots li { position: relative; padding-left: 26px; }

.ticks li::before, .dots li::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgb(252 165 69 / .55);
}

/* Store logos: the row under the hero screenshot, and beside each name in the Stores card */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.stores-band {
  margin-top: clamp(36px, 4.5vw, 56px);
  text-align: center;
}

.stores-band p {
  color: var(--text-muted);
  font-size: .875rem;
  letter-spacing: .04em;
}

.store-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(24px, 4.5vw, 52px);
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.store-logos svg {
  display: block;
  width: clamp(26px, 3vw, 34px);
  height: clamp(26px, 3vw, 34px);
  fill: var(--cream);
  opacity: .62;
}

.store-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  list-style: none;
}

.store-list li { display: flex; gap: 12px; align-items: flex-start; }

.store-list svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: .15em;
  fill: var(--lilac);
  color: var(--lilac);
}

.dots { gap: 8px; margin: 0; font-size: 1rem; }
.dots li { padding-left: 22px; }
.dots li::before { top: .6em; width: 6px; height: 6px; background: var(--violet); box-shadow: none; }

/* Install steps */

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 960px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  border: 1px solid rgb(252 165 69 / .45);
  border-radius: 12px;
  background: rgb(252 165 69 / .08);
  color: var(--amber);
  font: 500 1.125rem/1 var(--font-display);
}

.step h3 { margin-bottom: 12px; font-size: 1.25rem; line-height: 1.25; }
.step p + p { margin-top: 12px; }
.step p { font-size: 1rem; }

.small { color: var(--text-muted); font-size: .9375rem; }

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgb(253 245 229 / .26);
  border-radius: 8px;
  background: rgb(253 245 229 / .06);
  color: var(--text);
  font-size: .9375rem;
  font-weight: 600;
}

.chip-arrow { color: var(--text-muted); }

.after-steps { max-width: 760px; margin-top: 28px; }

/* FAQ */

.faq-layout { display: grid; gap: 32px; }

@media (min-width: 960px) {
  .faq-layout { grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 16px 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s ease-out;
}

.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq summary:hover::after { border-color: var(--text); }
.faq details p { max-width: 680px; padding-bottom: 22px; }

/* Closing call to download */

.closing { overflow-x: clip; }

.closing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: var(--z-below);
  width: min(900px, 140%);
  aspect-ratio: 1.6 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(242 130 62 / .16), rgb(136 53 72 / .06) 55%, transparent);
  pointer-events: none;
}

.closing-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 18px 44px rgb(242 130 62 / .3));
}

.closing .lead { max-width: 560px; margin-inline: auto; }

/* Sponsor */

.sponsor-card {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(120% 160% at 0% 0%, rgb(44 27 76 / .55), rgb(34 16 58 / .18) 60%, transparent);
}

@media (min-width: 880px) {
  .sponsor-card { grid-template-columns: 1fr auto; gap: 48px; }
}

.sponsor-card h2 { font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.25rem); }
.sponsor-card p { max-width: 620px; margin-top: 12px; }

.sponsor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.sponsor-actions svg { color: var(--lilac); }

/* Footer */

.footer {
  padding-block: 48px 56px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: .875rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 20px;
}

.footer-top img { width: auto; height: 30px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-body);
  text-decoration: none;
}

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

.footer p { max-width: 820px; }
.footer p + p { margin-top: 12px; }

.footer p a {
  color: var(--text-body);
  text-decoration: underline;
  text-decoration-color: rgb(253 245 229 / .3);
  text-underline-offset: 3px;
}

.footer p a:hover { color: var(--text); }

/* 404 */

.lost {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 76px);
  padding-block: 48px 96px;
  text-align: center;
}

.lost .lead { max-width: 520px; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
