/* Tokens iguais aos do app (fertilityos/src/app/globals.css) */
:root {
  --background: #ffffff;
  --foreground: #1a2140;
  --primary: #343f6b;
  --primary-foreground: #fafafa;
  --secondary: #f2f3f7;
  --muted-foreground: #5a6490;
  --accent: #eef0f8;
  --border: #e3e6f0;
  --border-strong: #d9dde9;
  --success: #2f7d4b;
  --success-soft: #e6f3ea;
  --destructive: #c2281e;
  --radius: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
a { color: var(--primary); }
a:hover { color: var(--foreground); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* Escala tipográfica (razão ~1,25) */
h1 { font-size: 36px; line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
h2 { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-size: 17px; line-height: 1.35; font-weight: 600; }
.lead { font-size: 17px; line-height: 1.55; color: var(--muted-foreground); max-width: 62ch; }
.muted { color: var(--muted-foreground); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: var(--secondary); border-block: 1px solid var(--border); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.split { display: grid; gap: 40px; align-items: start; }
.split-text { display: flex; flex-direction: column; gap: 18px; }

/* Botões no estilo shadcn */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--foreground); color: var(--primary-foreground); }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--accent); color: var(--foreground); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* Cabeçalho */
.header { position: sticky; top: 0; z-index: 10; background: var(--background); border-bottom: 1px solid var(--border); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 36px; width: auto; display: block; }
.nav { display: none; flex-direction: column; gap: 4px; width: 100%; padding-bottom: 16px; }
.nav.open { display: flex; }
.nav a:not(.btn) { padding: 10px 0; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--foreground); }
.nav a:not(.btn):hover { color: var(--muted-foreground); }
.nav .btn { margin-top: 8px; }
.menu-btn { width: 44px; padding: 0; }

/* Hero */
.hero { padding: 56px 0 64px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 24px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Ilustração da interface (dados fictícios) */
.app { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; font-size: 13px; line-height: 1.4; box-shadow: 0 1px 2px rgb(26 33 64 / 0.04), 0 16px 40px -16px rgb(26 33 64 / 0.16); }
.app-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; background: var(--secondary); border-bottom: 1px solid var(--border); }
.app-bar > span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.app-url { margin-left: 12px; flex: 1; max-width: 320px; height: 22px; line-height: 22px; padding: 0 10px; border-radius: 6px; background: var(--background); border: 1px solid var(--border); color: var(--muted-foreground); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app-body { display: flex; min-height: 360px; }
.app-side { width: 150px; flex: none; padding: 14px 10px; background: var(--secondary); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.app-side img { height: 26px; width: auto; align-self: flex-start; margin: 0 6px 10px; }
.app-side small { font-size: 11px; color: var(--muted-foreground); padding: 10px 8px 4px; }
.app-side b { font-weight: 500; padding: 6px 8px; border-radius: 6px; }
.app-side b.on { background: var(--background); border: 1px solid var(--border); padding: 5px 7px; }
.app-main { flex: 1; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.app-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.app-head strong { display: block; font-size: 15px; font-weight: 600; }
.app em { font-style: normal; color: var(--muted-foreground); font-size: 12px; }
.app-btn { font-style: normal; font-weight: 500; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: var(--primary); color: var(--primary-foreground); white-space: nowrap; }
.app-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.app-stats div { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.app-stats strong { display: block; font-size: 18px; font-weight: 600; }
.app-table { border: 1px solid var(--border); border-radius: 8px; }
.app-table div { display: grid; grid-template-columns: 44px minmax(0, 1.1fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--border); }
.app-table div:first-child { border-top: 0; }
.app-table span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app-table span:first-child, .app-table span:nth-child(3) { color: var(--muted-foreground); }
.tag { font-style: normal; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--secondary); color: var(--muted-foreground); white-space: nowrap; }
.tag.ok { background: var(--success-soft); color: var(--success); }
.tag.info { background: var(--accent); color: var(--primary); }
.tag.main { background: var(--primary); color: var(--primary-foreground); }
@media (max-width: 520px) { .app-side { display: none; } .app-table div { grid-template-columns: 40px minmax(0, 1fr) auto; } .app-table span:nth-child(3) { display: none; } }

/* O ciclo: linha do tempo, vertical no celular e horizontal no desktop */
.cycle { list-style: none; padding: 0; display: grid; }
.cycle li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0 0 32px 32px; border-left: 2px solid var(--primary); }
.cycle li:last-child { border-left-color: transparent; padding-bottom: 0; }
.cycle li::before { content: ""; position: absolute; left: -8px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--background); border: 2px solid var(--primary); }
.cycle li:last-child::before { background: var(--primary); }
.cycle-area { font-size: 14px; font-weight: 500; color: var(--muted-foreground); line-height: 1.2; }
.cycle p { font-size: 15px; color: var(--muted-foreground); }
.cycle-note { margin-top: 48px; color: var(--muted-foreground); max-width: 72ch; }

/* Módulos e listas de definição */
.modules { display: grid; gap: 28px 32px; }
.modules div, .facts-list div { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.section-alt .modules div { border-top-color: var(--border-strong); }
dt { font-weight: 600; }
dd { color: var(--muted-foreground); font-size: 15px; }
.facts-list { display: grid; gap: 20px; margin-top: 8px; }

/* Registro de dupla checagem */
.record { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.record figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.record figcaption span { color: var(--muted-foreground); font-size: 14px; }
.record-scroll { overflow-x: auto; }
.record table { width: 100%; border-collapse: collapse; font-size: 14px; }
.record th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted-foreground); background: var(--secondary); padding: 10px 20px; white-space: nowrap; }
.record td { padding: 12px 20px; border-top: 1px solid var(--border); white-space: nowrap; }
.record td:last-child, .record th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.record-note { padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); }

/* Implantação */
.steps { list-style: none; padding: 0; display: grid; gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 8px; border-radius: 50%; border: 1px solid var(--primary); color: var(--primary); font-size: 14px; font-weight: 600; }
.steps p { color: var(--muted-foreground); font-size: 15px; max-width: 46ch; }

/* Formulário */
.form { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea {
  font: inherit; font-size: 15px; color: var(--foreground); background: var(--background);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; min-height: 44px; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted-foreground); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.form-status { font-size: 14px; font-weight: 500; min-height: 22px; }
.form-status.ok { color: var(--success); }
.form-status.error { color: var(--destructive); }

/* Rodapé e páginas legais */
.footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: 14px; color: var(--muted-foreground); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.footer img { height: 28px; width: auto; display: block; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { text-decoration: none; }
.prose { max-width: 760px; padding-block: 56px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 20px; margin-top: 16px; }
.prose ul { padding-left: 20px; margin: 0; }
.notice { background: var(--accent); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }

@media (min-width: 640px) {
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .section { padding: 96px 0; }
  .hero { padding: 88px 0 96px; }
  h1 { font-size: 54px; }
  h2 { font-size: 38px; }
  .lead { font-size: 18px; }
  .section-head { margin-bottom: 56px; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; }
  .modules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .cycle { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cycle li { padding: 28px 24px 0 0; border-left: 0; border-top: 2px solid var(--primary); }
  .cycle li:last-child { border-top-color: var(--primary); }
  .cycle li::before { left: 0; top: -8px; }
  .header .wrap { flex-wrap: nowrap; }
  .menu-btn { display: none; }
  .nav { display: flex; flex-direction: row; align-items: center; gap: 28px; width: auto; padding: 0; }
  .nav .btn { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
