/* Heatcycle's public site. Dark only for now, in the app's dark colors (the app's tokens.css,
   D-145 in the app's decisions). No script anywhere on the site. */
:root {
  color-scheme: dark;

  --color-bg: #16191c;
  --color-surface: #262a2f;
  --color-control: #30353b;
  --color-text: #f7f7f4;
  --color-muted: #a9adb2;
  --color-border: #757c85;
  --color-accent: #ff8a1f;
  --color-on-accent: #16191c;

  /* The four tires of the mark. */
  --tire-yellow: #f5b700;
  --tire-orange: #ff8a1f;
  --tire-red: #ff5a1f;
  --tire-blue: #3a86ff;

  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --width: 68rem;
  --gutter: 1rem;
  --radius: 0.75rem;
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
}

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

a {
  color: var(--color-accent);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 1;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--color-control);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand img {
  width: 11rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--color-accent);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  background: var(--color-control);
  color: var(--color-text);
}

.button.main {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.button:hover {
  filter: brightness(1.1);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Sections */

main {
  display: block;
}

.section {
  padding: 3.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--color-control);
}

.eyebrow {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.lead {
  font-size: 1.25rem;
  color: var(--color-muted);
  max-width: 38rem;
}

.muted {
  color: var(--color-muted);
}

/* The four tire colors as a short bar above a heading, always blue, yellow, orange, dark orange. */
.tires {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tires span {
  width: 1.5rem;
  height: 0.4rem;
  border-radius: 1rem;
}

.tires span:nth-child(1) {
  background: var(--tire-blue);
}
.tires span:nth-child(2) {
  background: var(--tire-yellow);
}
.tires span:nth-child(3) {
  background: var(--tire-orange);
}
.tires span:nth-child(4) {
  background: var(--tire-red);
}

/* Hero */

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* A phone's screen, from a screenshot of the app. */
.phone {
  margin: 0 auto;
  width: min(100%, 18rem);
  border: 0.5rem solid #30353b;
  border-radius: 2rem;
  overflow: hidden;
  background: var(--color-bg);
  aspect-ratio: 590 / 881;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.screens {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: 2.5rem;
}

/* Feature lists */

.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

/* Four go two by two, not three and one. */
@media (min-width: 40rem) {
  .features:has(> li:nth-child(4):last-child) {
    grid-template-columns: 1fr 1fr;
  }
}

.features li {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.features h3 {
  margin-bottom: 0.4rem;
}

.features p {
  margin: 0;
  color: var(--color-muted);
}

/* Steps */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 0.75rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1rem;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 800;
}

/* A box that stands out: status, notes */

.callout {
  background: var(--color-surface);
  border-left: 0.35rem solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Long text: policies, about */

.prose {
  max-width: 44rem;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.page-head {
  padding: 3rem 0 0;
}

.page-head + .section {
  padding-top: 1rem;
}

/* Marks text that is not final: drafts and placeholders, for JT to finish. */
.draft {
  background: var(--tire-yellow);
  color: var(--color-bg);
  font-weight: 700;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.placeholder {
  background: var(--color-control);
  border: 1px dashed var(--tire-yellow);
  border-radius: 0.35rem;
  padding: 0 0.35rem;
  color: var(--tire-yellow);
}

dl.details {
  display: grid;
  grid-template-columns: minmax(8rem, auto) 1fr;
  gap: 0.5rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.25rem;
}

dl.details dt {
  color: var(--color-muted);
}

dl.details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 30rem) {
  dl.details {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  dl.details dd {
    margin-bottom: 0.6rem;
  }
}

/* Contact list */

.contacts {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.contacts li {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.contacts a {
  font-weight: 700;
  word-break: break-word;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-control);
  padding: 2rem 0 3rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-bottom: 1rem;
}

.site-footer a {
  color: var(--color-text);
  padding: 0.35rem 0;
}

/* The coming-soon page, shown by the gate (worker/index.js) to anyone without the access code. */

.gate {
  max-width: 26rem;
  margin: 0 auto;
  padding: 4rem var(--gutter);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gate > img {
  width: 14rem;
  margin-bottom: 2.5rem;
}

.gate form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gate label {
  font-weight: 700;
}

.gate input {
  min-height: 3.5rem;
  padding: 0 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.gate input:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.gate button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.gate-wrong {
  margin: 0;
  color: var(--tire-yellow);
  font-weight: 700;
}
