/*
 * Pedigree marketing site. Colours and type come from packages/design-tokens
 * (palettes, surfaces, typography) and apps/web/src/theme/theme.ts, which
 * fills buttons with step 7 of each tone so white text passes WCAG AA.
 */

:root {
  color-scheme: light dark;

  /* Surfaces (tokens: surfaces.light) */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;

  /* Tones (tokens: palettes) */
  --primary: #1d4ed8;          /* blue[7]: filled buttons */
  --primary-hover: #1e40af;    /* blue[8] */
  --primary-text: #1d4ed8;     /* links, the paw mark */
  --primary-soft: #dbeafe;     /* blue[1] */
  --primary-soft-text: #1e3a8a;/* blue[9] */
  --copper-soft: #fbe6d3;      /* copper[1] */
  --copper-text: #7c3d1b;      /* copper[8] */
  --success-soft: #dcfce7;
  --success-text: #166534;
  --amber-soft: #fef3c7;
  --amber-text: #92400e;
  --focus: #1d4ed8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.1), 0 16px 40px rgba(15, 23, 42, 0.08);

  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Surfaces (tokens: surfaces.dark) */
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-alt: #17223a;
    --border: #26324a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;

    --primary: #1d4ed8;
    --primary-hover: #2563eb;
    --primary-text: #60a5fa;     /* blue[4]: the paw mark in dark mode */
    --primary-soft: #17223a;
    --primary-soft-text: #bfdbfe;
    --copper-soft: #3a1f10;
    --copper-text: #f5c9a3;
    --success-soft: #0f2a1a;
    --success-text: #86efac;
    --amber-soft: #2e2208;
    --amber-text: #fcd34d;
    --focus: #93c5fd;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary-text); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 5vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48em) { .wrap { padding: 0 1.5rem; } }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--surface); color: var(--text);
  padding: 0.6rem 1rem; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.skip:focus { top: 1rem; }

.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em;
}
.brand svg { width: 28px; height: 28px; color: var(--primary-text); flex: none; }
.site-nav { display: none; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: underline; }
.header-actions { display: flex; gap: 0.5rem; align-items: center; }
.header-actions .link-signin { display: none; }
@media (min-width: 56em) {
  .site-nav { display: block; }
  .header-actions .link-signin { display: inline; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md); border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font); text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-alt); text-decoration: none; }
.btn-sm { min-height: 40px; padding: 0.45rem 0.9rem; font-size: 0.9375rem; }
.btn-lg { min-height: 52px; padding: 0.8rem 1.5rem; font-size: 1.0625rem; }

/* Sections */
section { padding: 3.5rem 0; }
@media (min-width: 48em) { section { padding: 5rem 0; } }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow {
  display: inline-block; margin-bottom: 0.75rem;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary-text);
}
.section-head { max-width: 42rem; margin-bottom: 2rem; }
.section-head p { color: var(--text-muted); font-size: 1.0625rem; }

/* Hero */
.hero { padding: 2.5rem 0 3.5rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero .lead { font-size: 1.125rem; color: var(--text-muted); max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.cta-row .btn { flex: 1 1 12rem; }
@media (min-width: 30em) { .cta-row .btn { flex: 0 0 auto; } }
.hero-points { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.5rem; color: var(--text-muted); font-size: 0.9375rem; }
.hero-points li { display: flex; gap: 0.5rem; align-items: flex-start; }
.hero-points svg { flex: none; width: 20px; height: 20px; margin-top: 0.15rem; color: var(--success-text); }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 0 0 1rem; }
.hero-visual .phone { width: min(70%, 270px); position: relative; z-index: 2; }
.dog-stack { position: absolute; inset: 0; pointer-events: none; }
.dog-stack img {
  position: absolute; width: 30%; max-width: 150px; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius-xl); border: 4px solid var(--surface); box-shadow: var(--shadow-lg);
}
.dog-stack .d1 { left: 0; top: 10%; transform: rotate(-5deg); }
.dog-stack .d2 { right: 0; top: 38%; transform: rotate(4deg); }
.dog-stack .d3 { left: 4%; bottom: 8%; transform: rotate(3deg); }
@media (min-width: 60em) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
}

/* Phone frame around screenshots */
.phone {
  margin: 0;
  border-radius: 34px; padding: 8px;
  background: #0f172a; box-shadow: var(--shadow-lg);
}
.phone img, .phone picture { border-radius: 26px; width: 100%; }
.phone img { background: #f8fafc; }
.shots { align-items: start; }
@media (prefers-color-scheme: dark) { .phone { background: #334155; } }

/* AI note */
.ai-note {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8125rem; color: var(--text-muted);
}

/* Lifecycle strip */
.lifecycle {
  list-style: none; margin: 0 0 2.5rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.lifecycle li {
  padding: 0.35rem 0.8rem; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-soft-text);
  font-weight: 600; font-size: 0.9375rem;
}
.lifecycle li.repro { background: var(--copper-soft); color: var(--copper-text); }
.lifecycle li.arrow { background: none; padding: 0; color: var(--text-muted); font-weight: 400; }

/* Feature cards */
.features { display: grid; gap: 1rem; }
@media (min-width: 40em) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .features { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow);
}
.section-alt .card { background: var(--bg); }
.card h3 { display: flex; align-items: center; gap: 0.6rem; }
.card p { color: var(--text-muted); }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--text-muted); }
.card ul li { margin-bottom: 0.3rem; }
.icon {
  flex: none; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--primary-soft); color: var(--primary-text);
}
.icon svg { width: 22px; height: 22px; }
.icon.repro { background: var(--copper-soft); color: var(--copper-text); }
.icon.success { background: var(--success-soft); color: var(--success-text); }
.icon.amber { background: var(--amber-soft); color: var(--amber-text); }
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-soft-text);
}
.badge.estimate { background: transparent; border: 1px dashed currentColor; color: var(--text-muted); }

/* Smart Add */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 48em) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 1.25rem; left: 1.25rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 700;
}
.steps li h3 { margin-top: 0.5rem; }
.callout {
  margin-top: 1.5rem; padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--amber-soft); color: var(--amber-text);
  border: 1px solid color-mix(in srgb, var(--amber-text) 25%, transparent);
}
.callout p { margin: 0; }
.callout strong { color: inherit; }
.split { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 48em) { .split { grid-template-columns: 1fr 1fr; } }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 48em) { .shots { grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; } }
@media (min-width: 72em) { .shots { grid-template-columns: repeat(5, 1fr); } }
.shots figure { margin: 0; }
.shots .phone { padding: 5px; border-radius: 24px; }
.shots .phone img { border-radius: 19px; }
.shots figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-muted); }
.shots figcaption strong { display: block; color: var(--text); font-size: 0.9375rem; }

/* Pricing */
.plans { display: grid; gap: 1.25rem; max-width: 56rem; }
@media (min-width: 48em) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { display: flex; flex-direction: column; padding: 1.5rem; }
.plan.featured { border: 2px solid var(--primary); }
.plan h3 { font-size: 1.375rem; margin-bottom: 0.25rem; }
.plan .price { font-size: 1.0625rem; font-weight: 600; color: var(--text); margin-bottom: 1rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.plan li { display: flex; gap: 0.5rem; padding: 0.35rem 0; color: var(--text); }
.plan li svg { flex: none; width: 20px; height: 20px; margin-top: 0.15rem; color: var(--success-text); }
.plan li span.muted { display: block; font-size: 0.875rem; }
.plan .btn { width: 100%; }
.fine { margin-top: 1.25rem; font-size: 0.875rem; color: var(--text-muted); max-width: 56rem; }

/* FAQ */
.faq { max-width: 48rem; display: grid; gap: 0.75rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0 1.25rem;
}
.section-alt .faq details { background: var(--bg); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1rem 2rem 1rem 0; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.25rem; top: 50%;
  width: 0.6rem; height: 0.6rem; margin-top: -0.4rem;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); transition: transform 0.15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -0.1rem; }
.faq details > div { padding-bottom: 1rem; color: var(--text-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Closing CTA */
.closing { text-align: center; }
.closing .cta-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; font-size: 0.9375rem; color: var(--text-muted); }
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
@media (min-width: 48em) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
}

/* Legal drafts */
.legal { padding: 2.5rem 0 4rem; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal ul { padding-left: 1.25rem; }
.draft-banner {
  margin: 0 0 2rem; padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--amber-soft); color: var(--amber-text);
  border: 2px dashed currentColor;
}
.draft-banner p { margin: 0; }
.draft-banner strong { display: block; font-size: 1.0625rem; margin-bottom: 0.25rem; }
.todo { background: var(--amber-soft); color: var(--amber-text); padding: 0 0.25rem; border-radius: 4px; }
