/* ============================================================
   Dazo — Apple-inspired design system
   ============================================================ */

:root {
  --black: #000000;
  --ink: #1d1d1f;
  --ink-2: #2a2a2d;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-2: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #fbfbfd;
  --accent: #0066ff;
  --accent-2: #0d4fd8;
  --accent-soft: rgba(13, 79, 216, 0.08);
  --ok: #2bb673;
  --warn: #f08a24;
  --danger: #e0383e;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.18);
  --max: 1200px;
  --max-wide: 1320px;
  --nav-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Typography ------------------------------------------------ */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; }
h3 { font-size: clamp(24px, 3vw, 36px); line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.3; }
p { margin: 0 0 1em; color: var(--text); }
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.lede { font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); max-width: 720px; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.gradient-text {
  background: linear-gradient(180deg, #ffffff 0%, #b8c2d9 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.accent-text { color: var(--accent-2); }

/* Layout ---------------------------------------------------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-tight { padding: clamp(56px, 7vw, 96px) 0; }
.section-dark { background: var(--ink); color: #f5f5f7; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #ffffff; }
.section-dark p, .section-dark .lede { color: #a1a1a6; }
.section-gray { background: var(--bg-2); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid-4-sm-2 { grid-template-columns: repeat(2, 1fr) !important; } }

/* Nav ------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--ink); }
.brand-logo {
  width: 44px; height: 44px;
  display: inline-block;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
.brand-text { font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px; color: var(--ink); opacity: 0.84;
  transition: opacity .15s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-accent { background: var(--accent-2); color: #fff; }
.btn-accent:hover { background: #0a3fb4; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(0,0,0,.05); }
.btn-dark-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.24); }
.btn-dark-ghost:hover { background: rgba(255,255,255,.08); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero ------------------------------------------------------ */
.hero {
  padding: clamp(64px, 9vw, 140px) 0 clamp(48px, 7vw, 100px);
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
}
.hero h1 { margin: 0 auto 22px; max-width: 1000px; }
.hero .lede { margin: 0 auto 36px; }
.hero-meta {
  margin-top: 16px;
  font-size: 13px; color: var(--muted);
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}
.hero-art { margin-top: clamp(40px, 6vw, 72px); }

/* Cards ----------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-tight { padding: 24px; border-radius: var(--radius); }
.card-dark {
  background: var(--ink-2);
  color: #f5f5f7;
  border: 1px solid rgba(255,255,255,.06);
}
.card-dark h3, .card-dark h4 { color: #fff; }
.card-dark p { color: #a1a1a6; }
.card-flat { background: var(--bg-2); border-radius: var(--radius-lg); padding: 40px; border: 0; }

/* Pictogram chips ------------------------------------------- */
.chip {
  width: 56px; height: 56px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 26px;
}
.chip-blue   { background: #e6effd; color: #1456c9; }
.chip-green  { background: #e3f5ea; color: #1f8a4d; }
.chip-orange { background: #fdecdb; color: #c5651b; }
.chip-teal   { background: #ddf2ef; color: #117a6a; }
.chip-purple { background: #ece3f7; color: #5a3aa1; }
.chip-pink   { background: #fce3ec; color: #b53266; }
.chip-dark   { background: #1d1d1f; color: #fff; }

/* Use-case grid --------------------------------------------- */
.use-case {
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  min-height: 320px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.use-case h3 { margin-bottom: 8px; }
.use-case p { color: var(--muted); }
.use-case .chip { margin-bottom: 24px; }

/* Phone / device frames ------------------------------------- */
.phone {
  border-radius: 44px;
  padding: 10px;
  background: #1d1d1f;
  box-shadow: 0 30px 80px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.06);
  display: inline-block;
  max-width: 320px;
  width: 100%;
}
.phone img { border-radius: 34px; display: block; width: 100%; }
.phone-sm { max-width: 240px; }
.phone-lg { max-width: 360px; }

.laptop {
  background: #1d1d1f;
  padding: 14px 14px 10px;
  border-radius: 16px 16px 6px 6px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}
.laptop::after {
  content: "";
  position: absolute;
  left: -8%; right: -8%;
  bottom: -14px; height: 14px;
  background: linear-gradient(180deg, #cbcbd1 0%, #9c9ca2 100%);
  border-radius: 0 0 24px 24px;
}
.laptop img { border-radius: 6px; width: 100%; display: block; }

/* Stack lists ----------------------------------------------- */
.feature-row { display: flex; gap: 16px; align-items: flex-start; }
.feature-row + .feature-row { margin-top: 24px; }
.feature-row .dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; flex: 0 0 32px;
}
.feature-row h4 { margin-bottom: 4px; }
.feature-row p { color: var(--muted); margin: 0; font-size: 15px; }

/* Stat strip ------------------------------------------------ */
.stat { text-align: center; }
.stat .n { font-size: 48px; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.stat .l { color: var(--muted); font-size: 14px; }

/* Pricing --------------------------------------------------- */
.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  background: #fff;
  display: flex; flex-direction: column;
  height: 100%;
}
.plan.featured {
  background: var(--ink); color: #f5f5f7; border-color: var(--ink);
  position: relative;
}
.plan.featured h3, .plan.featured .price { color: #fff; }
.plan.featured ul li { color: #d6d6db; }
.plan .price {
  font-size: 56px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1; margin: 16px 0 6px;
}
.plan .price small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 24px 0; flex: 1; }
.plan ul li { padding: 8px 0; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.plan ul li::before { content: "✓"; color: var(--accent-2); font-weight: 600; }
.plan.featured ul li::before { color: #8fb6ff; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-2);
  font-size: 12px; font-weight: 600;
}
.plan.featured .badge { background: rgba(255,255,255,.14); color: #fff; }

/* Footer ---------------------------------------------------- */
.footer { background: var(--bg-2); padding: 64px 0 36px; color: var(--muted); font-size: 13px; }
.footer h5 { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 40px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { padding: 5px 0; }
.footer a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 48px; padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Misc helpers ---------------------------------------------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.kbd {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: #f5f5f7; border: 1px solid var(--line);
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
}
.tag {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-2); color: var(--muted);
}
.tag-blue   { background: #e6effd; color: #1456c9; }
.tag-green  { background: #e3f5ea; color: #1f8a4d; }
.tag-orange { background: #fdecdb; color: #c5651b; }
.tag-teal   { background: #ddf2ef; color: #117a6a; }

/* Docs ------------------------------------------------------ */
.docs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.docs-side {
  position: sticky; top: calc(var(--nav-h) + 24px);
  border-right: 1px solid var(--line);
  padding-right: 24px;
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
}
.docs-side h5 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 24px 0 8px; }
.docs-side ul { list-style: none; padding: 0; margin: 0; }
.docs-side ul li a {
  display: block; padding: 6px 0; font-size: 14px; color: var(--muted-2);
}
.docs-side ul li a:hover { color: var(--ink); }
.docs-side ul li a.active { color: var(--accent-2); font-weight: 500; }
.docs-content h2 { margin-top: 64px; padding-top: 16px; }
.docs-content h3 { margin-top: 40px; margin-bottom: 10px; font-size: 24px; }
.docs-content p { color: var(--text); }
.docs-content ol, .docs-content ul { color: var(--text); }
.docs-content ol li, .docs-content ul li { padding: 4px 0; }
.docs-shots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; margin: 28px 0;
}
.docs-shot {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.docs-shot img { margin: 0 auto; border-radius: 14px; }
.docs-shot .caption { margin-top: 12px; font-size: 13px; color: var(--muted); }
.docs-callout {
  border-left: 3px solid var(--accent-2);
  background: var(--accent-soft);
  padding: 16px 20px; border-radius: 0 12px 12px 0;
  color: var(--ink); font-size: 15px; margin: 16px 0;
}
.docs-callout strong { color: var(--accent-2); }
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { position: static; border: 0; padding: 0; max-height: none; }
}

/* Reveal on scroll (very subtle) ---------------------------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   Mobile refinements
   ============================================================ */
html, body { overflow-x: hidden; max-width: 100%; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: clamp(36px, 9vw, 48px); line-height: 1.08; }
  h2 { font-size: clamp(28px, 7vw, 38px); line-height: 1.12; }
  h3 { font-size: 22px; }
  .lede { font-size: 16px; }

  .container, .container-wide { padding: 0 20px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 44px 0; }
  .hero { padding: 48px 0 32px; }
  .hero-meta { font-size: 12px; gap: 10px; }

  .grid { gap: 16px; }

  /* Cards: tighter padding on mobile */
  .card { padding: 22px; border-radius: 20px; }
  .card-flat { padding: 22px; border-radius: 20px; }
  .use-case { padding: 24px; border-radius: 22px; min-height: auto; }
  .use-case h3 { font-size: 22px; }
  .use-case p { font-size: 14px; }

  /* Hero buttons stack */
  .btn-lg { padding: 14px 22px; font-size: 15px; }
  .btn-row { gap: 10px; }

  /* Feature rows tighten */
  .feature-row { gap: 12px; }
  .feature-row + .feature-row { margin-top: 16px; }
  .feature-row .dot { width: 28px; height: 28px; flex-basis: 28px; font-size: 14px; }
  .feature-row h4 { font-size: 16px; }
  .feature-row p { font-size: 14px; }

  /* Big stacks of phones don't overflow */
  .phone, .phone-sm, .phone-lg { max-width: 78vw; }

  /* Laptop frame on mobile: contained, no negative-margin shadow that pushes overflow */
  .laptop { padding: 8px 8px 6px; border-radius: 12px 12px 4px 4px; max-width: 100%; }
  .laptop::after { display: none; }

  /* Nav: hide secondary CTA, keep one primary */
  .nav-cta .btn-ghost { display: none; }
  .brand { font-size: 17px; gap: 8px; }
  /* On phones the logo's inner detail can't render at small sizes — show wordmark only */
  .brand-logo { display: none; }
  .brand-text { display: inline; font-weight: 700; }

  /* Footer: stack neatly */
  .footer { padding: 48px 0 28px; }
  .footer-grid { gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; }

  /* Plans on mobile */
  .plan { padding: 28px; }
  .plan .price { font-size: 44px; }

  /* Use-case grid: single column under 540px */
}

@media (max-width: 540px) {
  .grid-4-sm-2 { grid-template-columns: 1fr !important; }
  h1 { font-size: clamp(32px, 9vw, 40px); }
  .hero-meta { display: none; }
  .laptop { padding: 6px; }
}

/* Docs side nav: collapse cleanly on mobile */
@media (max-width: 900px) {
  .docs-shots { grid-template-columns: 1fr; }
}
