/* Little Steps site. Colours, type and radii are the app's tokens (src/renderer/theme/tokens.css in
   the app repo), copied in tokens.css next to this file. Scaled up for reading on the web. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Fraunces-Latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/Nunito-Latin.woff2') format('woff2');
}

:root {
  --page-max: 1120px;
  --text-max: 38rem;
  --gutter: clamp(20px, 5vw, 48px);
  --section-space: clamp(72px, 11vw, 136px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--color-warm-cream);
  color: var(--color-charcoal);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  font-weight: var(--weight-regular);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-charcoal);
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2rem, 4.4vw, 2.75rem);
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.375rem;
}
p {
  margin: 0;
  text-wrap: pretty;
}
p + p {
  margin-top: 0.9em;
}

a {
  color: var(--color-forest-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
  background: var(--color-soft-ivory);
  box-shadow: inset 0 0 0 1px var(--color-hairline);
  color: var(--color-charcoal);
  padding: 0.1em 0.35em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
pre {
  margin: 0.75rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--color-soft-ivory);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-control);
  overflow-x: auto;
}
pre code {
  padding: 0;
  background: none;
  box-shadow: none;
  overflow-wrap: normal;
}

/* Visible focus everywhere: Forest Green, 2 px, offset 2 px (the app's focus ring). */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-forest-green);
  outline-offset: var(--focus-ring-offset);
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--color-forest-green);
  color: var(--color-soft-ivory);
  border-radius: var(--radius-control);
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-4);
}

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------ header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 1.25rem;
  color: var(--color-charcoal);
  text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.site-nav ul {
  display: flex;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  color: var(--color-charcoal);
  font-weight: var(--weight-medium);
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:hover {
  background: var(--color-pale-sage);
}
@media (max-width: 559px) {
  .site-nav {
    display: none;
  }
}

/* ------------------------------------------------------------ buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: var(--radius-control);
  border: var(--border-control-width) solid transparent;
  font: inherit;
  font-weight: var(--weight-heavy);
  font-size: 1.0625rem;
  text-decoration: none;
  cursor: pointer;
}
.button--primary {
  background: var(--color-forest-green);
  border-color: var(--color-forest-green);
  color: var(--color-soft-ivory);
}
.button--primary:hover {
  background: var(--color-charcoal);
  border-color: var(--color-charcoal);
}
.button--soon,
.button--soon:disabled {
  background: var(--color-pale-sage);
  border-color: var(--color-border-disabled);
  border-style: dashed;
  color: var(--color-charcoal);
  cursor: not-allowed;
}

.small-button {
  appearance: none;
  min-height: 36px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: var(--border-control-width) solid var(--color-border-control);
  background: var(--color-soft-ivory);
  color: var(--color-charcoal);
  font: inherit;
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  cursor: pointer;
}
.small-button:hover {
  background: var(--color-pale-sage);
}

/* ------------------------------------------------------------ hero */
.hero {
  padding-top: clamp(32px, 7vw, 88px);
  text-align: center;
}
.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-4);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}
.hero h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.125rem);
}
.tagline {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: clamp(2.75rem, 8vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--color-charcoal);
}
.hero .lede {
  max-width: 34rem;
  margin: var(--space-5) auto 0;
  font-size: clamp(1.125rem, 2.2vw, 1.25rem);
  color: var(--color-charcoal);
}
.cta {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.cta-note {
  font-size: 0.9375rem;
  color: var(--color-text-brown);
  font-weight: var(--weight-medium);
}

.cta-fine {
  font-size: 0.875rem;
  color: var(--color-text-brown);
}
.cta-fine a {
  color: inherit;
}

/* A short note from the maker, under the Download area: left-aligned on phones, centred from 768 px. */
.maker-note {
  max-width: 30rem;
  margin: var(--space-6) auto 0;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-card);
  background: var(--color-soft-ivory);
  border: 1px solid var(--color-hairline);
  text-align: left;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-brown);
}
.maker-note img {
  display: inline-block;
  vertical-align: -0.2em;
  margin-right: 0.35em;
}
.maker-note p + p {
  margin-top: var(--space-1);
}
/* The quiet contact line: same type as the note, two small pills in the site's greens. */
.maker-contact {
  font-size: 0.875rem;
}
.pill {
  display: inline-block;
  margin-left: 0.2em;
  padding: 0 0.65em;
  border: 1px solid var(--color-hairline);
  border-radius: 999px;
  background: var(--color-warm-cream);
  color: var(--color-forest-green);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  text-decoration: none;
}
.pill:hover {
  border-color: var(--color-forest-green);
}
.pill:focus-visible {
  border-radius: 999px;
}
@media (min-width: 768px) {
  /* Wider here so the note stays two lines of text plus the contact line, and the hero does not grow. */
  .maker-note {
    max-width: 44rem;
    text-align: center;
  }
}

/* The film: 4:5 on phones, 16:9 from 768 px. The poster is a <picture> under the video, so each
   shape gets its own frame; the video is shown once it plays. */
.film {
  position: relative;
  margin: clamp(40px, 7vw, 72px) auto 0;
  max-width: 520px;
}
.film-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-hairline);
  background: var(--color-soft-ivory);
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) {
  .film {
    max-width: 1040px;
  }
  .film-frame {
    aspect-ratio: 16 / 9;
  }
}
.film-frame picture,
.film-frame img,
.film-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.film-frame video {
  opacity: 0;
}
.film--started .film-frame video {
  opacity: 1;
}
.film-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-3);
  font-size: 0.875rem;
  color: var(--color-text-brown);
  text-align: left;
}
.film-controls {
  display: none;
  gap: var(--space-2);
}
.film--ready .film-controls {
  display: flex;
}
.film--sound .film-controls {
  display: none;
}
/* "Watch with sound": hidden without JavaScript (the poster alone is shown), shown once the script is ready. */
.film-actions {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.film--ready .film-actions {
  display: flex;
}
.film-sound-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.film-sound-controls[hidden],
.film-actions [hidden] {
  display: none;
}
.film-actions .small-button {
  min-height: 44px;
  padding-inline: 1.1rem;
}
/* The film sits above the silent loop while it plays. */
.film-frame #film-video {
  opacity: 0;
}
.film--sound .film-frame #film-video {
  opacity: 1;
}

/* ------------------------------------------------------------ sections */
.section {
  padding-block: var(--section-space);
}
.section--sage {
  background: var(--color-pale-sage);
}
.section-head {
  max-width: var(--text-max);
  margin-bottom: clamp(36px, 6vw, 64px);
}
.section-head p {
  margin-top: var(--space-4);
  font-size: 1.1875rem;
}
.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: var(--weight-heavy);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-forest-green);
}

/* Screenshot frames: Soft Ivory card, hairline edge, the card radius. */
.shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-hairline);
  background: var(--color-soft-ivory);
  box-shadow: var(--shadow-card);
}
.shot img {
  width: 100%;
}

/* How it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(56px, 8vw, 96px);
}
.step {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  border: var(--border-control-width) solid var(--color-forest-green);
  color: var(--color-forest-green);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 1.125rem;
}
.step h3 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}
.step p {
  margin-top: var(--space-3);
  max-width: 26rem;
}
@media (min-width: 768px) {
  .step {
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 80px);
  }
  .step .shot {
    justify-self: center;
  }
  .step:nth-child(even) .step-text {
    order: 2;
  }
}
.shot--plan {
  max-width: 460px;
}
.shot--tick {
  max-width: 560px;
}

/* Meet the companion */
.loops {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-6);
}
/* Six clips: 2 columns from 640 px (three rows), 3 columns from 960 px (two rows). */
@media (min-width: 640px) {
  .loops {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}
@media (min-width: 960px) {
  .loops {
    grid-template-columns: repeat(3, 1fr);
  }
}
.loop {
  margin: 0;
}
.loop-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-hairline);
  background: var(--color-soft-ivory);
}
.loop-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.loop .small-button {
  display: none;
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
}
.loop--ready .small-button {
  display: inline-block;
}
.loop figcaption {
  margin-top: var(--space-4);
}
.loop figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
}
.loop figcaption span {
  display: block;
  margin-top: var(--space-1);
}
/* Phones: the clip beside its caption, the button under the caption, off the character. */
@media (max-width: 639px) {
  .loop {
    position: relative;
    display: grid;
    grid-template-columns: minmax(132px, 42%) 1fr;
    gap: var(--space-4);
    align-items: center;
  }
  .loop-frame {
    position: static;
  }
  .loop figcaption {
    margin-top: 0;
  }
  .loop--ready figcaption {
    padding-bottom: 48px;
  }
  .loop .small-button {
    left: calc(max(132px, 42%) + var(--space-4));
    right: auto;
    bottom: 0;
  }
}
.fine {
  margin-top: var(--space-6);
  font-size: 0.9375rem;
  color: var(--color-text-brown);
}

/* Rewards */
.rewards {
  display: grid;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 768px) {
  .rewards {
    grid-template-columns: 1fr 1fr;
  }
}
.rewards .shot {
  max-width: 400px;
  justify-self: center;
}
.reward-list {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}
.reward-list h3 {
  font-size: 1.375rem;
}
.reward-list p {
  margin-top: var(--space-2);
}

/* Install */
.install {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
}
@media (min-width: 960px) {
  .install {
    grid-template-columns: 7fr 5fr;
    align-items: start;
  }
}
.note {
  padding: var(--space-5);
  border-radius: var(--radius-card);
  background: var(--color-soft-ivory);
  border: 1px solid var(--color-hairline);
  border-left: 6px solid var(--color-muted-mustard);
}
.note h3 {
  font-size: 1.25rem;
}
.note p {
  margin-top: var(--space-2);
}
.install-steps {
  counter-reset: install;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-6);
}
.install-steps > li {
  counter-increment: install;
  position: relative;
  padding-left: 56px;
}
.install-steps > li::before {
  content: counter(install);
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-forest-green);
  color: var(--color-soft-ivory);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
}
.install-steps h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-2);
}
.install-steps ol,
.install-steps ul,
.plain-list {
  margin: var(--space-2) 0 0;
  padding-left: 1.25rem;
}
.install-steps li li,
.plain-list li {
  margin-top: var(--space-2);
}
.install-steps ol + p,
.install-steps p + .button {
  margin-top: var(--space-3);
}
.install-steps .button {
  margin-top: var(--space-3);
}
.side {
  display: grid;
  gap: var(--space-5);
}
.card {
  padding: var(--space-5);
  border-radius: var(--radius-card);
  background: var(--color-soft-ivory);
  border: 1px solid var(--color-hairline);
}
.card h3 {
  font-size: 1.25rem;
}
.card p,
.card ol,
.card ul {
  margin-top: var(--space-2);
}
.card ol {
  padding-left: 1.25rem;
}
.card li + li {
  margin-top: var(--space-2);
}
details {
  margin-top: var(--space-4);
}
summary {
  cursor: pointer;
  font-weight: var(--weight-bold);
  color: var(--color-forest-green);
}
details[open] summary {
  margin-bottom: var(--space-2);
}

/* FAQ */
.faq {
  max-width: 46rem;
  margin: 0;
}
.faq dt {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 1.375rem;
  line-height: 1.2;
}
.faq dd {
  margin: var(--space-2) 0 0;
}
.faq dd + dt {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-hairline);
}

/* ------------------------------------------------------------ footer */
.site-footer {
  padding-block: var(--space-6) clamp(48px, 8vw, 80px);
  border-top: 1px solid var(--color-hairline);
  font-size: 0.9375rem;
  color: var(--color-text-brown);
}
.site-footer .wrap {
  display: grid;
  gap: var(--space-3);
}
.site-footer p {
  max-width: 46rem;
}
.site-footer .made {
  color: var(--color-charcoal);
  font-weight: var(--weight-bold);
}

/* ------------------------------------------------------------ 404 */
.lost {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--section-space);
}
.lost img {
  margin: 0 auto var(--space-5);
}
.lost p {
  margin: var(--space-4) auto var(--space-6);
  max-width: 28rem;
}
