/* ==========================================================
   Kas Energy - Static site styles
   Design tokens mirror src/index.css from the React version
   ========================================================== */

:root {
  --background: hsl(216, 33%, 97%);
  --foreground: hsl(217, 76%, 10%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(217, 76%, 10%);
  --primary: hsl(214, 70%, 14%);
  --primary-foreground: hsl(216, 33%, 97%);
  --muted: hsl(216, 20%, 94%);
  --muted-foreground: hsl(215, 16%, 47%);
  --accent: hsl(42, 52%, 54%);
  --accent-foreground: hsl(0, 0%, 100%);
  --border: hsl(220, 13%, 91%);
  --radius: 0.5rem;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Sora', 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) { .container { padding: 0 2rem; } }

.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }

.bg-primary { background: var(--primary); color: var(--primary-foreground); }
.bg-card { background: var(--card); }
.bg-background { background: var(--background); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 2rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
  white-space: nowrap;
}
.btn-accent { background: var(--accent); color: var(--accent-foreground); }
.btn-accent:hover { background: hsl(42, 52%, 48%); }
.btn-outline {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid hsla(0,0%,100%,0.3);
}
.btn-outline:hover { background: var(--primary-foreground); color: var(--primary); }
.btn-sm { height: 2.75rem; padding: 0 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: hsla(0,0%,100%,0.95);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
@media (min-width: 768px) { .header-inner { height: 5rem; } }
.logo img { height: 40px; }
@media (min-width: 768px) { .logo img { height: 60px; } }

.nav-desktop { display: none; align-items: center; gap: 2rem; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-desktop a { font-size: 0.875rem; font-weight: 500; transition: color .15s; }
.nav-desktop a:hover, .nav-desktop a.active { color: var(--accent); }

.nav-toggle { display: block; color: var(--foreground); }
@media (min-width: 768px) { .nav-toggle { display: none; } }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.nav-mobile.open { display: block; }
.nav-mobile nav { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem 0; }
.nav-mobile a { font-size: 0.875rem; font-weight: 500; }
.nav-mobile a.active { color: var(--accent); }
@media (min-width: 768px) { .nav-mobile { display: none !important; } }

/* ---------- Hero (Home) ---------- */
.hero {
  position: relative;
  color: var(--primary-foreground);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../images/hero-solar.jpg');
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, hsla(214,70%,14%,0.95), hsla(214,70%,14%,0.85), hsla(214,70%,14%,0.7));
}
.hero-content { position: relative; z-index: 1; padding: 6rem 0; max-width: 48rem; }
@media (min-width: 768px) { .hero-content { padding: 8rem 0; } }
@media (min-width: 1024px) { .hero-content { padding: 10rem 0; } }
.hero-content h1 {
  font-size: 1.875rem; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .hero-content h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero-content h1 { font-size: 3.75rem; } }
.hero-content p {
  margin-top: 1.5rem; font-size: 1.125rem; opacity: 0.8; max-width: 42rem;
}
@media (min-width: 768px) { .hero-content p { font-size: 1.25rem; } }
.hero-ctas {
  margin-top: 2.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
@media (min-width: 640px) { .hero-ctas { flex-direction: row; } }
.hero-socials { margin-top: 2rem; display: flex; gap: 1rem; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.5rem; width: 2.5rem; border-radius: 9999px;
  border: 1px solid hsla(0,0%,100%,0.3);
  color: hsla(0,0%,100%,0.7);
  transition: all .2s;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px hsla(42,52%,54%,0.3); }

/* ---------- Inner-page hero (dark bar) ---------- */
.page-hero {
  background: var(--primary); color: var(--primary-foreground);
  padding: 5rem 0;
}
@media (min-width: 768px) { .page-hero { padding: 7rem 0; } }
.page-hero .container { max-width: 48rem; }
.page-hero h1 { font-size: 1.875rem; }
@media (min-width: 768px) { .page-hero h1 { font-size: 3rem; } }
.page-hero p { margin-top: 1.5rem; font-size: 1.125rem; opacity: 0.8; }

/* ---------- Section headings ---------- */
.section-head { max-width: 42rem; margin: 0 auto 4rem; text-align: center; }
.section-head h2 { font-size: 1.5rem; color: var(--foreground); }
@media (min-width: 768px) { .section-head h2 { font-size: 1.875rem; } }
.section-head p { margin-top: 1rem; color: var(--muted-foreground); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Cards / Services ---------- */
.service-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow .2s;
}
.service-card:hover { box-shadow: 0 4px 12px hsla(217,76%,10%,0.08); }
.service-card .icon { color: var(--accent); margin-bottom: 1.25rem; }
.service-card h3 { font-size: 1.125rem; color: var(--foreground); }
.service-card p { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

/* Differentials */
.diff-item .icon-box {
  width: 3rem; height: 3rem; border-radius: var(--radius);
  background: hsla(42,52%,54%,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.diff-item h3 { font-size: 1rem; color: var(--foreground); }
.diff-item p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

/* CMVP badge */
.cmvp-block { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 42rem; margin: 0 auto; }
.cmvp-ring {
  width: 4rem; height: 4rem; border-radius: 9999px; border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 1.5rem;
}
.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.cmvp-block h2 { font-size: 1.5rem; }
@media (min-width: 768px) { .cmvp-block h2 { font-size: 1.875rem; } }
.cmvp-block > p { margin-top: 1rem; opacity: 0.8; max-width: 36rem; line-height: 1.6; }

/* Process */
.process-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.process-step { font-size: 2.25rem; font-weight: 700; color: hsla(42,52%,54%,0.25); margin-bottom: 1rem; font-family: var(--font-heading); }
.process-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  background: var(--primary); color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.process-item h3 { font-size: 1rem; color: var(--foreground); }
.process-item p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

/* Final CTA */
.final-cta {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}
@media (min-width: 768px) { .final-cta { padding: 4rem; } }
.final-cta h2 { font-size: 1.5rem; color: var(--foreground); }
@media (min-width: 768px) { .final-cta h2 { font-size: 1.875rem; } }
.final-cta p { margin-top: 1rem; color: var(--muted-foreground); max-width: 36rem; margin-left: auto; margin-right: auto; }
.final-cta .btn { margin-top: 2rem; }

/* ---------- Sobre page ---------- */
.prose { max-width: 48rem; }
.prose h2 { font-size: 1.5rem; color: var(--foreground); }
@media (min-width: 768px) { .prose h2 { font-size: 1.875rem; } }
.prose p { color: var(--muted-foreground); line-height: 1.7; margin-top: 1rem; }
.prose .stack > * + * { margin-top: 1.25rem; }

.values-grid { max-width: 56rem; margin: 0 auto; }
.value-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.value-item .icon-box {
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  background: hsla(42,52%,54%,0.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.value-item h3 { font-size: 1rem; color: var(--foreground); }
.value-item p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

/* ---------- Servicos page ---------- */
.service-block { max-width: 56rem; }
.service-block .header-row { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 2rem; }
.service-block .header-row .icon-box {
  width: 3rem; height: 3rem; border-radius: var(--radius);
  background: hsla(42,52%,54%,0.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.service-block h2 { font-size: 1.5rem; color: var(--foreground); }
.service-block .lead { margin-top: 0.75rem; color: var(--muted-foreground); line-height: 1.6; }
.service-block .lists { margin-top: 2.5rem; }
.list-title {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--foreground); margin-bottom: 1rem;
}
.dot-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.dot-list li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.dot-list li::before {
  content: ""; margin-top: 0.5rem; width: 0.375rem; height: 0.375rem;
  border-radius: 9999px; background: var(--accent); flex-shrink: 0;
}
.service-block .cta { margin-top: 2.5rem; }

/* ---------- Contato page ---------- */
.contact-grid { max-width: 64rem; display: grid; gap: 4rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 3fr 2fr; } }
.form-title { font-size: 1.25rem; color: var(--foreground); margin-bottom: 2rem; }
.form-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
form.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.field input, .field textarea {
  width: 100%; padding: 0.625rem 0.75rem;
  border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px);
  background: var(--card); color: var(--foreground);
  font: inherit; font-size: 0.875rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px hsla(42,52%,54%,0.15);
}
.field textarea { resize: vertical; min-height: 8rem; }

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.contact-info .row { display: flex; align-items: flex-start; gap: 0.75rem; }
.contact-info .row svg { color: var(--accent); flex-shrink: 0; margin-top: 0.125rem; }
.contact-info .row p:first-child { font-weight: 500; color: var(--foreground); }
.contact-info .row p + p { margin-top: 0.25rem; }
.contact-note {
  margin-top: 2.5rem; padding: 1.5rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--background);
  font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--primary); color: var(--primary-foreground);
  padding: 4rem 0;
}
.footer-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-brand img { height: 40px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.875rem; opacity: 0.7; line-height: 1.6; }
.footer-col h4 {
  font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem;
  letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.6;
}
.footer-col nav, .footer-col .info { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a { font-size: 0.875rem; opacity: 0.7; transition: opacity .15s; }
.footer-col a:hover { opacity: 1; }
.footer-col .info div { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; opacity: 0.7; }
.footer-bottom {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid hsla(0,0%,100%,0.1);
  text-align: center; font-size: 0.75rem; opacity: 0.5;
}

/* ---------- WhatsApp float ---------- */
.whatsapp-btn {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  background: #25D366; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
}
.whatsapp-btn:hover { transform: scale(1.1); box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(200%);
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; min-width: 260px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  transition: transform .3s ease;
  z-index: 100;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast strong { display: block; font-size: 0.875rem; margin-bottom: 0.25rem; }
.toast span { font-size: 0.8125rem; color: var(--muted-foreground); }

/* ---------- 404 ---------- */
.notfound {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; text-align: center;
}
.notfound h1 { font-size: 2.25rem; color: var(--foreground); margin-bottom: 1rem; }
.notfound p { font-size: 1.25rem; color: var(--muted-foreground); margin-bottom: 1rem; }
.notfound a { color: var(--accent); text-decoration: underline; }

/* ---------- Utilities ---------- */
.flex-1 { flex: 1; }
.stretch { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
