:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --surface: #fbfaf7;
  --text: #1f201b;
  --muted: #5f6158;
  --line: rgba(31, 32, 27, 0.13);
  --line-strong: rgba(31, 32, 27, 0.22);
  --max-width: 1180px;
  --radius-large: 30px;
  --radius-medium: 18px;
  --shadow: 0 22px 60px rgba(41, 38, 29, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

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

.header-nav {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 620;
}

.header-nav a,
.footer-links a,
.text-link {
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.header-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid #5550b8;
  outline-offset: 4px;
  border-radius: 5px;
}

.hero {
  display: flex;
  min-height: 360px;
  align-items: center;
  padding-block: 72px 76px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.045em;
  line-height: 1.02;
}

h1 {
  max-width: 13ch;
  margin-bottom: 24px;
  font-size: clamp(2.55rem, 4.7vw, 3.85rem);
  font-weight: 650;
}

h2 {
  max-width: 14ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 620;
}

h3 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 4vw, 4rem);
  font-weight: 640;
}

.hero-lede {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.45vw, 1.22rem);
}

.apps {
  padding-block: 20px 96px;
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading h2 {
  max-width: none;
}

.app-list {
  display: grid;
  gap: 22px;
}

.app-card {
  --accent: #086c82;
  --accent-soft: #e8f4f5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "copy artwork";
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 70px rgba(41, 38, 29, 0.1);
}

.app-card-alwayson {
  --accent: #5550b8;
  --accent-soft: #eeedf9;
}

.app-card-fitcycles {
  --accent: #287653;
  --accent-soft: #edf6f0;
  min-height: 320px;
}

.app-card-fitcycles .app-artwork,
.app-card-speedlens .app-artwork,
.app-card-alwayson .app-artwork {
  background: transparent;
}

.app-card-speedlens {
  min-height: 320px;
}

.app-card-heartbaseline {
  --accent: #d92d3a;
  min-height: 320px;
}

.app-card-reverse {
  grid-template-areas: "artwork copy";
}

.app-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(30px, 4vw, 48px);
}

.app-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.79rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.app-status-soon {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  letter-spacing: 0.05em;
}

.app-description {
  max-width: 41ch;
  margin-bottom: 24px;
  color: #52544d;
  font-size: clamp(1.02rem, 1.25vw, 1.14rem);
}

.app-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px 16px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--accent);
}

.text-link {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
  white-space: nowrap;
}

.app-artwork {
  grid-area: artwork;
  display: flex;
  min-width: 0;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(18px, 2.5vw, 32px);
  background: var(--accent-soft);
}

.app-artwork img {
  width: 100%;
  max-height: 390px;
  object-fit: contain;
  border: 1px solid rgba(31, 32, 27, 0.1);
  border-radius: var(--radius-medium);
  box-shadow: 0 18px 44px rgba(31, 32, 27, 0.13);
}

.app-card-fitcycles .app-artwork img {
  width: auto;
  height: clamp(240px, 26vw, 330px);
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-card-speedlens .app-artwork img {
  width: auto;
  height: clamp(240px, 26vw, 330px);
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-card-heartbaseline .app-artwork {
  position: relative;
  isolation: isolate;
  background: transparent;
  padding-inline: clamp(22px, 3vw, 42px);
}

.app-card-heartbaseline .app-artwork img {
  width: auto;
  height: clamp(240px, 25vw, 320px);
  max-height: none;
  margin-inline: clamp(-16px, -1.2vw, -8px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 14px 18px rgba(25, 20, 20, 0.18));
  transform-origin: 50% 62%;
}

.app-card-heartbaseline .app-artwork img:nth-child(1) {
  z-index: 1;
  transform: translateY(8px) rotate(-8deg);
}

.app-card-heartbaseline .app-artwork img:nth-child(2) {
  z-index: 3;
  transform: translateY(-8px) rotate(-1deg);
}

.app-card-heartbaseline .app-artwork img:nth-child(3) {
  z-index: 2;
  transform: translateY(10px) rotate(10deg);
}

.app-card-alwayson .app-artwork img {
  width: 98%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.site-footer {
  padding-block: 30px 42px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

@media (max-width: 820px) {
  .shell {
    width: min(calc(100% - 40px), var(--max-width));
  }

  .hero {
    min-height: 330px;
    padding-block: 58px 64px;
  }

  .apps {
    padding-bottom: 72px;
  }

  .app-card,
  .app-card-reverse {
    grid-template-columns: 1fr;
    grid-template-areas:
      "artwork"
      "copy";
    min-height: 0;
  }

  .app-artwork {
    min-height: 280px;
  }

  .app-card-speedlens .app-artwork {
    min-height: 200px;
  }

  .app-card-fitcycles .app-artwork {
    min-height: 200px;
  }

  .app-card-heartbaseline .app-artwork {
    min-height: 200px;
  }

  .app-artwork img {
    max-height: 320px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .header-nav {
    min-height: 58px;
    gap: 22px;
  }

  .hero {
    min-height: 0;
    padding-block: 54px 58px;
  }

  h1 {
    font-size: clamp(2.35rem, 11vw, 2.9rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  h3 {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .apps {
    padding-top: 10px;
    padding-bottom: 56px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .app-list {
    gap: 16px;
  }

  .app-card {
    border-radius: 24px;
  }

  .app-artwork {
    min-height: 220px;
    padding: 16px;
  }

  .app-card-speedlens .app-artwork {
    min-height: 170px;
  }

  .app-card-fitcycles .app-artwork {
    min-height: 170px;
  }

  .app-card-heartbaseline .app-artwork {
    min-height: 170px;
    padding-inline: 20px;
  }

  .app-card-fitcycles .app-artwork img {
    height: 180px;
  }

  .app-card-speedlens .app-artwork img {
    height: 180px;
  }

  .app-card-heartbaseline .app-artwork img {
    width: auto;
    height: 190px;
    margin-inline: -8px;
  }

  .app-card-heartbaseline .app-artwork img:nth-child(1) {
    transform: translateY(5px) rotate(-6deg);
  }

  .app-card-heartbaseline .app-artwork img:nth-child(2) {
    transform: translateY(-5px) rotate(-1deg);
  }

  .app-card-heartbaseline .app-artwork img:nth-child(3) {
    transform: translateY(6px) rotate(7deg);
  }

  .app-artwork img {
    max-height: 260px;
    border-radius: 14px;
  }

  .app-copy {
    padding: 26px 22px 30px;
  }

  .app-status {
    margin-bottom: 18px;
  }

  .app-description {
    margin-bottom: 22px;
  }

  .app-actions {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    align-items: center;
    gap: 12px 18px;
    width: 100%;
  }

  .app-actions .button {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
  }

  .site-footer {
    padding-block: 24px 34px;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .app-card,
  .button,
  .header-nav a,
  .footer-links a,
  .text-link {
    transition: none;
  }

  .app-card:hover,
  .button:hover {
    transform: none;
  }
}
