/* Living Room Athlete website. Plain CSS, no build step. */

/* Fonts: self-hosted, latin subset, from the @fontsource packages (SIL OFL 1.1, see fonts/). */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/barlow-semi-condensed-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/martian-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/martian-mono-latin-700-normal.woff2") format("woff2");
}

:root {
  --ink: #121211;
  --ink-2: #191917;
  --ink-3: #242422;
  --cobalt: #2448d8;
  --cobalt-link: #6a88ff;
  --paper: #f7f6f2;
  --grey: #e4e5e2;
  --stone: #b9b6ae;
  --muted-on-light: #5c5a55;

  --font-head: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", Arial, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --stroke: 2px;
  --gutter: 20px;
  --max: 1160px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--cobalt-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--paper);
}

:focus-visible {
  outline: var(--stroke) solid var(--cobalt-link);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0;
}

p {
  margin: 0 0 1em;
}

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

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--stone);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  border-bottom: var(--stroke) solid var(--ink-3);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  text-transform: uppercase;
  padding: 8px 0;
}
.brand:hover {
  color: var(--paper);
}
.brand img {
  width: 32px;
  height: 32px;
}
.site-header .label {
  display: none;
}

/* Hero */

.hero {
  padding: 48px 0 56px;
}
.hero-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(3rem, 13vw, 7rem);
  line-height: 0.9;
  max-width: 10ch;
}
.hero .tagline {
  margin: 20px 0 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.1;
  color: var(--paper);
}
.hero .support {
  margin: 16px 0 0;
  max-width: 34em;
  color: var(--stone);
  font-size: 1.125rem;
}

.store {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border: var(--stroke) solid var(--paper);
  color: var(--paper);
  max-width: 100%;
}
.store svg {
  flex: none;
  width: 28px;
  height: 28px;
}
.store-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.store-text .label {
  color: var(--stone);
}
.store-text strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Screens */

.screens {
  background: var(--cobalt);
  padding: 48px 0 56px;
}
.screens h2 {
  font-size: clamp(2rem, 7vw, 3.25rem);
  color: var(--paper);
}
.screens .intro {
  margin: 12px 0 0;
  color: var(--paper);
  max-width: 34em;
}
.phones {
  list-style: none;
  margin: 32px calc(var(--gutter) * -1) 0;
  padding: 4px var(--gutter) 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-color: var(--paper) transparent;
}
.phones:focus-visible {
  outline-color: var(--paper);
  outline-offset: -2px;
}
.phone {
  scroll-snap-align: start;
  margin: 0;
}
.phone-frame {
  background: var(--ink-2);
  border: var(--stroke) solid var(--ink);
  padding: 10px;
}
.phone-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  background: var(--ink);
}
.phone figcaption {
  margin-top: 12px;
  color: var(--paper);
}
.phone figcaption .label {
  color: var(--paper);
  display: block;
}
.phone figcaption span + span {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.4;
  margin-top: 4px;
}

/* Features */

.features {
  padding: 56px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: var(--stroke) solid var(--paper);
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(2rem, 7vw, 3.25rem);
}
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}
.feature-list li {
  padding: 24px 0;
  border-bottom: var(--stroke) solid var(--ink-3);
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px 12px;
}
.feature-list .num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--cobalt-link);
  padding-top: 4px;
}
.feature-list h3 {
  font-size: 1.5rem;
  line-height: 1.1;
}
.feature-list p {
  grid-column: 2;
  margin: 6px 0 0;
  color: var(--stone);
}

/* Pricing */

.pricing {
  background: var(--paper);
  color: var(--ink-2);
  padding: 56px 0;
}
.pricing .section-head {
  border-bottom-color: var(--ink-2);
}
.pricing .label {
  color: var(--muted-on-light);
}
.plans {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.plan {
  border: var(--stroke) solid var(--ink-2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper);
}
.plan.is-blue {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: var(--paper);
}
.plan.is-blue .label {
  color: var(--paper);
}
.plan h3 {
  font-size: 1.5rem;
}
.price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 4px 0 0;
}
.price small {
  font-size: 0.875rem;
  font-weight: 500;
}
.plan p:last-child {
  margin-bottom: 0;
}
.pricing-notes {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pricing-notes li {
  padding-left: 22px;
  position: relative;
}
.pricing-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 10px;
  background: var(--cobalt);
}
.pricing a {
  color: var(--cobalt);
}
.pricing a:hover {
  color: var(--ink-2);
}
.pricing :focus-visible {
  outline-color: var(--cobalt);
}

/* Legal pages */

.legal-head {
  padding: 40px 0 32px;
}
.legal-head h1 {
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  line-height: 0.95;
}
.legal-head .label {
  margin: 12px 0 0;
}
.legal {
  background: var(--paper);
  color: var(--ink-2);
  padding: 40px 0 64px;
}
.legal .prose {
  max-width: 44rem;
}
.legal h2 {
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 40px 0 12px;
  padding-top: 12px;
  border-top: var(--stroke) solid var(--ink-2);
}
.legal h2:first-child {
  margin-top: 0;
}
.legal h3 {
  font-size: 1.25rem;
  line-height: 1.15;
  margin: 24px 0 8px;
}
.legal ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}
.legal li {
  margin-bottom: 0.4em;
}
.legal a {
  color: var(--cobalt);
}
.legal a:hover {
  color: var(--ink-2);
}
.legal :focus-visible {
  outline-color: var(--cobalt);
}
.legal .summary {
  border: var(--stroke) solid var(--ink-2);
  padding: 20px;
  margin-bottom: 40px;
}
.legal .summary ul {
  margin-bottom: 0;
}
.legal .callout {
  background: var(--cobalt);
  color: var(--paper);
  padding: 20px;
  margin: 0 0 1em;
}
.legal .callout p:last-child {
  margin-bottom: 0;
}

/* 404 */

.notfound {
  padding: 72px 0 96px;
}
.notfound h1 {
  font-size: clamp(3rem, 14vw, 6rem);
  line-height: 0.9;
}
.notfound p {
  margin-top: 20px;
  color: var(--stone);
  max-width: 30em;
}
.button {
  display: inline-block;
  margin-top: 12px;
  padding: 14px 24px;
  min-height: 48px;
  background: var(--cobalt);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  text-transform: uppercase;
  text-decoration: none;
  border: var(--stroke) solid var(--cobalt);
}
.button:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--paper);
}

/* Footer */

.site-footer {
  border-top: var(--stroke) solid var(--ink-3);
  padding: 32px 0 40px;
  color: var(--stone);
  font-size: 0.9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer p {
  margin: 0;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.footer-links a {
  display: inline-block;
  padding: 10px 0;
  font-weight: 600;
}

/* Wider screens */

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
  .site-header .label {
    display: block;
  }
  .hero {
    padding: 72px 0 88px;
  }
  .phones {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    gap: 32px;
    overflow: visible;
  }
  .screens {
    padding: 72px 0 80px;
  }
  .feature-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }
  .features,
  .pricing {
    padding: 80px 0;
  }
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
  .plan {
    padding: 24px;
  }
  .site-footer .wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .legal-head {
    padding: 64px 0 48px;
  }
  .legal {
    padding: 56px 0 88px;
  }
}

@media (min-width: 1024px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 48px;
  }
  .hero-icon {
    width: 112px;
    height: 112px;
  }
  .phones {
    gap: 48px;
  }
}

/* Reveal animations.
   Only active when reveal-init.js has put the "reveal" class on <html>:
   without JavaScript or with reduced motion, everything is visible at once.
   Only opacity and transform change, so nothing moves in the layout. */

:root {
  --reveal-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --reveal-time: 700ms;
  --reveal-shift: 20px;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translate3d(0, var(--reveal-shift), 0);
  }
}
@keyframes reveal-fade {
  from {
    opacity: 0;
  }
}

/* Hero: plays on load, does not wait for reveal.js. */
.reveal .hero-main > *,
.reveal .hero-cta {
  animation: reveal-up 800ms var(--reveal-ease) backwards;
}
.reveal .hero-main > :nth-child(2) { animation-delay: 90ms; }
.reveal .hero-main > :nth-child(3) { animation-delay: 180ms; }
.reveal .hero-main > :nth-child(4) { animation-delay: 270ms; }
.reveal .hero-cta { animation-delay: 360ms; }

/* Scroll reveal, driven by reveal.js. */
.reveal [data-reveal]:not([data-reveal="group"]),
.reveal [data-reveal="group"] > * {
  opacity: 0;
  transform: translate3d(0, var(--reveal-shift), 0);
  transition:
    opacity var(--reveal-time) var(--reveal-ease),
    transform var(--reveal-time) var(--reveal-ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal [data-reveal].is-revealed:not([data-reveal="group"]),
.reveal [data-reveal="group"].is-revealed > * {
  opacity: 1;
  transform: none;
}
/* Items that come into view together start 100ms apart. */
.reveal [data-reveal-step="1"] { --reveal-delay: 100ms; }
.reveal [data-reveal-step="2"] { --reveal-delay: 200ms; }
.reveal [data-reveal-step="3"] { --reveal-delay: 300ms; }
.reveal [data-reveal-step="4"] { --reveal-delay: 400ms; }
.reveal [data-reveal-step="5"] { --reveal-delay: 500ms; }
.reveal [data-reveal="group"] > :nth-child(2) {
  transition-delay: calc(var(--reveal-delay, 0ms) + 100ms);
}
.reveal [data-reveal="group"] > :nth-child(3) {
  transition-delay: calc(var(--reveal-delay, 0ms) + 200ms);
}

/* Privacy, terms and 404: one quiet fade on load, no scroll reveal. */
.reveal .legal-head .wrap,
.reveal .notfound .wrap {
  animation: reveal-fade 600ms var(--reveal-ease) backwards;
}
.reveal .legal .prose {
  animation: reveal-fade 600ms var(--reveal-ease) 120ms backwards;
}

@media print {
  .reveal .hero-main > *,
  .reveal .hero-cta,
  .reveal .legal-head .wrap,
  .reveal .legal .prose,
  .reveal .notfound .wrap,
  .reveal [data-reveal]:not([data-reveal="group"]),
  .reveal [data-reveal="group"] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phones {
    scroll-behavior: auto;
  }
  .reveal .hero-main > *,
  .reveal .hero-cta,
  .reveal .legal-head .wrap,
  .reveal .legal .prose,
  .reveal .notfound .wrap,
  .reveal [data-reveal]:not([data-reveal="group"]),
  .reveal [data-reveal="group"] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
