/*
 * Oratyo · site
 * Cores da paleta do app (core/uitoolkit/theme/Color.kt). O coral fica reservado à marca, aos links e ao
 * microfone; o resto é tinta escura sobre creme. Nunito (a fonte do app) nos títulos; texto corrido na
 * fonte do sistema.
 */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-2: #f8ebe1;
  --ink: #231a15;
  --ink-2: #52443c;
  --muted: #8d7a6f;
  --line: #ead9cd;
  --coral: #c8512b;
  --coral-ink: #a8401d;
  --coral-soft: #ffdbce;
  --on-coral: #ffffff;
  --teal: #1f7a65;
  --teal-soft: #d8f3ea;
  --gold: #9a6a00;
  --gold-soft: #fff1cc;

  --font-display: "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 70rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a120e;
    --surface: #231a15;
    --surface-2: #322824;
    --ink: #f8ebe1;
    --ink-2: #d7c2b8;
    --muted: #a08d84;
    --line: #3d332e;
    --coral: #ffb59c;
    --coral-ink: #ffdbce;
    --coral-soft: #5c1900;
    --on-coral: #3a0b00;
    --teal: #86d6be;
    --teal-soft: #00382d;
    --gold: #ffc94a;
    --gold-soft: #402d00;
  }
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--coral); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--coral-ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; padding: .05em .3em; border-radius: .3em; background: var(--surface-2); }

.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; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--surface); padding: .6rem .9rem; border-radius: .5rem; }
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

/* ---------- Cabeçalho ---------- */

header.site { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font: 800 1.25rem/1 var(--font-display); }
.brand:hover { color: var(--ink); }
.brand img { width: 2rem; height: 2rem; }
nav.primary { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
nav.primary a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
nav.primary a:hover { color: var(--ink); text-decoration: underline; }
nav.primary .lang { font-weight: 600; color: var(--ink); padding-left: 1.5rem; border-left: 1px solid var(--line); }
@media (max-width: 40rem) { nav.primary a:not(.lang) { display: none; } nav.primary .lang { border: 0; padding: 0; } }

/* ---------- Abertura ---------- */

.intro { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.intro h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 0 0 1.5rem; max-width: 16ch; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--ink-2); max-width: 34rem; margin-bottom: 1.75rem; }
.launch { max-width: 34rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--ink-2); margin: 0; }
.launch strong { color: var(--ink); font-weight: 600; }
@media (max-width: 52rem) { .intro-grid { grid-template-columns: 1fr; } .phone { justify-self: center; } }

/* Aparelho com a tela do app */
.phone {
  width: 20rem;
  max-width: 100%;
  margin: 0;
  padding: .55rem;
  border-radius: 2.4rem;
  background: #2b2320;
  box-shadow: 0 30px 60px -30px rgba(35, 26, 21, .45);
}
.status-bar { display: flex; justify-content: space-between; align-items: center; padding: .45rem 1.1rem .35rem; color: #f8ebe1; font: 600 .72rem/1 var(--font-body); }
.status-bar .icons { display: flex; gap: .25rem; }
.status-bar .icons i { width: .7rem; height: .45rem; border-radius: 1px; background: #f8ebe1; opacity: .85; }
.screen { border-radius: 1.95rem; background: var(--bg); padding: 1rem .9rem 1.1rem; min-height: 27rem; display: flex; flex-direction: column; }
.crumb { font-size: .75rem; color: var(--muted); margin: 0 0 1rem; }
.mentor { display: flex; gap: .55rem; align-items: flex-end; margin-bottom: 1.1rem; }
.mentor img { width: 2.8rem; height: 2.8rem; flex: none; }
.bubble { margin: 0; padding: .75rem .9rem; border-radius: 1rem 1rem 1rem .25rem; background: var(--surface); border: 1px solid var(--line); font: 700 .92rem/1.4 var(--font-display); }
.listening { padding: .8rem; border-radius: .9rem; background: var(--surface); border: 1px solid var(--line); }
.listening-title { margin: 0 0 .6rem; font-size: .75rem; color: var(--muted); }
.slot { margin: 0 0 .45rem; min-height: 2.1rem; padding: .45rem .6rem; border-radius: .55rem; border: 1.5px dashed var(--line); font-size: .82rem; line-height: 1.35; }
.slot:last-child { margin-bottom: 0; }
.slot.done { border: 0; background: var(--teal-soft); color: var(--ink); }
.slot.done code { background: transparent; padding: 0; }
.mic-row { margin-top: auto; padding-top: 1.25rem; display: flex; flex-direction: column; align-items: center; gap: .55rem; font-size: .78rem; color: var(--muted); }
.mic { width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--coral); color: var(--on-coral); display: grid; place-items: center; box-shadow: 0 0 0 .45rem var(--coral-soft); }
.mic svg { width: 1.5rem; height: 1.5rem; }

/* ---------- Seções ---------- */

.row { padding: clamp(3rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
.row-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 4rem); }
.row h2 { font-size: 1.45rem; line-height: 1.25; margin: 0; }
.row-body { max-width: 46rem; color: var(--ink-2); }
.row-body strong { color: var(--ink); font-weight: 600; }
.row-body.split { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 52rem) {
  .row-grid { grid-template-columns: 1fr; }
  .row-body.split { grid-template-columns: 1fr; }
}

ol.plain { margin: 0 0 1.25rem; padding-left: 1.25rem; }
ol.plain li { margin-bottom: .6rem; padding-left: .25rem; }
ol.plain li::marker { color: var(--coral); font-weight: 700; }

/* Resultado de exemplo */
.card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem; }
.result-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .8rem; }
.result-head span { font-size: .85rem; color: var(--muted); }
.score { margin: 0; font: 800 2.1rem/1 var(--font-display); color: var(--teal); }
.score small { font-size: 1rem; color: var(--muted); }
.points { list-style: none; margin: 0 0 1rem; padding: 0; font-size: .9rem; line-height: 1.35; color: var(--ink); }
.points li { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.points li span { padding-left: 1.5rem; position: relative; }
.points li span::before { content: ""; position: absolute; left: 0; top: .1rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.points em { font-style: normal; font-size: .78rem; color: var(--teal); white-space: nowrap; }
.points li.hidden-bonus span { color: var(--muted); }
.points li.hidden-bonus span::before { background: transparent; border: 1.5px dashed var(--gold); }
.points li.hidden-bonus em { color: var(--gold); }
.replay { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: .7rem; background: var(--surface-2); font-size: .85rem; color: var(--ink); }
.replay small { margin-left: auto; color: var(--muted); }
.play { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--coral); display: grid; place-items: center; }
.play::after { content: ""; margin-left: .12rem; border-left: .5rem solid var(--on-coral); border-block: .3rem solid transparent; }
figcaption { margin-top: .85rem; font-size: .8rem; color: var(--muted); }

/* Lista de recursos */
.defs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; }
.defs dt { font-weight: 600; color: var(--ink); margin-bottom: .2rem; }
.defs dd { margin: 0; }
@media (max-width: 40rem) { .defs { grid-template-columns: 1fr; } }

.tag { display: inline-block; font-size: .85rem; color: var(--muted); }
.tag.on { color: var(--teal); font-weight: 600; }

.prose p:last-child { margin-bottom: 0; }

/* Perguntas frequentes */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; color: var(--ink); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font: 400 1.4rem/1 var(--font-body); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1.1rem; }

/* ---------- Rodapé ---------- */

footer.site { padding: 2rem 0 2.5rem; color: var(--muted); font-size: .88rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Tabelas (início e páginas legais) ---------- */

.table { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.5; color: var(--ink); }
th, td { text-align: left; vertical-align: top; padding: .65rem .9rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ---------- Páginas legais ---------- */

.legal { width: min(100% - 2.5rem, 48rem); margin: clamp(2rem, 5vw, 3.5rem) auto clamp(3rem, 6vw, 4.5rem); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.12; margin: 0 0 1.5rem; }
.legal h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.5rem 0 .75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.legal h3 { font-size: 1.08rem; margin: 1.75rem 0 .5rem; scroll-margin-top: 1rem; }
.legal ul, .legal ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.legal li { margin-bottom: .4rem; }
.legal li::marker { color: var(--muted); }
.legal strong { font-weight: 600; }
.legal blockquote { margin: 1.25rem 0; padding: .9rem 1.1rem; background: var(--surface-2); border-left: 3px solid var(--gold); }
.legal blockquote p:last-child { margin-bottom: 0; }

.toc { margin: 0 0 1.5rem; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; }
.toc summary { cursor: pointer; font-weight: 600; }
.toc ol { margin: .7rem 0 0; padding-left: 0; list-style: none; columns: 2 15rem; column-gap: 2rem; font-size: .95rem; }
.toc li { break-inside: avoid; margin-bottom: .3rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--coral); text-decoration: underline; }

.legal .steps { counter-reset: step; padding-left: 0; list-style: none; }
.legal .steps > li { counter-increment: step; position: relative; padding-left: 2.4rem; margin-bottom: 1rem; }
.legal .steps > li::before { content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1.5px solid var(--coral); color: var(--coral); font: 700 .85rem/1.45rem var(--font-body); text-align: center; }

.notfound { text-align: center; padding: clamp(4rem, 10vw, 7rem) 0; }
.notfound img { width: 7rem; margin: 0 auto 1.5rem; }
.notfound h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 .75rem; }
.notfound p { color: var(--ink-2); }

@media print {
  header.site, footer.site, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- Jornada, nota do Ora e fechamento ---------- */

.journey { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.journey li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3.25rem; }
.journey li:last-child { padding-bottom: 0; }
.journey li::before {
  content: counter(step);
  position: absolute; left: 0; top: .1rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 1.5px solid var(--coral); color: var(--coral);
  font: 800 .95rem/1.85rem var(--font-display); text-align: center;
  background: var(--bg);
}
.journey li:not(:last-child)::after { content: ""; position: absolute; left: .95rem; top: 2.4rem; bottom: .35rem; width: 1.5px; background: var(--line); }
.journey h3 { font-size: 1.2rem; line-height: 1.3; margin: .15rem 0 .4rem; }
.journey p { margin: 0; }

.ora-note { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.ora-note img { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--coral-soft); }
.ora-note p { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; line-height: 1.55; color: var(--ink); }
.ora-note p:last-child { margin-bottom: 0; }

.closing { padding: clamp(3rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
.closing p:first-child { font: 800 clamp(1.5rem, 3vw, 2rem)/1.25 var(--font-display); color: var(--ink); max-width: 30ch; margin-bottom: 1.25rem; }
