/* PurpleHat landing page. Tokens copied from the app (web/src/app/globals.css,
   shadcn neutral theme) so the site and the product look the same. */
:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --border: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --sidebar: oklch(0.985 0 0);
  --radius: 0.625rem;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Status tones, as toneClass() in web/src/lib/drp.ts */
  --danger-bg: oklch(0.637 0.237 25.331 / 0.15);
  --danger-fg: oklch(0.505 0.213 27.518);
  --warning-bg: oklch(0.769 0.188 70.08 / 0.15);
  --warning-fg: oklch(0.555 0.163 48.998);
  --info-bg: oklch(0.685 0.169 237.323 / 0.15);
  --info-fg: oklch(0.5 0.134 242.749);
  --success-bg: oklch(0.696 0.17 162.48 / 0.15);
  --success-fg: oklch(0.508 0.118 165.612);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.muted { color: var(--muted-foreground); }
.center { text-align: center; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

/* Buttons: components/ui/button.tsx */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid transparent; font-size: 0.875rem; font-weight: 500;
  white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s;
}
.btn-lg { height: 40px; padding: 0 18px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: oklch(0.205 0 0 / 0.85); }
.btn-outline { background: var(--background); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost:hover { background: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }

/* Badges: components/ui/badge.tsx + toneClass() */
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 0.75rem; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-outline { border-color: var(--border); color: var(--foreground); }
.badge-dark { background: var(--primary); color: var(--primary-foreground); }
.t-danger { background: var(--danger-bg); color: var(--danger-fg); }
.t-warning { background: var(--warning-bg); color: var(--warning-fg); }
.t-info { background: var(--info-bg); color: var(--info-fg); }
.t-success { background: var(--success-bg); color: var(--success-fg); }
.t-muted { background: var(--muted); color: var(--muted-foreground); }

/* Cards: components/ui/card.tsx */
.card { background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); }

.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--background); font-size: 0.9375rem;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted-foreground); }
.input:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px oklch(0.708 0 0 / 0.3); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23737373' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select.input:invalid { color: var(--muted-foreground); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: oklch(1 0 0 / 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1rem; }
.header-nav { display: flex; gap: 24px; font-size: 0.875rem; color: var(--muted-foreground); }
.header-nav a:hover { color: var(--foreground); }
.header-actions { display: flex; gap: 8px; margin-left: auto; }

/* Hero */
.hero { padding: 80px 0 72px; }
.hero-copy { max-width: 46rem; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.06; font-weight: 600; letter-spacing: -0.03em; margin: 20px 0 16px; }
.lead { font-size: 1.125rem; color: var(--muted-foreground); max-width: 38rem; margin: 0 auto; }
.scan { display: flex; gap: 8px; margin: 28px auto 0; max-width: 30rem; }
.scan .input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 0.875rem; }
.scan-center { margin: 28px auto 0; }
.hint { margin-top: 10px; font-size: 0.8125rem; color: var(--muted-foreground); }
.hero-ctas { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.section-text { margin: 12px auto 0; max-width: 38rem; color: var(--muted-foreground); font-size: 1.0625rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 46rem; margin: 28px auto 0; }
.chips .badge { height: 30px; padding: 0 12px; font-size: 0.8125rem; background: var(--background); }

/* Product screenshot (built with the app's components) */
.app-frame { max-width: 960px; margin: 56px auto 0; }
.app-frame figcaption { margin-top: 10px; font-size: 0.75rem; color: var(--muted-foreground); text-align: right; }
.app {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); overflow: hidden;
  background: var(--background); font-size: 0.8125rem;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04), 0 12px 32px -12px oklch(0 0 0 / 0.12);
}
.app-side { background: var(--sidebar); border-right: 1px solid var(--border); padding: 14px 10px; }
.app-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 2px 6px 14px; }
.app-side li { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 8px; color: oklch(0.205 0 0 / 0.8); }
.app-side li.active { background: var(--secondary); color: var(--foreground); font-weight: 500; }
.app-side svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.app-main { padding: 20px 24px 8px; min-width: 0; }
.app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.app-title { font-size: 1rem; font-weight: 600; }
.app-sub { color: var(--muted-foreground); font-size: 0.75rem; }
.tabs { display: inline-flex; padding: 3px; border-radius: var(--radius); background: var(--muted); font-size: 0.75rem; }
.tabs span { padding: 3px 8px; border-radius: 7px; color: var(--muted-foreground); white-space: nowrap; }
.tabs span.on { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px oklch(0 0 0 / 0.08); }
.app-table { width: 100%; border-collapse: collapse; }
.app-table th { text-align: left; font-weight: 500; color: var(--muted-foreground); font-size: 0.75rem; padding: 8px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.app-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.app-table tr:last-child td { border-bottom: 0; }
.app-table td.mono { font-size: 0.75rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.app-table tr.dim td { opacity: 0.75; }
.score { display: inline-flex; min-width: 30px; justify-content: center; padding: 1px 6px; border-radius: 6px; font-weight: 600; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.s-danger { background: var(--danger-bg); color: var(--danger-fg); }
.s-warning { background: var(--warning-bg); color: var(--warning-fg); }
.s-muted { background: var(--muted); color: var(--muted-foreground); }

/* Facts */
.facts { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 24px; border-left: 1px solid var(--border); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { display: block; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; }
.fact span { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--muted-foreground); }

/* Sections */
.section { padding: 88px 0; }
.section-muted { background: var(--sidebar); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 40rem; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section h2 { font-size: clamp(1.625rem, 2.6vw, 2.125rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.section-head p { margin-top: 10px; color: var(--muted-foreground); font-size: 1.0625rem; }
.section h3 { font-size: 1rem; font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: none; }
.step { padding: 24px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: var(--muted); font-size: 0.8125rem; font-weight: 600; margin-bottom: 16px; }
.step p, .feature p { margin-top: 6px; color: var(--muted-foreground); font-size: 0.9375rem; }

.rows { display: grid; gap: 72px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.row-rev .row-copy { order: 2; }
.row-copy p { margin-top: 12px; color: var(--muted-foreground); }
.checks { display: grid; gap: 8px; margin-top: 20px; font-size: 0.9375rem; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px;
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.mock { padding: 20px; font-size: 0.875rem; box-shadow: 0 1px 2px oklch(0 0 0 / 0.04), 0 12px 32px -16px oklch(0 0 0 / 0.12); }
.mock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mock-title { font-weight: 600; }
.mock-sub { color: var(--muted-foreground); font-size: 0.8125rem; white-space: nowrap; }
.mock-meta { display: flex; gap: 6px; margin-top: 12px; }
.mock-label { margin: 18px 0 6px; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.evidence li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.evidence .mono { font-size: 0.75rem; white-space: nowrap; }
.timeline { margin-top: 18px; display: grid; gap: 0; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: -2px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { flex-shrink: 0; width: 9px; height: 9px; margin-top: 7px; border-radius: 999px; background: var(--muted-foreground); }
.timeline li.done .dot { background: var(--success-fg); }
.timeline b { display: block; font-weight: 500; }
.timeline .muted { font-size: 0.8125rem; }

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

/* Pricing: (auth)/pricing/page.tsx */
.billing-toggle { display: inline-flex; margin-top: 24px; padding: 3px; border-radius: var(--radius); background: var(--muted); }
.billing-toggle button { border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 7px; font-size: 0.875rem; color: var(--muted-foreground); cursor: pointer; }
.billing-toggle button[aria-pressed="true"] { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px oklch(0 0 0 / 0.08); }
.billing-toggle .save { font-size: 0.75rem; color: var(--success-fg); margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.plan { padding: 24px; display: flex; flex-direction: column; }
.plan-featured { border-color: var(--foreground); }
.plan h3, .plan-top { display: flex; align-items: center; min-height: 24px; }
.plan-top { justify-content: space-between; gap: 8px; }
.plan-desc { margin-top: 4px; color: var(--muted-foreground); font-size: 0.875rem; min-height: 3.2em; }
.price { margin-top: 20px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price span { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.price small { color: var(--muted-foreground); font-size: 0.875rem; }
.price-note { margin: 4px 0 20px; color: var(--muted-foreground); font-size: 0.8125rem; min-height: 1.5em; }
.plan .checks { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.875rem; }
.plans-foot { margin-top: 24px; text-align: center; font-size: 0.875rem; color: var(--muted-foreground); }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 16px; height: 16px; flex-shrink: 0; transition: transform .2s;
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { padding: 0 0 18px; color: var(--muted-foreground); font-size: 0.9375rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.contact-copy p { margin-top: 12px; color: var(--muted-foreground); }
.contact-copy a { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
.form { padding: 24px; display: grid; gap: 16px; position: relative; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 0.875rem; font-weight: 500; }
.field.invalid .input { border-color: var(--danger-fg); }
.field-error { display: none; color: var(--danger-fg); font-size: 0.8125rem; }
.field.invalid .field-error { display: block; }
.form .btn { justify-self: start; }
.form-status { font-size: 0.875rem; padding: 10px 12px; border-radius: var(--radius); }
.form-status:empty { display: none; }
.form-status.ok { background: var(--success-bg); color: var(--success-fg); }
.form-status.err { background: var(--danger-bg); color: var(--danger-fg); }
.form-status a { text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.final p { margin: 10px auto 0; max-width: 34rem; color: var(--muted-foreground); }

/* Inner pages (purplehat.com.br): page hero, card grids, side lists, contact band */
[id] { scroll-margin-top: 76px; }
.inner-hero { padding: 72px 0 64px; border-bottom: 1px solid var(--border); }
.inner-hero-copy { max-width: 46rem; }
.inner-hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; margin: 20px 0 16px; }
.inner-hero .lead { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.center .actions { justify-content: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature:has(.card-link) { display: flex; flex-direction: column; }
.feature .card-link { display: inline-block; align-self: flex-start; margin-top: auto; padding-top: 14px; font-size: 0.875rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.feature .card-link:hover { text-decoration-color: var(--foreground); }
.feature .checks { margin-top: 14px; font-size: 0.875rem; }
.feature .tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.side { padding: 22px; }
.side-title { font-weight: 600; font-size: 0.9375rem; }
.side-note { margin-top: 4px; color: var(--muted-foreground); font-size: 0.8125rem; }
.side-list { margin-top: 12px; }
.side-list li { padding: 10px 0; border-top: 1px solid var(--border); font-size: 0.875rem; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px 24px; font-size: 0.9375rem; }
.kv dt { color: var(--muted-foreground); }
.kv dd { margin: 0; }
.kv a { text-decoration: underline; text-underline-offset: 3px; }
.band p { margin: 10px auto 0; max-width: 36rem; color: var(--muted-foreground); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post { display: flex; flex-direction: column; overflow: hidden; }
.post img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); }
.post-body { padding: 18px 20px 20px; }
.post-body time { font-size: 0.8125rem; color: var(--muted-foreground); }
.post-body h3 { margin-top: 6px; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.post-body p { margin-top: 6px; font-size: 0.875rem; color: var(--muted-foreground); }
@media (max-width: 1000px) {
  .grid-3, .posts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .posts { grid-template-columns: 1fr; }
  .inner-hero { padding: 48px 0 40px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 12px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: 0.875rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted-foreground); }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted-foreground); }
.footer-nav a:hover { color: var(--foreground); }

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact { border-left: 0; padding-left: 0; }
}
@media (max-width: 820px) {
  .header-nav { display: none; }
  .steps, .plans, .row, .contact { grid-template-columns: 1fr; }
  .row { gap: 32px; }
  .row-rev .row-copy { order: 0; }
  .plan-desc { min-height: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 48px; }
  .section { padding: 64px 0; }
  .header-actions .btn-ghost { display: none; }
  .header-actions .btn-ghost.lang { display: inline-flex; padding: 0 10px; }
  .scan { flex-direction: column; }
  .scan .input { flex: none; }
  .mock-head { flex-wrap: wrap; }
  .app { grid-template-columns: 1fr; }
  .app-main { padding: 16px 12px 4px; }
  .app-table td.mono { max-width: 150px; }
  .app-side { display: none; }
  .tabs, .hide-sm { display: none; }
  .grid-4, .form-row { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .fact { padding: 18px 0; border-top: 1px solid var(--border); }
  .fact:first-child { border-top: 0; }
  .evidence li { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
