/*
 * InkStamp — shared web stylesheet.
 *
 * Design goals:
 *   • Mirror the "retro paper + coral ink + mint accent" palette that
 *     the iOS app uses, so the marketing site feels like a natural
 *     extension of the product.
 *   • Zero JavaScript, zero external font requests — loads instantly
 *     even on slow networks and gets full marks on Apple App Review's
 *     "does the link actually work" sanity check.
 *   • Readable typography at default 16px across mobile and desktop.
 *
 * Color tokens are kept in CSS variables so a redesign only has to
 * touch `:root`.
 */

:root {
  --cream: #f4e9d4;
  --paper: #faf3e1;
  --ink: #2c2419;
  --ink-soft: #4d3f2d;
  --ink-muted: #7f715a;
  --coral: #d85e48;
  --coral-soft: rgba(216, 94, 72, 0.12);
  --mint: #6fa188;
  --stamp: #a5402f;
  --divider: rgba(44, 36, 25, 0.12);
  --shadow: 0 8px 30px rgba(44, 36, 25, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*
 * Defensive image sizing.  The InkStamp App Icon ships at 1024×1024, so
 * any <img> that renders it without explicit bounds would fill half the
 * viewport on mobile.  Capping every image at 100% of its container and
 * auto-heighting solves that for any future markup as well.
 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Helvetica, "Hiragino Sans", "Noto Sans CJK SC", "Microsoft Yahei",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Shell (header / footer) ---------- */

.shell {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 48px;
  flex: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 28px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--coral);
  display: grid;
  place-items: center;
  color: var(--paper);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.brand-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.hero-icon {
  width: 112px;
  height: 112px;
  min-width: 112px;
  min-height: 112px;
  max-width: 112px;
  max-height: 112px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(44, 36, 25, 0.18);
  margin: 0 auto 18px;
}

@media (max-width: 560px) {
  .hero-icon {
    width: 96px;
    height: 96px;
    min-width: 96px;
    min-height: 96px;
    max-width: 96px;
    max-height: 96px;
    border-radius: 22px;
  }
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--coral);
  background: var(--coral-soft);
}

/* ---------- Headings ---------- */

.kicker {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--stamp);
  text-transform: uppercase;
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--ink);
}

h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 30px 0 10px;
  color: var(--ink);
}

h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 18px 0 6px;
  color: var(--ink);
  letter-spacing: 0.2px;
}

p {
  margin-bottom: 14px;
  color: var(--ink-soft);
}

p.lede {
  font-size: 18px;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 24px;
}

ul {
  margin: 8px 0 16px 22px;
  color: var(--ink-soft);
}

ul li {
  margin-bottom: 6px;
}

ul li::marker {
  color: var(--coral);
}

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

a {
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 94, 72, 0.35);
}

a:hover {
  border-bottom-color: var(--coral);
}

hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 32px 0;
}

/* ---------- Cards / sections ---------- */

.card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--divider);
  padding: 22px 22px 8px;
  margin-bottom: 18px;
}

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

.card p:last-child,
.card ul:last-child {
  margin-bottom: 14px;
}

/* ---------- Hero (index only) ---------- */

.hero {
  padding: 36px 22px 28px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
  text-align: center;
  margin-bottom: 26px;
}

.hero .eyebrow {
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 800;
  color: var(--stamp);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 560px;
  margin: 0 auto 14px;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 24px;
  color: var(--ink-soft);
  font-size: 17px;
}

.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.1s ease-out;
}

.btn:hover {
  transform: translateY(-1px);
  border-bottom: 1px solid transparent;
}

.btn-primary {
  background: var(--coral);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--stamp);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--divider);
}

.btn-ghost:hover {
  background: var(--coral-soft);
  color: var(--coral);
}

/* ---------- Feature grid (index) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.feature {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 18px;
}

.feature h3 {
  margin-top: 0;
  color: var(--coral);
}

.feature p {
  font-size: 14px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 36px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer a {
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.updated {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink-muted);
  margin: 6px 0 18px;
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .shell {
    padding: 16px 16px 32px;
  }
  .card {
    padding: 18px 18px 6px;
    border-radius: var(--radius-md);
  }
  .hero {
    padding: 28px 18px 22px;
  }
  h2 {
    font-size: 20px;
  }
}
