@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist_semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist_bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains_mono_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains_mono_medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Color tokens from the Stitch Sage & Stone direction. */
  --bone: #fcf9f4;
  --porcelain: #ffffff;
  --ink: #1c1c19;
  --moss: #424842;
  --dust: #e2dfd8;
  --olive: #8daa91;
  --olive-pressed: #7a967e;

  --radius-card: 30px;
  --radius-panel: 28px;
  --radius-button: 24px;
  --radius-phone: 34px;
  --shadow: 0 18px 54px rgba(74, 101, 79, 0.12);
  --max: 1160px;
  --page-gutter: max(18px, calc((100vw - var(--max)) / 2));
}

/* Base */

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 82px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Header */

.site-header {
  align-items: center;
  background: rgba(246, 241, 232, 0.92);
  border-bottom: 1px solid rgba(215, 208, 195, 0.72);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  left: 0;
  padding: 14px var(--page-gutter);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 1.1rem;
  font-weight: 600;
  gap: 10px;
  letter-spacing: 0;
}

.header-nav {
  align-items: center;
  display: none;
  gap: 24px;
  color: var(--moss);
  font-size: 0.95rem;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--ink);
}

/* Shared Layout */

.section-band,
.flow-section,
.examples-section,
.cta-section {
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

#flow,
#examples,
#screens {
  scroll-margin-top: 82px;
}

.eyebrow {
  color: var(--olive);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

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

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

h1 {
  font-size: clamp(3rem, 13vw, 6.25rem);
  font-weight: 700;
  margin-bottom: 18px;
  max-width: 11ch;
}

h2 {
  font-size: clamp(2rem, 8vw, 4.25rem);
  font-weight: 700;
  margin-bottom: 16px;
  max-width: 11ch;
}

h3 {
  font-size: 1.22rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-lede,
.section-heading p:not(.eyebrow),
.cta-copy p {
  color: var(--moss);
  font-size: clamp(1.05rem, 4vw, 1.28rem);
  max-width: 36rem;
}

/* Store CTAs */

.store-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.store-button {
  align-items: center;
  background: var(--porcelain);
  border: 1px solid var(--dust);
  border-radius: var(--radius-button);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 10px 12px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.store-button.primary {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--porcelain);
}

.store-button:hover,
.store-button:focus-visible {
  transform: translateY(-1px);
}

.store-button.primary:hover,
.store-button.primary:focus-visible {
  background: var(--olive-pressed);
  border-color: var(--olive-pressed);
}

.store-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  opacity: 0.72;
  text-transform: uppercase;
}

.availability-note {
  color: var(--moss);
  font-size: 0.92rem;
  margin: 14px 0 0;
}

/* Hero */

.hero {
  display: grid;
  gap: 18px;
  min-height: calc(100svh - 112px);
  overflow: hidden;
  padding-bottom: 24px;
  padding-top: 32px;
}

.hero-copy {
  align-self: center;
}

.hero-device {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 330px;
  position: relative;
}

.phone-frame {
  background: #0f1110;
  border: 10px solid #242723;
  border-radius: var(--radius-phone);
  box-shadow: var(--shadow);
  justify-self: center;
  height: auto;
  max-width: 330px;
  overflow: hidden;
  width: min(48vw, 164px);
}

.phone-frame img {
  aspect-ratio: 413 / 873;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.main-phone {
  transform: rotate(0.8deg);
}

/* Flow */

.flow-section {
  padding-bottom: 72px;
  padding-top: 32px;
}

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

.flow-grid {
  display: grid;
  gap: 14px;
}

.flow-card {
  background: var(--porcelain);
  border: 1px solid var(--dust);
  border-radius: var(--radius-panel);
  padding: 22px;
}

.flow-card p {
  color: var(--moss);
  margin-bottom: 0;
}

.step-number {
  color: var(--olive);
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 34px;
}

/* Examples */

.examples-section {
  padding-bottom: 72px;
  padding-top: 4px;
}

.examples-grid {
  display: grid;
  gap: 12px;
}

.example-card {
  background: var(--porcelain);
  border: 1px solid var(--dust);
  border-radius: 20px;
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
}

.example-card h3 {
  font-size: 1.08rem;
  line-height: 1.1;
  margin-bottom: 0;
}

.example-card p {
  color: var(--moss);
  margin-bottom: 0;
}

/* Screenshots */

.screens-section {
  background: var(--porcelain);
  border-bottom: 1px solid var(--dust);
  border-top: 1px solid var(--dust);
  padding-bottom: 72px;
  padding-top: 72px;
}

.screen-showcase {
  display: grid;
  gap: 18px;
}

.screenshot-tile {
  margin: 0;
}

.screenshot-tile img {
  aspect-ratio: 413 / 873;
  background: var(--bone);
  border: 1px solid var(--dust);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 48px rgba(23, 26, 24, 0.1);
  height: auto;
  object-fit: cover;
  overflow: hidden;
  width: 100%;
}

.screenshot-tile figcaption {
  color: var(--moss);
  font-size: 0.95rem;
  margin-top: 12px;
}

.screenshot-tile figcaption span {
  color: var(--ink);
  display: block;
  font-weight: 600;
}

/* Final CTA and Footer */

.cta-section {
  align-items: start;
  display: grid;
  gap: 24px;
  padding-bottom: 70px;
  padding-top: 70px;
}

.cta-copy h2 {
  max-width: 12ch;
}

.stacked {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--dust);
  color: var(--moss);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px var(--page-gutter);
}

.site-footer span:first-child {
  color: var(--ink);
  font-weight: 600;
}

/* Responsive Layout */

@media (min-width: 620px) {
  .header-nav {
    display: flex;
  }

  .store-actions {
    grid-template-columns: repeat(2, minmax(0, 200px));
  }

  .flow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .examples-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .screen-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .screenshot-tile.large {
    grid-column: span 1;
  }

  .site-footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .site-footer span:nth-child(2) {
    margin-left: auto;
  }
}

@media (min-width: 700px) {
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(220px, 0.72fr);
    min-height: calc(100svh - 118px);
    padding-bottom: 34px;
    padding-top: 46px;
  }

  .screen-showcase {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-device {
    min-height: 460px;
  }

  .phone-frame {
    max-width: 210px;
    width: 210px;
  }

  .cta-section {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.72fr);
  }

  .hero-device {
    min-height: 590px;
  }

  .phone-frame {
    max-width: 280px;
    width: 280px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
