@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Nunito:wght@750;850;900&display=swap");

:root {
  color-scheme: light;
  --navy: #111f37;
  --paper: #fffaf0;
  --ink: #253346;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body, h1, h2, p, figure { margin: 0; }
body { font-size: 17px; line-height: 1.6; }
a { color: inherit; text-underline-offset: .22em; }
img { max-width: 100%; display: block; height: auto; }
.wrap { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }

a:focus-visible, .option:has(input:focus-visible) {
  outline: 3px solid currentColor;
  outline-offset: 5px;
}

.skip-link { position: absolute; left: 12px; top: -80px; z-index: 5; padding: 12px 18px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.site-header { background: var(--navy); color: var(--paper); }
.header-inner, .site-footer, .site-footer nav { display: flex; align-items: center; }
.header-inner, .site-footer { justify-content: space-between; gap: 24px; }
.header-inner { min-height: 86px; }
.brand { display: block; width: 176px; }
.site-header nav, .site-footer { font-size: 14px; font-weight: 600; }
.site-header nav a, .site-footer nav a { text-decoration: none; padding-block: 10px; }
.site-header nav a:hover, .site-footer nav a:hover { text-decoration: underline; }

.sky {
  --sky: #bce7ed;
  --text: #183449;
  --body-text: #2f5060;
  --option: #d7f1f2;
  background: var(--sky);
  color: var(--text);
}

.sky:has(#cloudy:checked) {
  --sky: #acc6db;
  --text: #172e45;
  --body-text: #2b4259;
  --option: #cedde8;
}

.sky:has(#nighttime:checked) {
  --sky: #203450;
  --text: #fff6df;
  --body-text: #e1e9f1;
  --option: #2c4464;
}

.scene-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(225px, .85fr);
  align-items: center;
  gap: clamp(36px, 6vw, 100px);
  padding-block: clamp(40px, 5vw, 76px);
}

.intro { max-width: 585px; }
h1, h2, .option strong { font-family: "Nunito", ui-rounded, system-ui, sans-serif; }
h1 {
  font-size: clamp(80px, 8.9vw, 126px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 900;
}
.lead { margin-top: 24px; font-size: clamp(21px, 2.15vw, 30px); line-height: 1.4; letter-spacing: -.025em; }
.how-to { max-width: 49ch; margin-top: 18px; color: var(--body-text); }
.settings { border: 0; margin: 36px 0 0; padding: 0; min-width: 0; }
.settings legend { padding: 0; margin-bottom: 12px; font-weight: 700; font-size: 15px; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--option);
  cursor: pointer;
  line-height: 1.25;
}
.option input {
  appearance: none;
  width: 15px;
  height: 15px;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: inherit;
  margin: 0;
  cursor: pointer;
}
.option input:checked { background: currentColor; box-shadow: inset 0 0 0 3px var(--paper); }
.option:has(input:checked) { color: var(--navy); background: var(--paper); border-color: var(--navy); }
.option strong, .option small { display: block; }
.option strong { font-weight: 850; font-size: 15px; }
.option small { margin-top: 3px; font-size: 12px; }

.preview { justify-self: center; text-align: center; }
.phone {
  width: clamp(220px, 18.2vw, 265px);
  border-radius: 40px;
  padding: 7px;
  background: #24303c;
  box-shadow: inset 0 0 0 2px #53606a, 0 16px 34px #16294027;
  margin-inline: auto;
}
.screen { position: relative; overflow: hidden; border-radius: 33px; aspect-ratio: 941 / 2048; }
.scene { width: 100%; }
.advance { position: absolute; inset: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cloudy, .nighttime { display: none; }
.sky:has(#cloudy:checked) .sunshine, .sky:has(#nighttime:checked) .sunshine { display: none; }
.sky:has(#cloudy:checked) .cloudy, .sky:has(#nighttime:checked) .nighttime { display: block; }
figcaption { margin-top: 17px; font-size: 13px; color: var(--body-text); }

.story { border-bottom: 1px solid #dbd7cb; }
.story-inner { display: flex; align-items: center; gap: clamp(22px, 4vw, 50px); padding-block: clamp(40px, 5vw, 68px); }
.app-icon { width: clamp(76px, 9vw, 126px); flex: none; border-radius: 23%; }
.story h2 { font-size: clamp(28px, 3.3vw, 44px); font-weight: 850; line-height: 1.2; letter-spacing: -.04em; }
.story p { max-width: 51ch; margin-top: 9px; font-size: clamp(17px, 1.6vw, 21px); }
.site-footer { padding-block: 26px; flex-wrap: wrap; font-size: 13px; }
.site-footer nav { gap: 24px; }

@media (max-width: 950px) {
  .wrap { width: calc(100% - 52px); }
  .scene-layout { gap: 28px; }
  .option { flex-direction: column; align-items: flex-start; gap: 7px; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .brand { width: 148px; }
  .header-inner { min-height: 70px; }
  .scene-layout { grid-template-columns: 1fr; padding-block: 34px; gap: 30px; }
  .lead { margin-top: 16px; }
  .how-to { margin-top: 13px; font-size: 16px; }
  .settings { margin-top: 21px; }
  .option { padding: 10px; }
  .phone { width: 172px; border-radius: 29px; padding: 5px; }
  .screen { border-radius: 24px; }
  .story-inner { align-items: flex-start; }
  .site-footer { gap: 12px 24px; }
}

@media (max-width: 370px) {
  .wrap { width: calc(100% - 32px); }
  .options { gap: 4px; }
  .option { padding: 8px; }
  .option strong { font-size: 14px; }
  .story-inner { flex-direction: column; }
}
