:root {
  --bg: #ffffff;
  --fg: #0d0d0d;
  --muted: #5e5e5e;
  --faint: #8f8f8f;
  --line: #e8e8e6;
  --soft: #f5f5f3;
  --soft-2: #eeeeeb;
  --radius: 24px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 14px; border-radius: 999px; background: var(--fg); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.brand .mark { flex: none; }
.site-header nav { display: flex; gap: clamp(18px, 3vw, 32px); }
.site-header nav a { font-size: 15px; color: var(--muted); text-decoration: none; transition: color 0.15s ease; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--fg); }

/* Type */
.eyebrow { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 20px; }
.hero { padding-top: clamp(72px, 12vw, 152px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero-sm { padding-bottom: clamp(32px, 5vw, 56px); }
.hero h1 { font-size: clamp(44px, 7.6vw, 96px); line-height: 1.02; letter-spacing: -0.045em; max-width: 13ch; }
.hero-sm h1 { font-size: clamp(40px, 6vw, 72px); max-width: 16ch; }
.lede { font-size: clamp(19px, 1.9vw, 22px); line-height: 1.5; color: var(--muted); max-width: 40em; margin-top: 28px; letter-spacing: -0.005em; }
.meta { font-size: 15px; color: var(--faint); margin-top: 16px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-dark { background: var(--fg); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-light { background: var(--soft); color: var(--fg); }
.btn-light:hover { background: var(--soft-2); }
.actions .btn + .btn { margin-left: -16px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.arrow { flex: none; }

/* Sections */
.section { padding-top: clamp(56px, 8vw, 112px); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.035em; line-height: 1.1; }
.section-head p { color: var(--muted); }

/* App grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); }
.card .media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--soft); aspect-ratio: 4 / 3.4;
  display: flex; justify-content: center; align-items: flex-start; gap: 20px;
  padding: 40px 32px 0;
}
.card .media img {
  width: 46%; max-width: 280px; border-radius: 18px 18px 0 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover .media img { transform: translateY(-6px); }
.card .media-photo { padding: 0; }
.card .media-photo img { width: 100%; max-width: none; height: 100%; object-fit: cover; object-position: center 25%; border-radius: 0; box-shadow: none; }
.card:hover .media-photo img { transform: scale(1.02); }
.card-feature { grid-column: 1 / -1; }
.card-feature .media { aspect-ratio: 16 / 7.2; padding-top: 48px; gap: 24px; }
.card-feature .media img { width: 22%; max-width: 250px; }
.card-body { display: flex; gap: 16px; align-items: flex-start; padding: 22px 4px 8px; }
.card-body h3 { font-size: 21px; letter-spacing: -0.02em; }
.card-body p { color: var(--muted); margin-top: 2px; }
.card-body .meta { margin-top: 6px; font-size: 14px; }
.app-icon { flex: none; width: 56px; height: 56px; border-radius: 22.5%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); border: 1px solid var(--line); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stat { border-top: 1px solid var(--line); padding-top: 24px; }
.stat strong { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.stat span { display: block; margin-top: 14px; color: var(--muted); max-width: 22em; }

/* Columns */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.cols h3 { font-size: 20px; margin-bottom: 10px; }
.cols p { color: var(--muted); }
.features .cols > div { border-top: 1px solid var(--line); padding-top: 24px; }

/* CTA */
.cta { text-align: center; padding-bottom: clamp(40px, 6vw, 72px); }
.cta h2 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.045em; }
.cta p { color: var(--muted); font-size: 19px; margin: 16px auto 32px; max-width: 30em; }

/* App page */
.app-hero { padding-top: clamp(48px, 7vw, 96px); }
.crumb { display: inline-block; font-size: 15px; color: var(--muted); text-decoration: none; margin-bottom: 32px; }
.crumb::before { content: "←"; margin-right: 8px; }
.crumb:hover { color: var(--fg); }
.app-title { display: flex; align-items: center; gap: 20px; }
.app-icon-lg { width: 80px; height: 80px; }
.app-title h1 { font-size: clamp(40px, 5.6vw, 72px); letter-spacing: -0.045em; line-height: 1.02; }
.app-tagline { font-size: clamp(26px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin-top: 32px; max-width: 22ch; }
.app-hero .lede { margin-top: 20px; }

.gallery { padding-top: clamp(48px, 6vw, 80px); }
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 20px;
  padding: clamp(32px, 5vw, 64px); background: var(--soft); border-radius: var(--radius);
}
.shots img { width: 100%; border-radius: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 12px 40px rgba(0,0,0,0.08); }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.before-after figure { margin: 0; position: relative; }
.before-after img { width: 100%; border-radius: var(--radius); }
.before-after figcaption {
  position: absolute; left: 16px; top: 16px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.9); font-size: 14px; font-weight: 500;
}

.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 24px; margin: 0; }
.details div { border-top: 1px solid var(--line); padding: 18px 0; }
.details dt { font-size: 14px; color: var(--faint); }
.details dd { margin: 4px 0 0; font-weight: 500; }
.details a { text-decoration: none; }
.details a:hover { text-decoration: underline; text-underline-offset: 4px; }

.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 20px; background: var(--soft); text-decoration: none; transition: background-color 0.15s ease; }
.mini:hover { background: var(--soft-2); }
.mini .app-icon { width: 48px; height: 48px; }
.mini strong { display: block; font-weight: 600; }
.mini span span { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; margin-top: 2px; }

/* Prose */
.prose-wrap { padding-bottom: 24px; }
.prose { max-width: 680px; }
.prose .lede { margin-top: 0; color: var(--fg); }
.prose p, .prose ul { margin: 0 0 20px; color: #333; }
.prose h2 { font-size: 24px; letter-spacing: -0.025em; margin: 48px 0 14px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: flex; flex-direction: column; gap: 8px; padding: 28px; border-radius: var(--radius); background: var(--soft); text-decoration: none; min-height: 220px; }
a.contact-card { background: var(--fg); color: #fff; transition: background-color 0.15s ease; }
a.contact-card:hover { background: #333; }
a.contact-card .label, a.contact-card .hint { color: rgba(255,255,255,0.7); }
.contact-card .label { font-size: 14px; color: var(--faint); }
.contact-card strong { font-size: 22px; letter-spacing: -0.02em; font-weight: 600; margin-top: auto; }
.contact-card .hint { color: var(--muted); font-size: 15px; }

/* Footer */
.site-footer { margin-top: clamp(80px, 10vw, 128px); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 12px; }
.site-footer h2 { font-size: 14px; font-weight: 500; color: var(--faint); letter-spacing: 0; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { color: var(--muted); text-decoration: none; }
.site-footer li a:hover { color: var(--fg); }
.copyright { margin-top: 48px; color: var(--faint); font-size: 14px; }

/* Motion */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
/* Above the fold: a CSS-only entrance so the first screen never waits on script. */
.js .hero .reveal, .js .app-hero .reveal { opacity: 1; transform: none; transition: none; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.js .hero .reveal:nth-child(2), .js .app-hero .reveal:nth-child(2) { animation-delay: 60ms; }
.js .hero .reveal:nth-child(3), .js .app-hero .reveal:nth-child(3) { animation-delay: 120ms; }
.js .hero .reveal:nth-child(n+4), .js .app-hero .reveal:nth-child(n+4) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .hero .reveal, .js .app-hero .reveal { opacity: 1; transform: none; transition: none; animation: none; }
  .card .media img, .btn { transition: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .card-feature .media { aspect-ratio: 4 / 3; }
  .card-feature .media img { width: 30%; }
  .card-feature .media img:nth-child(3) { display: none; }
  .cols { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { min-height: 0; }
  .contact-card strong { margin-top: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .shots { grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shots img { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { height: 56px; }
  .site-header nav { gap: 20px; }
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .card .media { aspect-ratio: 1 / 1; padding: 32px 24px 0; }
  .card .media img { width: 62%; }
  .card-feature .media { aspect-ratio: 1 / 1; gap: 14px; }
  .card-feature .media img { width: 46%; }
  .card-feature .media img:nth-child(2) { margin-top: 32px; }
  .stats { grid-template-columns: 1fr; gap: 0; }
  .stat { padding: 20px 0 24px; }
  .mini-grid { grid-template-columns: 1fr; }
  .shots { grid-auto-columns: 68%; padding: 24px; gap: 14px; margin: 0 calc(var(--gutter) * -1); border-radius: 0; scroll-padding: 0 24px; }
  .before-after { grid-template-columns: 1fr; }
  .actions .btn + .btn { margin-left: 0; }
  .actions .btn { width: 100%; }
  .actions .link { width: 100%; justify-content: center; }
  .app-icon-lg { width: 64px; height: 64px; }
  .app-title { gap: 16px; }
}
