:root {
  --ink: #1a1a1a;
  --mute: #5a5a5a;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --accent: #0066cc;
  --tile-bg: #f5f5f7;
  --tile-bg-hover: #ececef;
  --border: #e5e5e7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* Site header (small nav at top of sub-pages) */
nav.site {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  font-size: 15px;
}

nav.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav.site a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

nav.site .home-link {
  color: var(--mute);
  font-weight: 400;
}

nav.site .home-link:hover { color: var(--ink); }

/* Hero (used on home page with waterfall background) */
header.hero {
  position: relative;
  padding: 140px 0 110px;
  text-align: center;
  color: #fff;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)),
    url('/img/hero-waterfall.jpg');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}

header.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

header.hero p.lede {
  font-size: clamp(18px, 2.4vw, 22px);
  color: rgba(255, 255, 255, 0.95);
  max-width: 640px;
  margin: 0 auto 40px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

p.free-note {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

a.appstore-badge {
  display: inline-block;
  height: 56px;
  transition: transform 0.15s ease;
}

a.appstore-badge:hover {
  transform: translateY(-1px);
}

a.appstore-badge img {
  height: 100%;
  width: auto;
  display: block;
}

/* Sub-page hero (smaller, white background) */
header.sub-hero {
  padding: 64px 0 32px;
  text-align: left;
}

header.sub-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

header.sub-hero p.lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--mute);
  max-width: 680px;
  margin: 0 0 32px;
}

section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  text-align: center;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .tiles { grid-template-columns: 1fr; }
}

a.tile {
  display: block;
  padding: 24px;
  background: var(--tile-bg);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

a.tile:hover {
  background: var(--tile-bg-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

a.tile h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

a.tile p {
  font-size: 15px;
  color: var(--mute);
  margin: 0;
}

.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.use-case-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin-bottom: 16px;
  background: var(--bg-2);
}

.use-case h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
}

.use-case p {
  color: var(--mute);
  margin: 0;
}

.story {
  max-width: 680px;
  margin: 0 auto;
}

.story h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.story p {
  margin: 0 0 18px;
  color: var(--ink);
}

/* Article body (sub-pages) */
article.body {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 0 32px;
}

article.body h2 {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  text-align: left;
}

article.body h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 28px 0 10px;
}

article.body p {
  margin: 0 0 18px;
}

article.body ul, article.body ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

article.body li {
  margin-bottom: 8px;
}

article.body .cta-inline {
  background: var(--bg-2);
  padding: 24px;
  border-radius: 16px;
  margin: 32px 0;
  text-align: center;
}

article.body .cta-inline p {
  margin: 0 0 16px;
  font-size: 17px;
}

.related {
  background: var(--bg-2);
  padding: 32px;
  border-radius: 16px;
  margin: 48px auto;
  max-width: 720px;
}

.related h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mute);
}

.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related li {
  margin-bottom: 10px;
}

.related a {
  text-decoration: none;
}

.related a:hover {
  text-decoration: underline;
}

footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--mute);
  font-size: 14px;
}

footer a {
  color: var(--mute);
  text-decoration: none;
  margin: 0 12px;
}

footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 600px) {
  header.hero { padding: 88px 0 72px; }
  header.sub-hero { padding: 48px 0 24px; }
  section { padding: 48px 0; }
}
