:root {
  color-scheme: light dark;
  --surface: #FAF7F2;
  --surface2: #F3EEE5;
  --card: #FFFFFF;
  --ink: #1A1F2E;
  --ink2: #4A4F5E;
  --caption: #5C6170;
  --iris: #3556B8;
  --on-iris: #FFFFFF;
  --card-edge: rgba(20, 18, 12, 0.06);
  --shadow: 0 24px 70px rgba(43, 37, 31, 0.12), 0 4px 16px rgba(43, 37, 31, 0.08);
  --shadow-soft: 0 12px 36px rgba(43, 37, 31, 0.09);
  --radius-lg: 24px;
  --content-max: 1180px;
  --content-gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1A1510;
    --surface2: #231E19;
    --card: #2B251F;
    --ink: #F5F1EC;
    --ink2: #BBB6B1;
    --caption: #A8A29B;
    --iris: #8FB2FF;
    --on-iris: #15131B;
    --card-edge: rgba(255, 248, 230, 0.06);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32), 0 4px 16px rgba(0, 0, 0, 0.22);
    --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.24);
  }
}

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

html {
  background: var(--surface);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
}

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

a {
  color: var(--iris);
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--iris);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: var(--iris);
  font-weight: 700;
  opacity: 0;
  transform: translateY(calc(-100% - 16px));
}

.skip-link:focus {
  border-color: var(--iris);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  opacity: 1;
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--card-edge);
  background: var(--surface);
}

.site-header__inner,
.home-hero,
.home-section,
.home-closing,
.page-shell,
.prose,
.site-footer__inner {
  width: min(calc(100% - var(--content-gutter) - var(--content-gutter)), var(--content-max));
  margin-right: auto;
  margin-left: auto;
}

.site-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  text-decoration: none;
}

.brand-lockup img {
  width: 1.3em;
  height: 1.3em;
  flex: 0 0 1.3em;
}

.brand-lockup:hover span {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

.site-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 8px;
  align-items: center;
  border-radius: 12px;
  color: var(--ink2);
  font-family: ui-rounded, -apple-system, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface2);
  color: var(--iris);
}

.home-main {
  min-width: 0;
}

.home-hero {
  display: grid;
  padding: 56px 0 72px;
  align-items: center;
  gap: 40px 64px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.home-hero__copy {
  min-width: 0;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

h1,
h2 {
  text-wrap: balance;
}

.home-hero h1 {
  max-width: 780px;
  margin: 0 0 24px;
  font-size: clamp(2.75rem, 6.8vw, 5.5rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}

.lede {
  max-width: 690px;
  margin: 0 0 24px;
  color: var(--ink2);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.62;
}

.app-store-badge {
  display: block;
  width: fit-content;
  margin: 12px 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
}

.app-store-badge img {
  width: auto;
  height: 48px;
}

.app-store-badge:focus-visible {
  border-radius: 8px;
  outline: 3px solid var(--iris);
  outline-offset: 3px;
}

.availability {
  margin: 12px 0 0;
  color: var(--caption);
  font-size: 14px;
  font-weight: 600;
}

.phone-stage {
  display: flex;
  min-width: 0;
  justify-content: center;
}

.phone-stage--hero {
  align-self: start;
}

.phone-frame {
  width: min(100%, 310px);
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--card-edge);
  border-radius: 38px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.home-section {
  padding: 56px 0;
}

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

.section-heading h2,
.home-closing h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

.record-card,
.premium-card,
.records-card,
.moment-card {
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.record-card,
.premium-card,
.records-card {
  padding: clamp(24px, 5vw, 48px);
}

.check-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 16px;
  list-style-position: outside;
}

.check-list li {
  margin-left: 20px;
  padding-left: 4px;
  color: var(--ink2);
  font-size: 17px;
  line-height: 1.62;
}

.check-list li::marker {
  color: var(--ink2);
}

.moments-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.moment-card {
  min-width: 0;
}

.moment-card--pictured {
  display: grid;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) 0;
  gap: 32px;
  grid-row: span 2;
  grid-template-rows: auto 1fr;
}

.moment-card--pictured .phone-stage {
  align-items: start;
}

.moment-card--pictured .phone-frame {
  width: min(100%, 260px);
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.moment-card--pictured .phone-frame img {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.moment-card--text {
  padding: clamp(24px, 4vw, 40px);
}

.moment-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.moment-card p {
  margin: 0;
  color: var(--ink2);
  font-size: 16px;
  line-height: 1.62;
}

.moment-card p + p {
  margin-top: 12px;
}

.premium-card {
  background: var(--surface2);
}

.home-closing {
  display: grid;
  margin-top: 32px;
  padding: clamp(40px, 7vw, 72px);
  justify-items: start;
  gap: 24px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.home-closing h2 {
  max-width: 780px;
}

.page-shell,
.prose {
  padding: 56px 0 88px;
}

.prose > * {
  max-width: 860px;
}

.prose h1,
.page-shell h1 {
  margin: 0 0 16px;
  font-size: clamp(2.35rem, 7vw, 4.25rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.prose h2 {
  margin: 48px 0 12px;
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.prose h3 {
  margin: 32px 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.prose h4 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.prose p,
.prose li,
.page-shell p {
  color: var(--ink2);
  line-height: 1.72;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul {
  margin: 0 0 20px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--ink);
}

.prose a strong {
  color: inherit;
}

.prose code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--ink);
  font-size: 0.92em;
}

.prose hr {
  height: 1px;
  margin: 40px 0;
  border: 0;
  background: var(--card-edge);
}

.contact-card {
  display: block;
  margin: 24px 0 40px;
  padding: 24px;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.contact-card .icon {
  display: none;
}

.contact-card h2,
.contact-card h3 {
  margin-top: 0;
}

.page-shell {
  min-height: 56vh;
}

.page-shell p {
  max-width: 680px;
  margin: 0 0 20px;
  font-size: 18px;
}

.page-action {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 0;
  align-items: center;
  font-weight: 750;
}

.site-footer {
  margin-top: 88px;
  border-top: 1px solid var(--card-edge);
  background: var(--surface2);
}

.site-footer__inner {
  display: grid;
  padding: 48px 0 56px;
  justify-items: start;
  gap: 16px;
}

.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.footer-nav a,
.site-footer p a {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
}

.footer-nav a {
  color: var(--ink2);
  font-family: ui-rounded, -apple-system, system-ui, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--iris);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer p {
  max-width: 760px;
  margin: 0;
  color: var(--ink2);
  font-size: 14px;
  line-height: 1.6;
}

.site-footer .trademark-line {
  color: var(--caption);
  font-size: 12px;
}

@media (max-width: 800px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone-stage--hero {
    justify-content: flex-start;
  }

  .phone-stage--hero .phone-frame {
    width: min(78vw, 310px);
  }

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

  .moment-card--pictured {
    grid-row: auto;
  }
}

@media (max-width: 420px) {
  .brand-lockup {
    font-size: 20px;
  }

  .site-nav a {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 13px;
  }

  .home-hero {
    padding-top: 40px;
  }

  .moment-card--pictured,
  .moment-card--text,
  .record-card,
  .premium-card,
  .records-card,
  .contact-card {
    padding-right: 20px;
    padding-left: 20px;
  }

  .moment-card--pictured {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
