/* Rede Ribas — Identidade visual */
:root {
  --blue: #0a2f6b;
  --blue-deep: #061f4a;
  --blue-mid: #13408c;
  --yellow: #ffd200;
  --yellow-hot: #f5b800;
  --orange: #f7931e;
  --white: #ffffff;
  --ink: #121826;
  --muted: #5a6478;
  --fog: #eef2f8;
  --line: rgba(10, 47, 107, 0.12);
  --header-h: 4.5rem;
  --radius: 4px;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft: 0 18px 50px rgba(6, 31, 74, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 210, 0, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 20%, rgba(10, 47, 107, 0.06), transparent 55%),
    var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

strong {
  font-weight: 600;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.container.narrow {
  width: min(480px, calc(100% - 2.5rem));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease;
}

.btn-primary {
  background: var(--yellow);
  color: var(--blue-deep);
  box-shadow: 0 10px 28px rgba(255, 210, 0, 0.35);
}

.btn-primary:hover {
  background: var(--yellow-hot);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(6, 31, 74, 0.06);
}

.header-inner {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand img {
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--blue);
  position: relative;
  padding: 0.25rem 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-lock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.4rem;
  height: 2px;
  margin: 5px auto;
  background: var(--blue);
  transition: 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  animation: heroZoom 18s var(--ease) forwards;
}

@keyframes heroZoom {
  to {
    transform: scale(1);
  }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 31, 74, 0.45) 0%, rgba(6, 31, 74, 0.25) 35%, rgba(6, 31, 74, 0.78) 100%),
    linear-gradient(90deg, rgba(6, 31, 74, 0.55) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: calc(var(--header-h) + 4rem) 0 7rem;
}

.hero-brand {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero-lead {
  margin: 0 0 1.8rem;
  max-width: 36ch;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 3;
  color: var(--white);
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 64px;
  display: block;
}

/* Sections common */
.section-head {
  margin-bottom: 3rem;
  max-width: 40rem;
}

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

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

.section-head-light .eyebrow {
  color: var(--yellow);
}

.section-head h2,
.contato-intro h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--blue);
}

.section-head-light h2 {
  color: var(--white);
}

.section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-head-light .section-lead {
  color: rgba(255, 255, 255, 0.78);
}

/* História */
.historia {
  padding: 5rem 0 6rem;
  background:
    linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.75rem;
  padding-left: 1.75rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, var(--yellow), var(--blue));
}

.timeline-item {
  position: relative;
  padding: 0 0 0.25rem 1.25rem;
}

.timeline-dot {
  position: absolute;
  left: -1.55rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--blue);
  box-shadow: 0 0 0 4px rgba(255, 210, 0, 0.25);
}

.timeline-item h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue);
}

.timeline-item p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

/* Fé / caridade */
.fe-bloco {
  margin-top: 3.5rem;
  padding: 2.25rem 2.35rem;
  max-width: 48rem;
  background:
    linear-gradient(135deg, rgba(255, 210, 0, 0.12), transparent 55%),
    linear-gradient(180deg, #fff, #f4f7fc);
  border-left: 4px solid var(--yellow);
  box-shadow: var(--shadow-soft);
}

.fe-bloco h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue);
}

.fe-bloco > p:not(.eyebrow) {
  margin: 0 0 1.4rem;
  color: var(--muted);
  max-width: 58ch;
}

.fe-quote {
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--blue);
  line-height: 1.35;
}

.fe-quote cite {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Vídeo institucional */
.video-institucional {
  padding: 5rem 0 5.5rem;
  background:
    radial-gradient(800px 400px at 80% 0%, rgba(255, 210, 0, 0.1), transparent 60%),
    linear-gradient(180deg, #f7f9fc 0%, #fff 100%);
}

.video-frame {
  position: relative;
  overflow: hidden;
  background: var(--blue-deep);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}

.video-frame::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  z-index: 1;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--blue));
  pointer-events: none;
}

.video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(70vh, 620px);
  object-fit: contain;
  background: #000;
}

/* Postos */
.postos {
  position: relative;
  padding: 5.5rem 0 6rem;
  overflow: hidden;
  color: var(--white);
}

.postos-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 48%, var(--blue-mid) 100%);
}

.postos-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background:
    radial-gradient(circle at 15% 20%, var(--yellow) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 70%, var(--yellow) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 85%, rgba(255, 255, 255, 0.7) 0 1.5px, transparent 2px);
  background-size: 120px 120px, 160px 160px, 90px 90px;
  animation: sparkle 20s linear infinite;
}

@keyframes sparkle {
  to {
    background-position: 120px 60px, -80px 40px, 40px -30px;
  }
}

.postos .container {
  position: relative;
  z-index: 1;
}

.postos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.posto {
  grid-column: span 2;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: transform 0.35s var(--ease), background 0.35s ease;
}

.posto:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
}

.postos-grid .posto:nth-child(4) {
  grid-column: 2 / span 2;
}

.postos-grid .posto:nth-child(5) {
  grid-column: 4 / span 2;
}

.posto-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--blue-deep);
}

.posto-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.posto:hover .posto-media img {
  transform: scale(1.05);
}

.posto-badge {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.7rem;
  background: var(--yellow);
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.posto-media-solid {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(255, 210, 0, 0.2), transparent 50%),
    linear-gradient(180deg, #0f3a82, #061f4a);
}

.posto-placeholder {
  text-align: center;
  padding: 1rem;
}

.posto-placeholder span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.posto-placeholder strong {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--yellow);
}

.posto-body {
  padding: 1.15rem 1.2rem 1.35rem;
}

.posto-body h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.posto-meta {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--yellow);
}

.posto-addr {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.diferencial {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.diferencial-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.diferencial-copy {
  padding: 2rem 2.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.diferencial-copy h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.diferencial-copy p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* Área do Cliente */
.area-cliente {
  padding: 5.5rem 0;
  background:
    linear-gradient(180deg, #fff 0%, var(--fog) 100%);
}

.area-cliente-page {
  min-height: calc(100vh - var(--header-h) - 6rem);
  padding-top: calc(var(--header-h) + 3.5rem);
  padding-bottom: 4rem;
  display: flex;
  align-items: center;
}

.page-cliente .site-header {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(6, 31, 74, 0.06);
}

.voltar-site {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.voltar-site a {
  color: var(--blue);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.voltar-site a:hover {
  border-bottom-color: var(--yellow);
}

.login-panel {
  background: var(--white);
  padding: 2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--blue));
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(10, 47, 107, 0.18);
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: #fbfcfe;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230A2F6B' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.4rem;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(255, 210, 0, 0.35);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.postos-select {
  margin: 0 0 1.1rem;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid rgba(10, 47, 107, 0.16);
  background: linear-gradient(180deg, rgba(255, 210, 0, 0.08), rgba(10, 47, 107, 0.03));
}

.postos-select legend {
  padding: 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}

.postos-select-hint {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.postos-checkboxes {
  display: grid;
  gap: 0.55rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.check input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.login-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.login-feedback,
.form-feedback {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  background: rgba(10, 47, 107, 0.06);
  border-left: 3px solid var(--yellow);
  color: var(--blue);
}

/* Contato */
.contato {
  padding: 5.5rem 0 6rem;
  background:
    linear-gradient(135deg, rgba(255, 210, 0, 0.08), transparent 40%),
    #fff;
}

.contato-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.contato-intro p {
  color: var(--muted);
  max-width: 36ch;
}

.contato-email {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--blue);
  border-bottom: 3px solid var(--yellow);
  padding-bottom: 0.15rem;
  transition: color 0.2s ease;
}

.contato-email:hover {
  color: var(--blue-mid);
}

.contato-form {
  background: var(--white);
  padding: 1.75rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

/* Footer */
.site-footer {
  background: var(--blue-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-footer img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
  height: 34px;
}

.footer-copy {
  text-align: right;
}

.footer-copy p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-note {
  margin-top: 0.25rem !important;
  opacity: 0.7;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

/* Responsive */
@media (max-width: 960px) {
  .postos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .posto,
  .postos-grid .posto:nth-child(4),
  .postos-grid .posto:nth-child(5) {
    grid-column: auto;
  }

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

  .contato-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s ease;
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a::after {
    display: none;
  }

  .hero-content {
    padding-bottom: 5.5rem;
  }

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

@media (max-width: 560px) {
  .container,
  .header-inner {
    width: calc(100% - 1.5rem);
  }

  .hero-content {
    width: calc(100% - 1.5rem);
  }

  .login-panel,
  .contato-form {
    padding: 1.35rem;
  }

  .fe-bloco {
    padding: 1.5rem 1.35rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-copy {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-img,
  .postos-bg::after,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
