/* ========================================
   COOPER RESPIRA BRASIL
   Identidade visual própria | Instituto premium
   ======================================== */

:root {
  /* Paleta Respira Brasil - verde e amarelo */
  --rb-green: #1a7a1a;
  --rb-green-dark: #0d5c0d;
  --rb-green-light: #2e8b2e;
  --rb-yellow: #f9a825;
  --rb-yellow-dark: #f57f17;
  --rb-white: #ffffff;
  --rb-cream: #fafdfa;
  --rb-sand: #f0f5f0;
  --rb-charcoal: #1a1a1a;
  --rb-text: #333;
  --rb-text-muted: #555;
  --rb-error: #b8860b;
  --rb-border: #e0e8e0;

  /* Spacing */
  --sp-xxs: 8px;
  --sp-s: 12px;
  --sp-m: 16px;
  --sp-l: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  --sp-xxxl: 80px;

  /* Bordas - mais suaves, institucional */
  --radius-xs: 6px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;

  /* Sombras */
  --shadow-s: 0 2px 12px rgba(26, 122, 26, 0.08);
  --shadow-m: 0 8px 24px rgba(26, 122, 26, 0.1);
  --shadow-l: 0 16px 40px rgba(26, 122, 26, 0.12);

  /* Tipografia */
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Source Serif 4', Georgia, serif;
  --lh-tight: 1.2;
  --lh-body: 1.6;
  --lh-relaxed: 1.7;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: var(--lh-body);
  color: var(--rb-text);
  background: var(--rb-white);
  overflow-x: hidden;
}

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

a {
  color: var(--rb-green);
  text-decoration: none;
}

a:hover {
  color: var(--rb-green-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--rb-green);
  outline-offset: 2px;
}

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

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-m);
  background: var(--rb-green-dark);
  color: var(--rb-white);
  padding: var(--sp-m) var(--sp-l);
  border-radius: var(--radius-s);
  z-index: 9999;
  font-weight: 600;
  font-size: 15px;
}

.skip-link:focus {
  top: var(--sp-m);
  outline: 3px solid var(--rb-white);
  outline-offset: 2px;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sp-l);
}

.container--narrow {
  max-width: 720px;
  text-align: center;
}

/* Sections */
.section {
  padding: var(--sp-xxxl) 0;
}

.section--cream {
  background: var(--rb-cream);
}

.section--teal {
  background: var(--rb-green-dark);
  color: var(--rb-white);
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  color: var(--rb-charcoal);
  margin: 0 0 var(--sp-l);
  line-height: var(--lh-tight);
}

.section__title--accent {
  color: var(--rb-green);
}

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

.section__lead {
  font-size: 18px;
  line-height: var(--lh-relaxed);
  color: var(--rb-text-muted);
  margin: 0 0 var(--sp-xxl);
  max-width: 560px;
}

.section--teal .section__lead {
  color: rgba(255, 255, 255, 0.9);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-m) var(--sp-xl);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-s);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn--primary:hover:not(:disabled) {
  background: var(--rb-green-dark);
  border-color: var(--rb-green-dark);
}

.btn--outline {
  background: transparent;
  color: var(--rb-white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--rb-white);
}

.btn--large {
  padding: var(--sp-l) var(--sp-xxl);
  font-size: 17px;
}

.btn--full { width: 100%; }

/* ========================================
   HEADER - Barra superior sóbria
   ======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--rb-white);
  border-bottom: 1px solid var(--rb-sand);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sp-l);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  color: var(--rb-charcoal);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
}

.header__logo:hover {
  color: var(--rb-green);
  text-decoration: none;
}

.header__logo-img { height: 96px; width: auto; }

.header__logo-fallback {
  display: none;
  align-items: center;
  gap: var(--sp-s);
}

.header__logo-fallback svg circle { fill: var(--rb-green); }

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-l);
  flex-shrink: 0;
}

.header__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-l);
  align-items: center;
}

.header__links li {
  flex-shrink: 0;
}

.header__link {
  color: var(--rb-text);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.header__link:hover {
  color: var(--rb-green);
  text-decoration: none;
}

.header__menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-s);
  background: var(--rb-green);
  color: var(--rb-white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.header__drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 300px;
  height: 100vh;
  background: var(--rb-white);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 99;
  overflow-y: auto;
}

.header__drawer[aria-hidden="false"] { transform: translateX(0); }

.header__drawer-nav {
  padding: 100px var(--sp-xl) var(--sp-xl);
}

.header__drawer-links {
  list-style: none;
  margin: 0 0 var(--sp-xl);
  padding: 0;
}

.header__drawer-link {
  display: block;
  padding: var(--sp-m);
  color: var(--rb-charcoal);
  font-weight: 500;
  border-bottom: 1px solid var(--rb-sand);
}

.header__drawer-link:hover,
.header__drawer-link:focus {
  color: var(--rb-green);
  background: var(--rb-sand);
}

.header__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  z-index: 98;
}

.header__overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 900px) {
  .header__nav { display: none; }
  .header__menu-btn { display: flex; }
}

/* ========================================
   HERO - Composição diferenciada
   ======================================== */

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-xxl) var(--sp-l) var(--sp-xxxl);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: brightness(0.75);
}

@media (min-width: 1400px) and (min-height: 900px) {
  .hero {
    min-height: 70vh;
  }
  .hero__img {
    object-position: center 25%;
  }
}

.hero__bg:has(.hero__img[style*="display: none"]) {
  background: linear-gradient(160deg, var(--rb-green-dark) 0%, var(--rb-green) 60%);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(7, 61, 61, 0.95) 0%,
    rgba(13, 92, 92, 0.6) 40%,
    transparent 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}

.hero__kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rb-yellow);
  margin: 0 0 var(--sp-s);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 600;
  color: var(--rb-white);
  margin: 0 0 var(--sp-m);
  line-height: 1.1;
  max-width: 700px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 var(--sp-xl);
  max-width: 520px;
  line-height: 1.6;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-m);
}

.hero__ctas .btn--outline {
  background: transparent;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xl);
  margin-top: var(--sp-xxl);
  padding-top: 0;
  border-top: none;
}

.hero__stat {
  display: flex;
  flex-direction: column;
}

.hero__stat-value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  color: var(--rb-white);
  line-height: 1;
}

.hero__stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: var(--sp-xxs);
}

/* ========================================
   QUEM SOMOS - Bloco editorial
   ======================================== */

.quem-somos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xxxl);
  align-items: center;
}

.quem-somos__text p {
  margin: 0 0 var(--sp-m);
  font-size: 17px;
  line-height: var(--lh-relaxed);
  color: var(--rb-text);
}

.quem-somos__text p:first-child {
  font-size: 20px;
  color: var(--rb-green);
  font-weight: 600;
}

.quem-somos__vals {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-m);
  margin-top: var(--sp-xl);
}

.quem-somos__val {
  padding: var(--sp-m) var(--sp-l);
  background: var(--rb-white);
  border-radius: var(--radius-s);
  border: 1px solid var(--rb-sand);
  font-weight: 600;
  font-size: 14px;
  color: var(--rb-green);
}

.quem-somos__media {
  position: relative;
}

.quem-somos__img-wrap {
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--rb-green);
}

.quem-somos__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   CADEIA CIRCULAR - Seção comercial/institucional
   ======================================== */

.cadeia {
  display: grid;
  gap: var(--sp-l);
  margin-top: var(--sp-xxl);
}

.cadeia--with-media {
  grid-template-columns: 1.15fr 1.4fr;
  align-items: center;
}

.cadeia__media {
  max-width: 480px;
}

.cadeia__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-l);
}

.cadeia__bloco {
  padding: var(--sp-xl);
  background: var(--rb-white);
  border-radius: var(--radius-m);
  border: 1px solid var(--rb-sand);
  text-align: center;
}

.cadeia__bloco-num {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 600;
  color: var(--rb-yellow);
  line-height: 1;
  margin-bottom: var(--sp-m);
}

.cadeia__bloco h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--rb-charcoal);
  margin: 0 0 var(--sp-s);
}

.cadeia__bloco p {
  font-size: 15px;
  color: var(--rb-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ========================================
   MATERIAIS - Nova hierarquia
   ======================================== */

.materiais__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-xl);
}

.material-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-xl);
  padding: var(--sp-xl);
  background: var(--rb-white);
  border-radius: var(--radius-m);
  border: 1px solid var(--rb-sand);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.material-item:hover {
  border-color: var(--rb-green-light);
  box-shadow: var(--shadow-s);
}

.material-item__thumb {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--rb-green);
}

.material-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-item__body h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--rb-charcoal);
  margin: 0 0 var(--sp-s);
}

.material-item__body p {
  font-size: 15px;
  color: var(--rb-text-muted);
  margin: 0;
  line-height: 1.55;
}

.material-item__tag {
  display: inline-block;
  margin-top: var(--sp-s);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rb-green);
}

/* ========================================
   COMO FUNCIONA - Timeline horizontal
   ======================================== */

.passos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-l);
  margin-top: var(--sp-xxl);
}

.passo {
  position: relative;
  padding: var(--sp-xl) var(--sp-l);
  background: var(--rb-white);
  border-radius: var(--radius-m);
  border: 1px solid var(--rb-sand);
  text-align: center;
}

.passo::after {
  content: '';
  position: absolute;
  right: calc(-1 * var(--sp-l) / 2);
  top: 50%;
  width: var(--sp-l);
  height: 2px;
  background: var(--rb-sand);
}

.passo:last-child::after { display: none; }

.passo__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--rb-green);
  color: var(--rb-white);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: var(--sp-m);
}

.passo h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--rb-charcoal);
  margin: 0 0 var(--sp-s);
}

.passo p {
  font-size: 14px;
  color: var(--rb-text-muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .passos {
    grid-template-columns: repeat(2, 1fr);
  }
  .passo::after { display: none; }
}

@media (max-width: 500px) {
  .passos { grid-template-columns: 1fr; }
}

/* ========================================
   IMPACTO - Grid de benefícios
   ======================================== */

.impacto__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-l);
  margin-top: var(--sp-xxl);
}

@media (max-width: 900px) {
  .impacto__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.beneficio {
  padding: var(--sp-xl);
  background: var(--rb-white);
  border-radius: var(--radius-m);
  border-left: 4px solid var(--rb-yellow);
}

.beneficio h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--rb-charcoal);
  margin: 0 0 var(--sp-s);
}

.beneficio p {
  font-size: 15px;
  color: var(--rb-text-muted);
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .impacto__grid { grid-template-columns: 1fr; }
  .cadeia--with-media {
    grid-template-columns: 1fr;
  }
  .cadeia__steps {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   CTA PARCERIAS
   ======================================== */

.cta-parcerias {
  padding: var(--sp-xxxl) var(--sp-l);
}

.cta-parcerias .section__lead {
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   CONTATO
   ======================================== */

.contato__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-xxxl);
  align-items: start;
}

.contato__info {
  position: sticky;
  top: 100px;
}

.contato__intro {
  margin: 0 0 var(--sp-xl);
  font-size: 16px;
  color: var(--rb-text-muted);
}

.contato__address {
  font-style: normal;
  line-height: 1.8;
}

.contato__address strong {
  color: var(--rb-green);
  display: block;
  margin-bottom: var(--sp-xxs);
}

.contato__address a {
  color: var(--rb-green);
  font-weight: 600;
}

/* Form */
.contato__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-l);
}

.input-wrap { position: relative; }

.input-underline,
.input-select {
  width: 100%;
  padding: var(--sp-m) 0 var(--sp-s);
  font-family: var(--font-body);
  font-size: 16px;
  border: none;
  border-bottom: 2px solid var(--rb-border);
  background: transparent;
  color: var(--rb-charcoal);
  transition: border-color 0.2s;
  appearance: none;
}

.input-underline:focus,
.input-select:focus {
  outline: none;
  border-bottom-color: var(--rb-green);
}

.input-wrap label {
  position: absolute;
  left: 0;
  top: var(--sp-m);
  font-size: 16px;
  color: var(--rb-text-muted);
  pointer-events: none;
  transition: transform 0.2s, font-size 0.2s, color 0.2s;
}

.input-underline:not(:placeholder-shown) ~ label:not(.input-select-label),
.input-underline:focus ~ label:not(.input-select-label) {
  transform: translateY(-24px);
  font-size: 12px;
  color: var(--rb-text-muted);
}

.input-wrap--select .input-select-label {
  position: static;
  font-size: 12px;
  color: var(--rb-text-muted);
  margin-bottom: var(--sp-xxs);
  display: block;
}

.input-arrow {
  position: absolute;
  right: 0;
  bottom: var(--sp-m);
  color: var(--rb-green);
  pointer-events: none;
}

.input-select {
  padding-right: 28px;
  cursor: pointer;
}

textarea.input-underline {
  min-height: 100px;
  resize: vertical;
}

.input-underline.error,
.input-select.error { border-bottom-color: var(--rb-error); }

.input-error {
  font-size: 12px;
  color: var(--rb-error);
  margin-top: var(--sp-xxs);
}

@media (max-width: 768px) {
  .contato__grid { grid-template-columns: 1fr; }
  .contato__info { position: static; }
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--rb-white);
  padding: var(--sp-xxl) 0;
  color: var(--rb-charcoal);
}

.footer__inner {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-s);
  color: var(--rb-charcoal);
  text-decoration: none;
  margin-bottom: var(--sp-s);
}

.footer__logo:hover {
  color: var(--rb-green);
  text-decoration: none;
}

.footer__logo-img { height: 72px; }

.footer__tagline {
  font-size: 14px;
  color: var(--rb-text-muted);
  margin: 0 0 var(--sp-m);
}

.footer__address {
  font-style: normal;
  font-size: 14px;
  color: var(--rb-text);
  line-height: 1.7;
  margin: 0 0 var(--sp-s);
}

.footer__whatsapp {
  color: var(--rb-yellow);
  font-weight: 600;
}

.footer__whatsapp:hover {
  color: var(--rb-green-dark);
}

.footer__credit {
  margin-top: var(--sp-l);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--rb-text-muted);
  text-decoration: none;
}

.footer__credit-logo {
  height: 42px;
  max-width: 190px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer__credit:hover {
  text-decoration: none;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .footer__credit {
    gap: 5px;
    font-size: 12px;
  }

  .footer__credit-logo {
    height: 36px;
    max-width: 160px;
  }
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: var(--sp-l);
  right: var(--sp-l);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: var(--rb-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: transform 0.2s;
}

.whatsapp-float:hover { transform: scale(1.05); }

.whatsapp-float:focus-visible {
  outline: 2px solid var(--rb-green);
  outline-offset: 2px;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsivo geral */
@media (max-width: 768px) {
  .section { padding: var(--sp-xxl) 0; }
  .quem-somos { grid-template-columns: 1fr; }
  .cadeia { grid-template-columns: 1fr; }
  .materiais__list { grid-template-columns: 1fr; }
  .container { padding: 0 var(--sp-m); }
  .hero {
    min-height: 85vh;
    padding: var(--sp-xl) var(--sp-m) var(--sp-xxl);
  }
  .hero__stats { flex-wrap: wrap; gap: var(--sp-l); }
  .hero__stat-value { font-size: 28px; }
}
