/* ============================================================
   Aniceto Elétrica — style.css
   Dark mode, mobile-first, paleta azul escuro + laranja acento.
   ============================================================ */

/* ===== TOKENS DE DESIGN (edite aqui para mudar a identidade) ===== */
:root {
  --bg:           #0A1628;   /* fundo base */
  --surface:      #102A43;   /* cards e superfícies */
  --surface-2:    #16365A;   /* superfícies elevadas */
  --border:       #1E3A5F;
  --text:         #E6EEF8;
  --text-dim:     #9FB3C8;
  --accent:       #FF6B1A;   /* laranja forte */
  --accent-2:     #F97316;   /* laranja secundário */
  --accent-soft:  rgba(255, 107, 26, 0.12);

  --radius:       14px;
  --radius-lg:    20px;
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --shadow:       0 10px 30px rgba(0,0,0,0.35);
  --shadow-lg:    0 25px 60px rgba(0,0,0,0.5);

  --container:    1180px;
}

/* ===== RESET LEVE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: 'Sora', 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem 0;
  backdrop-filter: blur(10px);
  background: rgba(10, 22, 40, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.header.scrolled {
  border-color: var(--border);
  background: rgba(10, 22, 40, 0.92);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.logo svg { color: var(--accent); }
.nav { display: none; gap: 1.75rem; }
.nav a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}
.nav a:hover { color: var(--text); }
@media (min-width: 820px) { .nav { display: flex; } }

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease);
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 107, 26, 0.3);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 36px rgba(255, 107, 26, 0.45); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 107, 26, 0.18), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(22, 54, 90, 0.6), transparent 55%);
  z-index: 0;
  will-change: transform;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 26, 0.3);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.8s var(--ease) 0.1s forwards;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  animation: fadeUp 0.9s var(--ease) 0.25s forwards;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 620px;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s var(--ease) 0.4s forwards;
}
.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s var(--ease) 0.55s forwards;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Mini ilustração / glow no canto */
.hero-glow {
  position: absolute;
  right: -10%;
  top: 20%;
  width: 60vw;
  max-width: 700px;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,107,26,0.18) 0%, transparent 60%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== SEÇÕES ===== */
section {
  padding: 5rem 0;
  position: relative;
}
.section-head {
  max-width: 720px;
  margin-bottom: 3rem;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.section-head .eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* ===== SOBRE ===== */
.sobre-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .sobre-grid { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stat .num {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.stat .label { font-size: 0.85rem; color: var(--text-dim); }

/* ===== GRID DE CARDS ===== */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow);
  border-color: rgba(255, 107, 26, 0.4);
}
.card .icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.95rem; margin: 0; }

/* ===== OBRAS ===== */
.obras-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .obras-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .obras-grid { grid-template-columns: repeat(6, 1fr); } }

.obra-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
@media (min-width: 1020px) {
  .obra-card { grid-column: span 2; }
  .obra-card.destaque { grid-column: span 4; grid-row: span 2; aspect-ratio: 16/10; }
}
.obra-card:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-lg); }
.obra-card .img-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
}
.obra-card .img-wrap::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,0.95) 0%, rgba(10,22,40,0.3) 50%, transparent 100%);
}
.obra-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.obra-card:hover img { transform: scale(1.08); }
.obra-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}
.obra-placeholder svg { color: var(--accent); margin-bottom: 0.5rem; }
.obra-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.5rem;
  z-index: 1;
}
.obra-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.obra-info h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.obra-card.destaque .obra-info h3 { font-size: 1.6rem; }
.obra-info p { font-size: 0.88rem; color: var(--text-dim); margin: 0; }

/* ===== DEPOIMENTOS ===== */
.depo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}
.depo-card::before {
  content: "“";
  position: absolute;
  top: -10px; left: 20px;
  font-size: 4rem;
  color: var(--accent);
  font-family: serif;
  line-height: 1;
}
.depo-card .texto {
  font-style: italic;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.depo-autor { font-weight: 600; font-size: 0.95rem; }
.depo-cargo { font-size: 0.82rem; color: var(--text-dim); }

/* ===== CONTATO ===== */
.contato {
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,107,26,0.12), transparent 60%),
    var(--bg);
  padding: 6rem 0;
}
.contato-card {
  max-width: 720px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
}
.contato-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.contato-info {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.contato-info span { display: inline-flex; align-items: center; gap: 0.5rem; }
.contato-info svg { color: var(--accent); }

/* ===== RODAPÉ ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ===== ANIMAÇÃO DE ENTRADA NO SCROLL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* ===== BOTÃO FLUTUANTE WHATSAPP ===== */
.fab-whats {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 40;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s var(--ease);
}
.fab-whats:hover { transform: scale(1.1); }

/* ============================================================
   ADMIN — estilos da página admin.html
   ============================================================ */
.admin-shell {
  min-height: 100vh;
  padding: 2rem 0;
}
.admin-login {
  max-width: 420px;
  margin: 10vh auto;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.admin-login h1 { font-size: 1.6rem; }
.admin-login input {
  width: 100%;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.admin-login input:focus { outline: none; border-color: var(--accent); }
.admin-login .err { color: #ff6b6b; font-size: 0.85rem; min-height: 1.2em; }

.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.admin-tabs button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.admin-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeUp 0.4s var(--ease) forwards; }

.field {
  display: flex; flex-direction: column;
  margin-bottom: 1rem;
}
.field label { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.4rem; }
.field input, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 80px; }

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.admin-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.admin-card-head h4 { margin: 0; font-size: 1rem; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn.danger:hover { color: #ff6b6b; border-color: #ff6b6b; }

.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.toast {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
