/* Ledor promo site — tokens espelham lib/core/theme/app_colors.dart */

:root {
  --paper: #F8F3EA;
  --surface: #FFFCF5;
  --surface-2: #F1EADD;
  --ink: #2B2520;
  --muted: #6B5F52;
  --line: #D9CFBF;
  --accent: #E55324;
  --accent-soft: #FFE5D6;
  --on-accent-soft: #3B1607;
  --shadow: 0 10px 30px rgba(43, 37, 32, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15120F;
    --surface: #1C1815;
    --surface-2: #241E19;
    --ink: #EDE6DB;
    --muted: #A69B8A;
    --line: #3A322A;
    --accent-soft: #472014;
    --on-accent-soft: #FFD9C8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; }

h1, h2, h3 { font-family: 'Lora', Georgia, serif; font-weight: 600; line-height: 1.15; }

a { color: inherit; }

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

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  font-size: 1.45rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark img { display: block; }

.orp { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a:hover { color: var(--ink); }

.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

.lang-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 83, 36, 0.35);
}

.btn-ghost { border-color: var(--line); color: var(--ink); }

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

/* ---------- hero ---------- */

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 2px;
  background: var(--accent);
  margin-right: 0.6em;
  vertical-align: baseline;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  text-wrap: balance;
}

.hero h1 em { font-style: italic; color: var(--accent); }

.lead { font-size: 1.08rem; color: var(--muted); max-width: 34rem; }

.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }

.cta-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.9rem;
}

/* ---------- reader demo ---------- */

.reader {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem 1.4rem;
}

.reader-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}

.reader-wpm { font-variant-numeric: tabular-nums; }

.word-stage {
  position: relative;
  padding: 3rem 0 0;
  margin-bottom: 2.2rem;
}

.orp-tick {
  position: absolute;
  top: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: var(--accent);
  border-radius: 1px;
}

.word {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  line-height: 1.1;
  min-height: 1.2em;
  white-space: pre;
}

.w-pre { text-align: right; }
.w-orp { color: var(--accent); }
.w-post { text-align: left; }

.focus-line {
  height: 3px;
  margin-top: 1.4rem;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.focus-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
}

.reader-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(229, 83, 36, 0.35);
}

.play-btn:hover { filter: brightness(1.08); }

.play-btn[data-playing="true"] .ic-play { display: none; }
.play-btn[data-playing="false"] .ic-pause { display: none; }

.wpm-capsule {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.wpm-capsule button {
  font: inherit;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-size: 1rem;
}

.wpm-capsule button:hover { color: var(--accent); background: var(--surface-2); }

.wpm-capsule span {
  min-width: 3.2ch;
  text-align: center;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- zero strip ---------- */

.zero-strip {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4.5rem);
  flex-wrap: wrap;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.zero-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.zero-num {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.zero-label {
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.zero-hot .zero-num { color: var(--accent); }

/* ---------- dividers: focus line com tick no ORP (~30%) ---------- */

.orp-divider {
  max-width: 1080px;
  margin: 0 auto;
  height: 1px;
  background: var(--line);
  position: relative;
}

.orp-divider::after {
  content: "";
  position: absolute;
  left: 30%;
  top: -5px;
  width: 2px;
  height: 11px;
  background: var(--accent);
  border-radius: 1px;
}

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

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3rem);
}

.section h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  letter-spacing: -0.015em;
  margin-bottom: 0.8rem;
}

.section-lead { color: var(--muted); max-width: 40rem; margin-bottom: 2.5rem; }

.grid { display: grid; gap: 1rem; }

.grid-3 { grid-template-columns: repeat(3, 1fr); }

.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem;
  transition: border-color 150ms ease, transform 150ms ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }

.card p { font-size: 0.92rem; color: var(--muted); }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.8rem;
}

.tag s { opacity: 0.6; }

.tag em { font-style: normal; color: var(--accent); font-weight: 500; }

/* ---------- mode viz ---------- */

.modeviz {
  height: 76px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0 1.4rem;
  position: relative;
}

.viz-word {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.4rem;
}

.viz-word b { color: var(--accent); font-weight: inherit; }

.viz-line {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.viz-line.short { width: 60%; align-self: flex-start; }

.viz-line.has-pill { position: relative; }

.viz-line.has-pill::after {
  content: "";
  position: absolute;
  left: 34%;
  top: -2px;
  width: 22%;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.viz-eq {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 16px;
}

.viz-eq i {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: eq 1s ease-in-out infinite alternate;
}

.viz-eq i:nth-child(1) { height: 60%; animation-delay: 0ms; }
.viz-eq i:nth-child(2) { height: 100%; animation-delay: 150ms; }
.viz-eq i:nth-child(3) { height: 45%; animation-delay: 300ms; }
.viz-eq i:nth-child(4) { height: 80%; animation-delay: 450ms; }

@keyframes eq { from { transform: scaleY(0.5); } to { transform: scaleY(1); } }

/* ---------- split sections (sync, stats) ---------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split .section-lead { margin-bottom: 1.4rem; }

.split-flip .split-viz { order: -1; }

.checklist {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.checklist li {
  font-size: 0.95rem;
  color: var(--muted);
  padding-left: 1.5rem;
  position: relative;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* três aparelhos, mesmo progresso — nuvem (Drive) conectada por stub tracejado */

/* cena: nuvem no topo + leque tracejado até o centro de cada device
   (overshoot das linhas fica escondido atrás dos cascos opacos) */
.d-scene {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.d-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.d-net line {
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.d-hub {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  position: relative;
  margin-bottom: 26px;
}

.d-cloud {
  display: block;
  color: var(--accent);
}

.device-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.6rem;
  position: relative;
}

.d-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.d-name {
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* casco: bezel escuro com tela clara dentro */
.device {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--muted);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.device-phone {
  width: 88px;
  height: 168px;
  border-radius: 20px;
  padding: 13px 6px 8px;
}

.device-tablet {
  width: 148px;
  height: 192px;
  border-radius: 16px;
  padding: 14px 9px 9px;
}

.device-laptop {
  width: 232px;
  height: 136px;
  border-radius: 10px 10px 3px 3px;
  padding: 8px;
}

/* base do notebook: mais larga que a tela, com entalhe central */
.d-base {
  display: block;
  width: 274px;
  height: 11px;
  margin-top: -8px;
  background: var(--muted);
  border-radius: 2px 2px 12px 12px;
}

.d-base::after {
  content: "";
  display: block;
  width: 40px;
  height: 5px;
  margin: 0 auto;
  background: var(--surface-2);
  border-radius: 0 0 6px 6px;
}

.d-cam {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.d-screen {
  flex: 1;
  min-height: 0;
  background: var(--surface-2);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  overflow: hidden;
}

.s-line {
  display: block;
  width: 72%;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.s-line.short { width: 48%; }

/* linha "atual" com highlight na posição do ORP (~30%) */
.s-line.hl { position: relative; }

.s-line.hl::after {
  content: "";
  position: absolute;
  left: 30%;
  top: -2px;
  height: 8px;
  width: 26%;
  border-radius: 999px;
  background: var(--accent);
}

.d-progress {
  width: 80%;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.d-progress i {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: 999px;
  background: var(--accent);
}

.d-pct {
  font-size: 0.6rem;
  color: var(--accent);
}

/* tablet: split-view biblioteca + leitor */
.d-split {
  flex-direction: row;
  align-items: stretch;
  gap: 7px;
  padding: 7px;
}

.d-list {
  width: 32%;
  border-right: 1px solid var(--line);
  padding: 4px 7px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.d-list i {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

.d-list i:nth-child(2) { background: var(--accent); }

.d-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* mini dashboard — espelha a tela de stats do app (tabs + tiles + chart empilhado) */

.statsviz {
  --book2: hsl(62 66% 42%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.sv-tabs {
  display: flex;
  gap: 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.1rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sv-tab {
  padding-bottom: 0.55rem;
  color: var(--muted);
}

.sv-tab.active {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.sv-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
}

.sv-tile {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sv-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.sv-value {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.15;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  height: 118px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  position: relative;
}

/* barras empilhadas: laranja = livro 1, oliva = livro 2 (paleta do app gira o matiz) */
.chart i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
}

.chart i:nth-of-type(1) { height: 34%; }
.chart i:nth-of-type(2) { height: 55%; background: linear-gradient(to top, var(--accent) 0 68%, var(--book2) 68% 100%); }
.chart i:nth-of-type(3) { height: 42%; }
.chart i:nth-of-type(4) { height: 70%; background: linear-gradient(to top, var(--accent) 0 55%, var(--book2) 55% 100%); }
.chart i:nth-of-type(5) { height: 88%; background: linear-gradient(to top, var(--accent) 0 76%, var(--book2) 76% 100%); }
.chart i:nth-of-type(6) { height: 26%; background: var(--book2); }
.chart i:nth-of-type(7) { height: 61%; background: linear-gradient(to top, var(--accent) 0 80%, var(--book2) 80% 100%); }

/* tooltip do fl_chart */
.c-bubble {
  position: absolute;
  left: 64.3%;
  top: -16px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.62rem;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.c-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--ink);
}

.c-days {
  display: flex;
  gap: 9px;
  margin-top: 6px;
}

.c-days span {
  flex: 1;
  text-align: center;
  font-size: 0.62rem;
  color: var(--muted);
}

/* ---------- screenshots ---------- */

.shots {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0.5rem 0.2rem 1rem;
  scroll-snap-type: x mandatory;
}

.shots figure { scroll-snap-align: start; flex-shrink: 0; }

.shots img {
  height: 430px;
  width: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}

.shots figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- open source ---------- */

.oss {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.oss .section-lead { margin-bottom: 0; }

.oss .cta-row { margin-top: 1.6rem; }

.terminal {
  background: #1C1815;
  color: #EDE6DB;
  border-radius: 14px;
  border: 1px solid #3A322A;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #3A322A;
}

.terminal-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3A322A;
}

.terminal pre {
  padding: 1.1rem 1.2rem;
  font-size: 0.74rem;
  line-height: 1.9;
  overflow-x: auto;
}

.t-dim { color: #A69B8A; }

.t-accent { color: #E55324; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem clamp(1rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-brand img { display: block; }

.footer-links { display: flex; gap: 1.2rem; }

.footer-links a { color: var(--muted); text-decoration: none; }

.footer-links a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .viz-eq i { animation: none; }
  .btn, .card { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .oss { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-flip .split-viz { order: 0; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}

@media (max-width: 560px) {
  .device-row { gap: 1rem; }
  .device-phone { width: 72px; height: 138px; padding: 11px 5px 6px; }
  .device-tablet { width: 114px; height: 152px; padding: 12px 7px 7px; }
  .device-laptop { width: 176px; height: 106px; padding: 6px; }
  .d-base { width: 208px; height: 9px; margin-top: -6px; }
}

@media (max-width: 420px) {
  .d-item:has(.device-tablet) { display: none; }
  /* sem o tablet, some o stub que descia nele */
  .d-net line:nth-child(4) { visibility: hidden; }
}

@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .shots img { height: 340px; }
  .word { font-size: 1.9rem; }
}
