/* ─────────────────────────────────────────────────────────────
   COCAR & CO. — HOME EMERGENCIAL
   styles.css
───────────────────────────────────────────────────────────── */

/* ─── CUSTOM PROPERTIES ──────────────────────────────────── */
:root {
  --graphite: #242223;
  --white: #ffffff;
  --sand: #F5F0E8;
  --black: #000000;

  --header-height: 88px;
  --container-max: 1200px;
  --pad-h: 40px;
  --section-pad: 96px;
  --radius: 3px;
  --transition: 0.2s ease;
}

/* ─── RESET ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--graphite);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ─── CONTAINER ──────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--pad-h);
}

/* ─── SECTION BASE ───────────────────────────────────────── */
.section {
  padding-block: var(--section-pad);
}

/* ─── SECTION LABEL ──────────────────────────────────────── */
.section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--graphite);
  opacity: 0.45;
  margin-bottom: 16px;
}

.label-light {
  color: var(--white);
}

/* ─── HEADINGS ───────────────────────────────────────────── */
h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.18;
  color: var(--graphite);
  margin-bottom: 24px;
}

.text-light {
  color: var(--white);
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.btn-primary {
  background-color: var(--graphite);
  color: var(--white);
  border-color: var(--graphite);
}

.btn-primary:hover {
  opacity: 0.82;
}

.btn-outline {
  background-color: transparent;
  color: var(--graphite);
  border-color: var(--graphite);
}

.btn-outline:hover {
  background-color: var(--graphite);
  color: var(--white);
}

.btn-ghost {
  background-color: transparent;
  color: var(--graphite);
  border-color: transparent;
  padding-inline: 0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(36, 34, 35, 0.35);
}

.btn-ghost:hover {
  text-decoration-color: var(--graphite);
}

/* ─── HEADER ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: transparent;
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  border-bottom-color: rgba(36, 34, 35, 0.08);
  box-shadow: 0 1px 20px rgba(36, 34, 35, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo {
  line-height: 0;
  flex-shrink: 0;
}

.header-logo img {
  height: 44px;
  width: auto;
  display: block;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.header-logo img.logo-swapping {
  opacity: 0;
}

.site-header.scrolled .header-logo img {
  height: 38px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  opacity: 0.85;
  letter-spacing: 0.01em;
  transition: opacity var(--transition), color var(--transition);
}

.header-nav a:hover {
  opacity: 1;
}

.site-header.scrolled .header-nav a {
  color: var(--graphite);
  opacity: 0.65;
}

.site-header.scrolled .header-nav a:hover {
  opacity: 1;
}

/* ─── HAMBURGER ───────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--white);
  transition: transform var(--transition), opacity var(--transition), background-color 0.35s ease;
  transform-origin: center;
}

.site-header.scrolled .nav-toggle span {
  background-color: var(--graphite);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-image: url('assets/images/header.png');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(36, 34, 35, 0.80) 0%,
    rgba(36, 34, 35, 0.52) 48%,
    rgba(36, 34, 35, 0.16) 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: var(--header-height);
  padding-block: calc(var(--header-height) + 48px) 88px;
}

.hero-content {
  max-width: 600px;
}

.hero-headline {
  font-size: clamp(38px, 4.5vw, 62px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.hero-subtitle {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--white);
  opacity: 0.82;
  margin-bottom: 18px;
}

.hero-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--white);
  opacity: 0.62;
  margin-bottom: 44px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-actions .btn-primary {
  background-color: var(--white);
  color: var(--graphite);
  border-color: var(--white);
}

.hero-actions .btn-primary:hover {
  background-color: var(--sand);
  border-color: var(--sand);
}

.hero-actions .btn-outline {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-actions .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.85);
}

.hero-actions .btn-ghost {
  color: var(--white);
  text-decoration-color: rgba(255, 255, 255, 0.38);
}

.hero-actions .btn-ghost:hover {
  text-decoration-color: rgba(255, 255, 255, 0.88);
}

/* ─── ABOUT ──────────────────────────────────────────────── */
.section-about {
  background-color: var(--white);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text h2 {
  margin-top: 8px;
}

.about-text p {
  color: var(--graphite);
  opacity: 0.75;
  margin-bottom: 18px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.highlights-list {
  display: flex;
  flex-direction: column;
  padding-top: 68px;
}

.highlights-list li {
  font-size: 16px;
  font-weight: 500;
  color: var(--graphite);
  padding: 20px 0;
  border-bottom: 1px solid rgba(36, 34, 35, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.highlights-list li:first-child {
  border-top: 1px solid rgba(36, 34, 35, 0.1);
}

.highlights-list li::before {
  content: '';
  display: block;
  width: 18px;
  height: 1.5px;
  background-color: var(--graphite);
  flex-shrink: 0;
  opacity: 0.5;
}

/* ─── PORTFOLIO ──────────────────────────────────────────── */
.section-portfolio {
  background-color: var(--sand);
}

.section-portfolio h2 {
  margin-top: 8px;
}

.section-intro {
  font-size: 17px;
  color: var(--graphite);
  opacity: 0.65;
  max-width: 580px;
  margin-bottom: 64px;
  line-height: 1.65;
}

.brand-categories {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.category-header {
  margin-bottom: 20px;
}

.category-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--graphite);
  opacity: 0.45;
  margin-bottom: 6px;
}

.category-desc {
  font-size: 15px;
  color: var(--graphite);
  opacity: 0.6;
  max-width: 480px;
  line-height: 1.55;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.brand-card {
  background-color: var(--white);
  border: 1px solid rgba(36, 34, 35, 0.1);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  transition: border-color var(--transition);
}

.brand-card:hover {
  border-color: rgba(36, 34, 35, 0.22);
}

.brand-card img {
  max-height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin-inline: auto;
}

/* ─── ATUAÇÃO ────────────────────────────────────────────── */
.section-atuacao {
  background-color: var(--graphite);
}

.section-atuacao h2 {
  margin-top: 8px;
  color: var(--white);
}

.atuacao-subtitle {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 500;
  color: var(--white);
  opacity: 0.8;
  margin-bottom: 24px;
  max-width: 600px;
  line-height: 1.5;
}

.atuacao-body {
  font-size: 16px;
  color: var(--white);
  opacity: 0.6;
  max-width: 680px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 48px;
  margin-bottom: 48px;
}

.channel-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 20px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  letter-spacing: 0.01em;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-block: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 48px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric-number {
  font-size: clamp(36px, 3vw, 48px);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric-desc {
  font-size: 14px;
  color: var(--white);
  opacity: 0.5;
  line-height: 1.45;
}

.atuacao-support {
  font-size: 15px;
  color: var(--white);
  opacity: 0.45;
  max-width: 680px;
  line-height: 1.75;
}

/* ─── CONTACT ────────────────────────────────────────────── */
.section-contact {
  background-color: var(--white);
}

.contact-inner {
  max-width: 600px;
}

.section-contact h2 {
  margin-top: 8px;
  margin-bottom: 20px;
}

.contact-text {
  font-size: 17px;
  color: var(--graphite);
  opacity: 0.65;
  margin-bottom: 40px;
  line-height: 1.65;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background-color: var(--graphite);
  padding-block: 64px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo-img {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.footer-tagline {
  font-size: 14px;
  color: var(--white);
  opacity: 0.5;
  line-height: 1.65;
  max-width: 360px;
  padding-top: 8px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}

.footer-nav a {
  font-size: 14px;
  color: var(--white);
  opacity: 0.45;
  transition: opacity var(--transition);
}

.footer-nav a:hover {
  opacity: 0.9;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--white);
  opacity: 0.28;
  line-height: 1.65;
  max-width: 680px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ─── RESPONSIVE — tablet / small desktop ────────────────── */
@media (max-width: 960px) {
  :root {
    --section-pad: 72px;
    --pad-h: 28px;
  }

  .header-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(36, 34, 35, 0.08);
    padding: 8px 0;
    z-index: 99;
    backdrop-filter: blur(10px);
  }

  .header-nav.nav-open {
    display: flex;
  }

  .header-nav a {
    padding: 16px 28px;
    color: var(--graphite);
    opacity: 0.85;
    font-size: 15px;
    border-bottom: 1px solid rgba(36, 34, 35, 0.06);
  }

  .header-nav a:last-child {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    background-position: center center;
    align-items: flex-end;
  }

  .hero::before {
    background: linear-gradient(
      to top,
      rgba(36, 34, 35, 0.90) 0%,
      rgba(36, 34, 35, 0.65) 50%,
      rgba(36, 34, 35, 0.30) 100%
    );
  }

  .hero-inner {
    padding-block: calc(var(--header-height) + 40px) 72px;
  }

  .hero-content {
    max-width: 100%;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .highlights-list {
    padding-top: 0;
  }

  .channel-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 28px;
  }
}

/* ─── RESPONSIVE — mobile ────────────────────────────────── */
@media (max-width: 540px) {
  :root {
    --pad-h: 20px;
    --section-pad: 56px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
  }

  .hero-actions .btn-ghost {
    text-align: center;
  }

  .channel-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .channel-card {
    padding: 16px 12px;
    font-size: 13px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-actions .btn {
    text-align: center;
  }
}
