/* ==========================================================================
   Dhotec — Manutenção e Reformas de Máquinas Industriais e de Panificação
   Design system da skill cloudflare-landing-page, com a cor de marca (laranja
   do logo DHOTEC) e um tom de apoio (azul-marinho do "DT") para hero/rodapé.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=Inter:wght@400;500;600&display=swap");

/* ---- tokens: tema claro (padrão) ---- */
:root {
  --brand-h: 28; --brand-s: 78%; --brand-l: 52%;
  --brand: hsl(var(--brand-h) var(--brand-s) var(--brand-l));
  --brand-600: hsl(var(--brand-h) var(--brand-s) 42%);
  --brand-100: hsl(var(--brand-h) 70% 94%);

  /* azul-marinho de apoio, vindo da marca DHOTEC — usado em hero/rodapé/about */
  --navy-h: 219; --navy-s: 58%; --navy-l: 22%;
  --navy: hsl(var(--navy-h) var(--navy-s) var(--navy-l));
  --navy-dark: hsl(var(--navy-h) 60% 10%);

  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --border: #e6e8f0;
  --text: #14161f;
  --text-muted: #5b5f70;
  --shadow: 0 8px 24px -8px rgb(20 22 31 / 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font-heading: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* ---- tokens: tema escuro (sistema, quando não há escolha salva) ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d14;
    --bg-soft: #11141c;
    --surface: #151824;
    --border: #262a3a;
    --text: #eef0f6;
    --text-muted: #9aa0b4;
    --shadow: 0 8px 24px -8px rgb(0 0 0 / 0.5);
  }
}

/* ---- tokens: tema escuro forçado pelo toggle (data-theme="dark") ---- */
:root[data-theme="dark"] {
  --bg: #0b0d14;
  --bg-soft: #11141c;
  --surface: #151824;
  --border: #262a3a;
  --text: #eef0f6;
  --text-muted: #9aa0b4;
  --shadow: 0 8px 24px -8px rgb(0 0 0 / 0.5);
}

/* ---- reset básico ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--text-muted); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section-lead { max-width: 640px; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.eyebrow {
  color: var(--brand); font-weight: 700; text-transform: uppercase; font-size: 0.8rem;
  letter-spacing: 0.06em; margin: 0;
}

.visually-hidden {
  position: absolute; left: -9999px; top: auto;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 100;
}
.visually-hidden:focus { left: 16px; top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.site-header .logo img { height: 40px; width: auto; display: block; }
.site-header .logo strong {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--text);
  letter-spacing: 0.01em;
}
.site-header nav { display: none; gap: 22px; }
@media (min-width: 900px) { .site-header nav { display: flex; } }
.site-header nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--brand); }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* ---- menu mobile (offcanvas) ---- */
.menu-toggle {
  display: inline-flex; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); align-items: center; justify-content: center;
  cursor: pointer;
}
@media (min-width: 900px) { .menu-toggle { display: none; } }
.mobile-nav {
  position: fixed; inset: 0; z-index: 70; background: rgb(0 0 0 / 0.45);
  display: none;
}
.mobile-nav.open { display: block; }
.mobile-nav-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(320px, 84vw);
  background: var(--surface); border-left: 1px solid var(--border);
  padding: 20px; display: flex; flex-direction: column; gap: 18px;
}
.mobile-nav-panel a {
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 1.05rem;
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
.mobile-nav-close {
  align-self: flex-end; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-soft); cursor: pointer;
}

/* ---- botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-size: 0.95rem;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--brand); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---- toggle de tema ---- */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.05rem;
}

/* ---- hero ---- */
.hero {
  padding: 48px 24px 64px;
  display: grid; gap: 40px; align-items: center;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--navy) 6%, var(--bg)), var(--bg) 60%);
}
@media (min-width: 1024px) { .hero { grid-template-columns: 1.05fr 0.95fr; padding: 96px 24px 80px; } }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 700;
  text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.06em; margin-bottom: 14px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; }
.hero-trust span {
  display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.88rem; font-weight: 500;
}
.hero-trust span::before { content: "✓"; color: var(--brand); font-weight: 700; }
.hero-art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.hero-art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgb(11 15 25 / 0.55), transparent 45%);
}
.hero-art-caption {
  position: absolute; left: 18px; bottom: 16px; z-index: 1;
  color: #fff; font-weight: 600; font-size: 0.9rem;
  background: rgb(11 15 25 / 0.55); padding: 8px 14px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---- grid de features/benefícios ---- */
.feature-grid {
  display: grid; gap: 20px; margin: 32px 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.feature-card .icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--brand-100);
  color: var(--brand-600); display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
  font-size: 1.3rem;
}

/* ---- serviços ---- */
.service-grid {
  display: grid; gap: 18px; margin: 32px 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform 150ms ease-out, border-color 150ms ease-out;
}
.service-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.service-card .icon { font-size: 1.6rem; }
.service-card h3 { margin-bottom: 2px; }
.service-card p { margin: 0; font-size: 0.92rem; }
.service-card.highlight {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark)); border-color: transparent;
}
.service-card.highlight h3, .service-card.highlight p { color: #fff; }
.service-card.highlight p { color: rgb(255 255 255 / 0.78); }

/* ---- galeria de trabalhos realizados ---- */
.gallery-grid {
  display: grid; gap: 14px; margin: 32px 0;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1/1;
  box-shadow: var(--shadow); background: var(--bg-soft);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease-out; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item span {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  color: #fff; font-size: 0.78rem; font-weight: 600; padding: 20px 10px 8px;
  background: linear-gradient(0deg, rgb(11 15 25 / 0.82), transparent);
}

/* ---- sobre / técnico ---- */
.about-section {
  display: grid; gap: 32px; align-items: center; margin: 32px 0;
}
@media (min-width: 900px) { .about-section { grid-template-columns: 0.85fr 1.15fr; } }
.about-photo {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/10;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-copy ul { margin: 18px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.about-copy li { display: flex; gap: 10px; color: var(--text-muted); font-size: 0.95rem; }
.about-copy li::before { content: "✓"; color: var(--brand); font-weight: 700; }

/* ---- FAQ (accordion nativo) ---- */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px;
  background: var(--surface); overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 1.25rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 20px 16px; margin: 0; }

/* ---- blog ---- */
.post-grid {
  display: grid; gap: 24px; margin: 32px 0;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.post-card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 150ms ease-out;
}
.post-card:hover { transform: translateY(-2px); }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card-body { padding: 18px; }
.post-card time { color: var(--text-muted); font-size: 0.85rem; }
.post .post-cover { width: 100%; border-radius: var(--radius); margin: 16px 0; aspect-ratio: 16/9; object-fit: cover; }
.post article { max-width: 720px; }
.post article p { color: var(--text); }
.pagination { text-align: center; margin: 32px 0; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--brand); text-decoration: none; font-weight: 600; }

/* ---- CTA band + footer ---- */
.cta-band {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff; border-radius: var(--radius); padding: 48px 32px; text-align: center; margin: 64px auto;
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band .hero-trust { justify-content: center; }
.cta-band .hero-trust span { color: rgb(255 255 255 / 0.9); }
.cta-band .hero-trust span::before { color: #fff; }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); }
.site-footer .container {
  padding: 40px 24px; color: var(--text-muted); font-size: 0.9rem;
  display: grid; gap: 24px;
}
@media (min-width: 768px) { .site-footer .container { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-brand img { height: 34px; width: auto; }
.footer-brand strong { font-family: var(--font-heading); color: var(--text); font-size: 1.05rem; }
.site-footer h4 { font-family: var(--font-heading); color: var(--text); font-size: 0.95rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 24px; text-align: center;
  color: var(--text-muted); font-size: 0.82rem;
}

/* ---- formulário de contato ---- */
.contact-grid { display: grid; gap: 32px; margin-top: 24px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-form { display: grid; gap: 12px; }
.contact-form input, .contact-form textarea {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start;
}
.contact-card a.btn { width: 100%; }
.contact-row { display: flex; gap: 12px; align-items: flex-start; }
.contact-row .icon { font-size: 1.3rem; }
.contact-row strong { display: block; color: var(--text); }
.contact-row span { color: var(--text-muted); font-size: 0.9rem; }

/* ---- widget de chat ---- */
.chat-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 56px; height: 56px; border-radius: 999px; border: none;
  background: var(--brand); color: #fff; box-shadow: var(--shadow); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.chat-panel {
  position: fixed; right: 20px; bottom: 88px; z-index: 50;
  width: min(360px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 140px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel-header { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chat-panel-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { padding: 10px 14px; border-radius: 14px; max-width: 85%; font-size: 0.92rem; }
.chat-msg.user { align-self: flex-end; background: var(--brand); color: #fff; }
.chat-msg.assistant { align-self: flex-start; background: var(--bg-soft); }
.chat-panel-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-panel-form input {
  flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 10px 14px;
  background: var(--bg); color: var(--text); font-family: var(--font-body);
}
.chat-panel-form button {
  border: none; background: var(--brand); color: #fff; border-radius: 999px; width: 40px; cursor: pointer;
}

/* ---- botão flutuante de WhatsApp ---- */
.whatsapp-fab {
  position: fixed; left: 20px; bottom: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff; text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 12px 16px; border-radius: 999px; box-shadow: var(--shadow);
}
.whatsapp-fab svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---- banner de cookies ---- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 640px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: none;
}
.cookie-banner.open { display: block; }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.cookie-banner-panel { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; display: none; }
.cookie-banner-panel.open { display: block; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; gap: 12px; }

/* ---- páginas simples (política, 404) ---- */
.simple-page { padding: 64px 24px 80px; max-width: 760px; }
.simple-page h1 { margin-bottom: 8px; }
.simple-page h2 { margin-top: 2em; font-size: 1.3rem; }
.simple-page .updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2em; }
.not-found { text-align: center; padding: 120px 24px; }
.not-found .code { font-family: var(--font-heading); font-size: 5rem; color: var(--brand); margin: 0; }
