/* Castilho - estilo das páginas da plataforma (início, Food, cadastro, área da plataforma)
   Layout: faixas de largura total com conteúdo centralizado (máx. 1120px); cartões só onde há um objeto (restaurante, serviço).
   Identidade: tinta grafite + um destaque por serviço (Food = laranja de brasa; Portfólios = violeta). */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #14161c;
  --ink-2: #2a2e38;
  --muted: #5c6370;
  --line: #e1e4ea;
  --soft: #eceef2;
  --food: #ff6b2c;
  --food-deep: #d94d12;
  --food-soft: #fff0e8;
  --port: #6d5ce8;
  --port-soft: #efecff;
  --ok: #157a46; --ok-bg: #e2f4ea;
  --warn: #8a5a00; --warn-bg: #fff3d6;
  --bad: #b8332a; --bad-bg: #fde8e6;
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ink); }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--food); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- topo ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(20, 22, 28, .96); color: #fff; backdrop-filter: blur(8px); }
.nav .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #fff; color: var(--ink); font-size: 18px; font-weight: 900; }
.brand small { font-family: var(--f-body); font-weight: 700; font-size: 13px; color: var(--food); letter-spacing: 0; }
.nav-links { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 8px; color: #d6d9e0; }
.nav-links a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; text-decoration: none; background: none; white-space: nowrap; transition: transform .12s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-food { background: var(--food); color: #fff; }
.btn-food:hover { background: var(--food-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-line { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); }
.btn-whats { background: #1fa855; color: #fff; }
.btn-whats:hover { background: #178a45; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- abertura ---------- */
.hero { background: var(--ink); color: #fff; padding-block: 64px 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; background: radial-gradient(closest-side, rgba(255, 107, 44, .35), transparent); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--food); }
.hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 800; max-width: 17ch; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: #c9cdd6; max-width: 58ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---------- seções ---------- */
.section { padding-block: 64px; }
.section.alt { background: var(--card); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 64ch; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); }

/* serviços (página do Castilho) */
.services { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.service { display: grid; gap: 14px; align-content: start; padding: 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-decoration: none; position: relative; }
.service:hover { border-color: var(--ink); }
.service .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; }
.service.food .icon { background: var(--food-soft); }
.service.port .icon { background: var(--port-soft); }
.service h3 { font-size: 26px; font-weight: 800; }
.service p { margin: 0; color: var(--muted); }
.service .go { font-weight: 700; color: var(--food); }
.service.soon { cursor: default; }
.service.soon .go { color: var(--port); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.pill.on { background: var(--ok-bg); color: var(--ok); }
.pill.soon { background: var(--port-soft); color: var(--port); }
.pill.pend { background: var(--warn-bg); color: var(--warn); }
.pill.off { background: var(--bad-bg); color: var(--bad); }
.service .pill { position: absolute; top: 22px; right: 22px; }

/* recursos (Food) */
.features { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.feature { background: var(--card); padding: 22px; display: grid; gap: 6px; align-content: start; }
.feature b { font-size: 17px; }
.feature span { color: var(--muted); font-size: 15px; }
.feature i { font-style: normal; font-size: 22px; }
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: st; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: st; display: grid; gap: 6px; }
.steps li::before { content: counter(st); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-family: var(--f-display); }
.steps b { font-size: 17px; }
.steps span { color: var(--muted); font-size: 15px; }

/* lista de restaurantes */
.search { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.search input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 16px; }
.search input:focus { outline: none; border-color: var(--ink); }
.rest-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.rest { display: grid; grid-template-rows: auto 1fr; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.rest:hover { border-color: var(--ink); }
.rest-cover { aspect-ratio: 16 / 7; background: var(--soft) center / cover no-repeat; position: relative; max-width: 100%; }
.rest-logo { position: absolute; left: 16px; bottom: -26px; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: #fff; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.rest-body { padding: 34px 16px 16px; display: grid; gap: 2px; align-content: start; }
.rest-body b { font-size: 17px; }
.rest-body small { color: var(--muted); font-weight: 600; }
.rest-body p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.empty-box { padding: 32px 20px; text-align: center; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--muted); background: var(--card); }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 600; margin-bottom: 18px; }

/* contato */
.contact { background: var(--ink); color: #fff; border-radius: 22px; padding: 32px; display: grid; gap: 14px; grid-template-columns: 1fr auto; align-items: center; }
.contact h2 { font-size: clamp(24px, 3.4vw, 32px); }
.contact p { margin: 0; color: #c9cdd6; }
@media (max-width: 700px) { .contact { grid-template-columns: 1fr; } }
.footer { padding-block: 28px 40px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; }

/* ---------- formulários (cadastro / plataforma) ---------- */
.form-page { padding-block: 32px 80px; }
.form-head { display: grid; gap: 6px; margin-bottom: 20px; }
.form-head h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; }
.form-head p { margin: 0; color: var(--muted); }
.fcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 16px; margin-bottom: 16px; }
.fcard h2 { font-size: 20px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.fcard h2 .n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-family: var(--f-body); }
.fcard > p { margin: -8px 0 0; color: var(--muted); font-size: 14px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field > .lbl { font-weight: 700; font-size: 14px; }
.field .opt { color: var(--muted); font-weight: 500; }
.field small { color: var(--muted); font-size: 13px; }
.field small.ok { color: var(--ok); font-weight: 600; }
.field small.bad { color: var(--bad); font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"], .field input[type="url"], .field input[type="number"], .field textarea, .field select {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.field input.invalid { border-color: var(--bad); background: var(--bad-bg); }
.field input[type="color"] { width: 100%; height: 46px; padding: 4px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.slug-row { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.slug-row:focus-within { border-color: var(--ink); }
.slug-row span { display: flex; align-items: center; padding: 0 10px; background: var(--soft); color: var(--muted); font-size: 14px; white-space: nowrap; }
.slug-row input { border: 0 !important; min-height: 44px !important; border-radius: 0 !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.check small { display: block; color: var(--muted); font-weight: 500; }
.img-up { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.img-up .prev { width: 76px; height: 76px; border-radius: 14px; background: var(--soft) center / cover no-repeat; border: 1px solid var(--line); flex: none; }
.img-up .prev.wide { width: 150px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-error { padding: 12px 14px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-weight: 600; margin: 0; }
.submit-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.done-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 14px; }
.done-card h2 { font-size: 30px; font-weight: 800; }
.done-card ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.linkbox { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--soft); padding: 10px 12px; border-radius: 10px; word-break: break-all; }

/* ---------- área da plataforma ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; }
.kpi span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi b { font-family: var(--f-display); font-size: 30px; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 14px; font-weight: 600; font-size: 14px; }
.chips button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pf-list { display: grid; gap: 12px; }
.pf { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; grid-template-columns: 64px 1fr; gap: 14px; }
.pf-logo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--soft); border: 1px solid var(--line); }
.pf-main { display: grid; gap: 8px; min-width: 0; }
.pf-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-top b { font-size: 18px; }
.pf-meta { display: grid; gap: 2px 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); font-size: 14px; color: var(--muted); }
.pf-meta span b { color: var(--ink); font-weight: 600; }
.pf-meta a { color: var(--ink); }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.login-box { max-width: 400px; margin: 48px auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: grid; gap: 14px; }
.login-box h1 { font-size: 26px; font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; font-weight: 600;
  padding: 12px 18px; border-radius: 12px; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
