:root {
  --bg: #0e1517;
  --panel: #131c1e;
  --line: #2c3a3d;
  --text: #f5f3ee;
  --muted: #8fa0a3;
  --faint: #5f7175;
  --accent: #85b7eb;
  --accent-rgb: 133, 183, 235;
  --temp-progress: 0;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.site-frame {
  position: relative;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

.browser-bar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  align-items: center;
  min-height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid #1d2729;
  background: #1a2224;
}

.traffic,
.bar-corner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.traffic span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3a4649;
}

.address {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 720;
  letter-spacing: 0;
  text-align: center;
}

.bar-corner {
  justify-content: flex-end;
  opacity: 0.18;
}

.bar-corner span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5f7175;
}

.stage {
  position: relative;
  min-height: calc(100svh - 90px);
  overflow: hidden;
  background: var(--bg);
}

.air,
.grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.air {
  z-index: 0;
}

.grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 72%);
}

.filters {
  position: fixed;
  width: 0;
  height: 0;
}

.shell {
  position: relative;
  z-index: 2;
  min-height: calc(100svh - 90px);
  display: grid;
  grid-template-rows: 1fr auto;
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 82px) clamp(40px, 5.7vw, 72px) 0;
}

.hero {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: clamp(36px, 8vw, 112px);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 clamp(56px, 8vw, 86px);
}

.copy {
  max-width: 720px;
}

.launch,
.temp,
.dial-hint {
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(48px, 5.85vw, 80px);
  line-height: 1.05;
  font-weight: 560;
  letter-spacing: 0;
  text-wrap: balance;
  filter: url("#heat-haze");
}

.subline {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(21px, 2.15vw, 28px);
  line-height: 1.6;
}

.signup {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  width: min(640px, 100%);
  margin-top: 40px;
}

.signup input[type="email"] {
  width: 100%;
  min-height: 66px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #121c1e;
  color: var(--text);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 620;
}

.signup input[type="email"]::placeholder {
  color: var(--faint);
}

.signup input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.signup button {
  min-height: 66px;
  padding: 0 28px;
  border: 0;
  border-radius: 14px;
  background: var(--text);
  color: #091012;
  cursor: pointer;
  font-weight: 760;
  font-size: clamp(18px, 1.55vw, 22px);
  white-space: nowrap;
}

.signup button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.form-state {
  min-height: 24px;
  margin: 13px 0 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
}

.launch {
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.45vw, 20px);
  font-weight: 760;
  letter-spacing: 0;
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.thermostat-zone {
  display: grid;
  place-items: center;
  padding-bottom: clamp(58px, 7vw, 74px);
}

.dial-shell {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1;
}

.dial-shell::before {
  content: "";
  position: absolute;
  inset: -26%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.06), rgba(var(--accent-rgb), 0) 58%);
  opacity: calc(0.25 + var(--temp-progress) * 0.75);
}

.dial {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  outline: none;
}

.dial:active {
  cursor: grabbing;
}

.dial:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.28);
}

.dial-svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.outer {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1.4;
}

.tick {
  stroke: #314246;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.tick.active {
  stroke: var(--accent);
}

.hub {
  fill: #101719;
  stroke: #243234;
  stroke-width: 1.2;
}

.temp {
  fill: var(--accent);
  font-size: 64px;
  font-weight: 760;
}

.dial-hint {
  position: absolute;
  left: 50%;
  bottom: -58px;
  display: grid;
  place-items: center;
  width: min(440px, 112vw);
  min-height: 2.6em;
  margin: 0;
  color: #5F7175;
  text-align: center;
  font-size: clamp(13px, 1.55vw, 18px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.25;
  transform: translateX(-50%);
}

.dial-hint::before,
.hint-line {
  grid-area: 1 / 1;
}

.dial-hint::before {
  content: attr(data-reserve);
  visibility: hidden;
}

.dial-hint.is-payoff {
  color: var(--accent);
}

.hint-line {
  opacity: 0;
  transition: opacity 150ms ease;
}

.hint-line.is-active {
  opacity: 1;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0 calc(-1 * clamp(40px, 5.7vw, 72px));
  padding: 24px clamp(40px, 5.7vw, 72px) 28px;
  border-top: 1px solid #1d2729;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 560;
  text-align: center;
}

.foot-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.foot a,
.legal-wrap a {
  color: var(--accent);
  text-decoration: none;
}

.foot a:hover,
.legal-wrap a:hover {
  text-decoration: underline;
}

.legal-page {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.legal-wrap {
  width: min(840px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 76px) 0;
}

.legal-brand {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 760;
  text-transform: uppercase;
}

.legal-wrap h1 {
  max-width: 100%;
  filter: none;
  font-size: clamp(40px, 7vw, 68px);
}

.legal-wrap h2 {
  margin: 34px 0 10px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.legal-wrap p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.legal-date {
  margin-top: 16px;
  color: var(--faint);
}

@media (max-width: 760px) {
  .site-frame {
    min-height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .browser-bar {
    grid-template-columns: 74px 1fr 24px;
    min-height: 56px;
    padding: 0 14px;
  }

  .traffic {
    gap: 8px;
  }

  .traffic span {
    width: 9px;
    height: 9px;
  }

  .address {
    font-size: 14px;
  }

  .bar-corner {
    display: none;
  }

  .stage,
  .shell {
    min-height: calc(100svh - 56px);
  }

  .shell {
    padding: 36px 22px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    align-content: center;
    padding: 0 0 42px;
  }

  h1 {
    font-size: clamp(40px, 11vw, 46px);
  }

  .subline {
    font-size: 18px;
    line-height: 1.5;
  }

  .copy {
    max-width: none;
  }

  .signup {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 34px;
  }

  .signup input[type="email"],
  .signup button {
    min-height: 56px;
    font-size: 17px;
    border-radius: 0;
  }

  .dial-shell {
    width: min(260px, 82vw);
  }

  .dial-hint {
    bottom: -64px;
    width: min(320px, 92vw);
  }

  .foot {
    margin: 0 -22px;
    padding: 20px 22px 18px;
    align-items: center;
    gap: 10px 14px;
    font-size: 14px;
  }

  .foot-links {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  h1 {
    filter: none;
  }

  .air {
    display: none;
  }

  .hint-line {
    transition: none;
  }
}
