:root {
  --primary: #2F5D4B;
  --primary-dark: #23473A;
  --ground: #F4F1EA;
  --card: #FFFFFF;
  --text: #1F2421;
  --text-muted: #58615B;
  --border: rgba(31, 36, 33, 0.12);
  --accent: #8A5A2B;
  --sun: #E0B27A;
  --radius: 16px;
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #171B16;
    --card: #1F241E;
    --text: #EDEAE0;
    --text-muted: #B7BEB4;
    --border: rgba(237, 234, 224, 0.14);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--ground);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

h2 {
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.4em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--primary);
}

.Wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.SkipLink {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}

.SkipLink:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible,
.Btn:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.Header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.Header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.Brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.Brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.Nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.Nav a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.Nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.Nav a:hover::after {
  transform: scaleX(1);
}

.Header-cta {
  white-space: nowrap;
}

.Btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

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

.Btn-primary:hover {
  background: var(--primary-dark);
}

.Btn-secondary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.Hero {
  padding: 56px 0 72px;
  position: relative;
}

.Hero-inner {
  display: flex;
  flex-direction: column-reverse;
  gap: 40px;
}

.Hero-subhead {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.Definition {
  font-size: 1.05rem;
}

.Hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.HeroVisual {
  display: flex;
  justify-content: center;
  position: relative;
}

.HeroVisual::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--sun);
  opacity: 0.16;
  filter: blur(10px);
  z-index: 0;
}

.PhoneFrame {
  width: min(300px, 78vw);
  border-radius: 32px;
  border: 8px solid var(--card);
  box-shadow: 0 20px 40px rgba(31, 36, 33, 0.16);
  overflow: hidden;
  background: var(--card);
  position: relative;
  z-index: 1;
}

.PhoneFrame img {
  display: block;
  width: 100%;
  height: auto;
}

.PhoneFrame-small {
  width: min(280px, 70vw);
}

.Section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.Steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 28px;
}

.Step {
  text-align: center;
}

.Step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}

.Step p {
  color: var(--text-muted);
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.FeatureRows {
  display: grid;
  gap: 44px;
}

.FeatureRow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.FeatureRow-text {
  order: 1;
}

.FeatureRow-visual {
  order: 2;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.FeatureCompact {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 44px;
}

.FeatureCard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.Glance {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.Glance dt {
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 16px;
}

.Glance dt:first-child {
  margin-top: 0;
}

.Glance dd {
  margin: 4px 0 0;
}

.FaqList {
  display: grid;
  gap: 14px;
}

.FaqItem {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
}

.FaqItem summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.FaqItem summary::-webkit-details-marker {
  display: none;
}

.FaqItem summary h3 {
  display: inline;
  font-size: 1.05rem;
}

.FaqItem summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--primary);
  font-weight: 700;
}

.FaqItem[open] summary::before {
  content: "\2212";
}

.FaqItem p {
  margin: 14px 0 0;
  color: var(--text-muted);
}

.Section-finalCta {
  text-align: center;
}

.FinalCta-text {
  font-size: 1.3rem;
  font-weight: 600;
}

.VisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.Footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--text-muted);
}

.Footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.Footer-links {
  display: flex;
  gap: 16px;
}

.Footer-links a {
  color: var(--text-muted);
}

.Footer-copy {
  margin: 0;
  font-size: 0.9rem;
}

@media (min-width: 760px) {
  .Hero-inner {
    flex-direction: row;
    align-items: center;
  }

  .Hero-copy {
    flex: 1;
  }

  .HeroVisual {
    flex: 1;
  }

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

  .FeatureRow {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .FeatureRow-reverse {
    flex-direction: row-reverse;
  }

  .FeatureRow-text {
    flex: 1;
  }

  .FeatureCompact {
    grid-template-columns: repeat(2, 1fr);
  }

  .Glance {
    display: grid;
    grid-template-columns: 140px 1fr;
    column-gap: 20px;
    row-gap: 12px;
    align-items: baseline;
  }

  .Glance dt {
    margin-top: 0;
  }

  .Glance dd {
    margin: 0;
  }
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  html.js .Reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  html.js .Reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  html.js .Reveal .Stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

  html.js .Reveal.is-visible .Stagger > * {
    opacity: 1;
    transform: none;
  }

  html.js .Reveal.is-visible .Stagger > :nth-child(2) { transition-delay: 0.08s; }
  html.js .Reveal.is-visible .Stagger > :nth-child(3) { transition-delay: 0.16s; }
  html.js .Reveal.is-visible .Stagger > :nth-child(4) { transition-delay: 0.24s; }
  html.js .Reveal.is-visible .Stagger > :nth-child(5) { transition-delay: 0.32s; }
  html.js .Reveal.is-visible .Stagger > :nth-child(6) { transition-delay: 0.4s; }

  .Hero-copy > * {
    animation: RiseIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .Hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .Hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .Hero-copy > :nth-child(4) { animation-delay: 0.24s; }
  .Hero-copy > :nth-child(5) { animation-delay: 0.32s; }
  .Hero-copy > :nth-child(6) { animation-delay: 0.4s; }

  .HeroVisual {
    animation: RiseIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  }

  .FaqItem[open] p {
    animation: FadeIn 0.35s ease both;
  }

  @keyframes RiseIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes FadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
  }
}

.Btn {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

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

.Btn-primary:hover {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 35%, transparent);
}

.Btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.FaqItem summary::before {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.FaqItem[open] summary::before,
.FaqItem details[open] summary::before {
  content: "+";
  transform: rotate(45deg);
}

.FeatureCard, .FaqItem {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}

.FeatureCard:hover, .FaqItem:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(31, 36, 33, 0.1);
}

.PhoneFrame {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.PhoneFrame:hover {
  transform: translateY(-6px);
}

/* App Store CTA */

.AppStoreBtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 20px 8px 14px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  text-decoration: none;
  line-height: 1.05;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}

.AppStoreBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  background: #111;
}

.AppStoreBtn:active {
  transform: translateY(0);
  box-shadow: none;
}

.AppStoreBtn-logo {
  flex-shrink: 0;
}

.AppStoreBtn-text {
  display: flex;
  flex-direction: column;
}

.AppStoreBtn-small {
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

.AppStoreBtn-big {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.CtaNote {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.Section-finalCta .CtaNote,
.FinalCta .CtaNote {
  margin-top: 14px;
}

/* Developer credit */

.Footer-credit {
  margin: 0;
  font-size: 0.9rem;
}

.Footer-credit a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.Footer-credit a:hover {
  color: var(--primary);
}
