/* Automações para pequenos negócios. Fonts are kept with the site (SIL Open Font License,
   see the OFL files next to them); nothing is loaded from other domains. */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); }

:root {
  --bg: #F4EFE3;
  --surface: #FFFCF5;
  --surface-2: #F9F4E8;
  --ink: #0B1220;
  --muted: #4B5468;
  --line: #DCD3BF;
  --gold: #85560A;
  --gold-mark: #C28A2B;
  --btn: #0B1220;
  --btn-ink: #F4EFE3;
  --ok: #2B6A3C;
  --warn: #8A5400;
  --err: #A1271B;
  --mark: #F7E7C2;
  --sheet-head: #E5EEE3;
  --focus: #C28A2B;
  --excel: #2E7D4F; --outlook: #1F5FA8; --teams: #5B5FC7; --flow: #2F6FD6; --apps: #8F3E8B;
  --bookings: #13777A; --forms: #087F6E; --person: #6A6458; --trigger: #6A6458;
  --sharepoint: #03787C; --onedrive: #0F5F9E;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1220; --surface: #121B2E; --surface-2: #17213A; --ink: #EEE8DB; --muted: #AAB3C5; --line: #2A3754;
    --gold: #E8B04B; --gold-mark: #E8B04B; --btn: #E8B04B; --btn-ink: #0B1220;
    --ok: #7FC896; --warn: #F0BE5E; --err: #F29489; --mark: #3A3220; --sheet-head: #1C2B26; --focus: #E8B04B;
    --excel: #6FC394; --outlook: #7FB0EE; --teams: #A3A6F2; --flow: #86AEF2; --apps: #D99AD5;
    --bookings: #6CC9CB; --forms: #62CDBB; --person: #B9B2A4; --trigger: #B9B2A4;
    --sharepoint: #6CC6C9; --onedrive: #8CC2F0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1220; --surface: #121B2E; --surface-2: #17213A; --ink: #EEE8DB; --muted: #AAB3C5; --line: #2A3754;
  --gold: #E8B04B; --gold-mark: #E8B04B; --btn: #E8B04B; --btn-ink: #0B1220;
  --ok: #7FC896; --warn: #F0BE5E; --err: #F29489; --mark: #3A3220; --sheet-head: #1C2B26; --focus: #E8B04B;
  --excel: #6FC394; --outlook: #7FB0EE; --teams: #A3A6F2; --flow: #86AEF2; --apps: #D99AD5;
  --bookings: #6CC9CB; --forms: #62CDBB; --person: #B9B2A4; --trigger: #B9B2A4;
  --sharepoint: #6CC6C9; --onedrive: #8CC2F0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.1; letter-spacing: 0; }
h3, h4 { line-height: 1.25; }
a { color: var(--gold); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--btn); color: var(--btn-ink); padding: 10px 14px; border-radius: 8px; z-index: 10; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 6px; flex-wrap: wrap; }
.brand { margin: 0; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: url("../img/qpc-mark.svg") center / cover no-repeat; flex: none; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.toolbar select { min-height: 40px; width: auto; }
.intro { padding-top: 18px; padding-bottom: 26px; }
.intro h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 12px; }
.lead { font-size: 1.08rem; max-width: 70ch; margin: 0 0 10px; }
.notice { display: inline-block; margin: 6px 0 0; padding: 6px 12px; border: 1px dashed var(--gold-mark); border-radius: 999px; color: var(--muted); font-size: .92rem; }

/* controls */
button, select, input, textarea { font: inherit; color: inherit; }
select, input[type="number"], input[type="date"], textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 44px; width: 100%;
}
select:hover, input:hover, textarea:hover { border-color: var(--muted); }
textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.mono, code, pre { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); padding: 8px 26px; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; }

/* tabs */
main { padding: 22px 0 56px; }
main:focus { outline: none; }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.tabs [role="tab"] {
  text-align: left; display: grid; gap: 2px; padding: 12px 14px; min-height: 64px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-bottom-width: 3px;
}
.tabs [role="tab"]:hover { border-color: var(--muted); }
.tabs [role="tab"][aria-selected="true"] { border-color: var(--gold-mark); border-bottom-color: var(--gold-mark); background: var(--surface-2); }
.tab-sector { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tab-title { font-weight: 650; font-size: 1.02rem; }

/* one demonstration */
.panel:focus-visible { outline-offset: 6px; }
.demo-head { max-width: 860px; margin-bottom: 18px; }
.sector { margin: 0 0 4px; color: var(--gold); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; }
.demo-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 0 0 10px; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.demo-main, .demo-side { min-width: 0; }
.demo-side { display: grid; gap: 16px; position: sticky; top: 16px; }

.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .93rem; }
.hint { margin: 0; color: var(--muted); font-size: .86rem; }
.actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
.with-suffix { display: flex; align-items: center; gap: 8px; }
.with-suffix input { max-width: 140px; }
.range { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.range input { flex: 1; accent-color: var(--gold-mark); min-width: 0; }
.range output { min-width: 5.5ch; font-weight: 650; text-align: right; }
.run-summary { min-height: 1.5em; margin: 14px 2px 6px; font-weight: 600; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 104px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.placeholder { padding: 22px 16px 22px 128px; color: var(--muted); }
.step { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; padding: 8px 0; position: relative; }
.step::before { content: ""; position: absolute; left: 99px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c, var(--muted)); }
.step-when { text-align: right; padding-top: 12px; display: grid; align-content: start; line-height: 1.25; }
.step-day { font-size: .84rem; color: var(--muted); }
.step-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--muted)); border-radius: var(--radius); padding: 10px 14px 12px; min-width: 0; }
.step-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.actor { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c, var(--muted)); }
.badge { font-size: .76rem; font-weight: 650; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.step-text { margin: 0; }
.step.is-cancelled .step-text, .step.is-skipped .step-text, .step.is-expired .step-text { color: var(--muted); }
.step.is-cancelled .badge, .step.is-skipped .badge, .step.is-expired .badge, .step.is-wait .badge { color: var(--muted); }
.step.is-warn .badge, .step.is-draft .badge { color: var(--warn); }
.step.is-error .badge { color: var(--err); }
.step.is-error .step-card { border-color: var(--err); }
.step.is-warn .step-card { border-right: 1px solid var(--warn); }
.actor-excel { --c: var(--excel); } .actor-outlook { --c: var(--outlook); } .actor-teams { --c: var(--teams); }
.actor-flow { --c: var(--flow); } .actor-app { --c: var(--apps); } .actor-bookings { --c: var(--bookings); }
.actor-forms { --c: var(--forms); } .actor-sharepoint { --c: var(--sharepoint); } .actor-onedrive { --c: var(--onedrive); } .actor-person { --c: var(--person); } .actor-trigger { --c: var(--trigger); }
.step.enter { animation: rise .32s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step.enter { animation: none; } }

/* cards inside steps */
.card { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.cards { display: grid; gap: 10px; }
.cards > .card { margin-top: 10px; }
.email-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.email-head dt { color: var(--muted); }
.email-head dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.email-subject { font-weight: 650; }
.attachment { margin: 8px 12px 0; display: inline-flex; gap: 8px; align-items: center; font-size: .88rem; overflow-wrap: anywhere; }
.clip { font-size: .7rem; font-weight: 700; color: var(--err); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.email-body { padding: 4px 12px 10px; }
.email-body p { margin: 6px 0; }
.email-buttons { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 12px; margin: 0; }
.fake-btn { display: inline-block; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--outlook); color: var(--outlook); font-weight: 600; font-size: .88rem; }
.chat { display: flex; gap: 10px; padding: 10px 12px; align-items: flex-start; }
.chat.urgent { border-color: var(--warn); }
.chat-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--teams); color: var(--surface); display: grid; place-items: center; font-weight: 700; flex: none; font-size: .9rem; }
.chat-from { margin: 0; font-weight: 650; font-size: .88rem; }
.chat-text { margin: 2px 0 0; }
.sheet { padding: 0; overflow: hidden; }
.sheet-title { margin: 0; padding: 8px 12px; font-weight: 650; font-size: .88rem; border-bottom: 1px solid var(--line); }
.sheet-scroll { overflow-x: auto; }
.sheet table { border-collapse: collapse; width: 100%; font-size: .85rem; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sheet th { background: var(--sheet-head); font-weight: 650; }
.sheet .num { text-align: right; }
.sheet tr.marked td { background: var(--mark); }
.sheet tbody tr:last-child td { border-bottom: 0; }
.kv dl { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 4px 12px; margin: 0; padding: 10px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd.strong { font-weight: 700; }
.checks { list-style: none; padding: 8px 12px; margin-top: 10px; display: grid; gap: 4px; font-size: .92rem; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; }
.check-mark { font-weight: 800; text-align: center; }
.check-ok .check-mark { color: var(--ok); }
.check-warning .check-mark { color: var(--warn); }
.check-error .check-mark { color: var(--err); }
.code { margin: 10px 0 0; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; }

/* side column */
.demo-side > .card, .demo-side > div > .card { margin-top: 0; background: var(--surface); }
.estimate { background: var(--surface); border: 1px solid var(--gold-mark); border-radius: var(--radius); padding: 14px 16px; }
.estimate h3 { margin: 0 0 10px; font-size: 1.05rem; }
.estimate-fields { display: grid; gap: 10px; margin-bottom: 10px; }
.estimate-big { font-size: 1.5rem; font-weight: 700; margin: 6px 0 2px; color: var(--gold); }
.estimate-line { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.estimate-why p { margin: 0 0 8px; font-size: .92rem; }
.estimate-note { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }

/* how it is built */
.howto { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.howto h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 2rem; margin: 0 0 14px; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
.how-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.how-block h4 { margin: 0 0 8px; font-size: 1rem; color: var(--gold); }
.how-block p { margin: 0 0 8px; }
.how-block p:last-child { margin-bottom: 0; }
.how-steps { grid-column: 1 / -1; }
.how-steps ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 40px; }
.how-steps li { break-inside: avoid; margin-bottom: 8px; }
.how-google { grid-column: 1 / -1; }
ul.tools { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
ul.tools li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .9rem; background: var(--surface-2); }
.how-legal { border-color: var(--gold-mark); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 20px 0 90px; color: var(--muted); font-size: .9rem; }
.foot p { margin: 0 0 6px; max-width: 80ch; }

/* narrow screens */
@media (max-width: 1080px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .demo-side { position: static; }
}
@media (max-width: 760px) {
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls { grid-template-columns: minmax(0, 1fr); }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .how-steps ol { columns: 1; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .timeline::before { left: 7px; }
  .placeholder { padding-left: 28px; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-left: 28px; }
  .step::before { left: 2px; top: 4px; }
  .step-when { text-align: left; padding-top: 0; display: flex; gap: 8px; align-items: baseline; }
  .tabs [role="tab"] { padding: 10px; }
  .tab-title { font-size: .95rem; }
  .kv dl { grid-template-columns: minmax(0, 1fr); }
  .kv dd { margin-bottom: 6px; }
}
@media print {
  .toolbar, .tabs, .controls, .skip { display: none; }
  .panel[hidden] { display: block; }
}
