/* ========================================
   Supermercado Colorado — CSS Vanilla
   HTML5 + CSS3 + JS
   ======================================== */

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-white);
  color: var(--color-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

img, video, canvas, svg {
  display: block;
  max-width: 100%;
}

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

p, h1, h2, h3, h4 {
  margin: 0;
}

/* Tokens */
:root {
  --brand-red: #cc0000;
  --brand-yellow: #ffcc00;
  --brand-dark: #1a1a1a;
  --brand-gray: #f5f5f5;
  --color-white: #ffffff;
  --color-text-muted: #6b7280;
  --color-text-secondary: #4b5563;
  --color-icon-muted: #9ca3af;
  --color-focus: #60a5fa;
  --max-width: 72rem; /* 1152px */
  --radius-card: 20px;
  --radius-button: 12px;
  --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background-color: var(--brand-yellow);
  color: var(--brand-dark);
  font-weight: 700;
  border-radius: 0 0 var(--radius-button) var(--radius-button);
  transition: top 200ms ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
}

/* Utilitário acessível */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Foco visível */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ========================================
   HERO
   ======================================== */
.hero-section {
  position: relative;
}

.hero-fixed {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--brand-dark) url('../assets/hero/poster.webp') center/cover no-repeat;
}

.hero-fixed.sticky {
  position: sticky;
  top: 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-loading {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-dark);
  opacity: 1;
  transition: opacity 500ms ease;
}

.hero-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-loading-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-loading-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-loading-text {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-loading-bar {
  position: relative;
  width: 12rem;
  height: 2px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.1);
}

.hero-loading-progress {
  height: 100%;
  width: 0%;
  background-color: var(--brand-yellow);
  transition: width 100ms linear;
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  text-align: center;
}

.hero-logo {
  height: 10rem;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 4px white) drop-shadow(0 0 4px white) drop-shadow(0 0 40px rgba(0,0,0,0.5)) drop-shadow(0 0 15px rgba(0,0,0,0.7));
}

.hero-tagline {
  max-width: 42rem;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-white);
  text-shadow: 0 3px 15px rgba(0,0,0,0.8);
  line-height: 1.25;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.hero-scroll-icon {
  width: 2rem;
  height: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

@media (min-width: 400px) {
  .hero-logo {
    height: 14rem;
  }

  .hero-tagline {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .hero-logo {
    height: 20rem;
  }

  .hero-tagline {
    font-size: 2.25rem;
  }
}

/* ========================================
   SEÇÕES
   ======================================== */
.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.section-red {
  background-color: var(--brand-red);
}

.section-relative {
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.section-divider {
  width: 5rem;
  height: 0.25rem;
  background-color: var(--brand-yellow);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

/* ========================================
   GRID
   ======================================== */
.grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2,
  .grid-lg-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-lg-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   CARDS
   ======================================== */
.card-wrapper {
  position: relative;
}

.card {
  position: relative;
  z-index: 10;
  overflow: hidden;
  border-radius: var(--radius-card);
  border-top-width: 4px;
  background-color: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: all 300ms ease;
}

.card-yellow-top {
  border-top-color: var(--brand-yellow);
}

.card-red-top {
  border-top-color: var(--brand-red);
}

.card-flex {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-red-top:hover {
  transform: scale(1.03);
}

.card-body {
  padding: 2rem;
}

.card-body-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-title-red {
  color: var(--brand-red);
}

.card-title-dark {
  color: var(--brand-dark);
}

.card-text {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--color-text-secondary);
}

/* Info list */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.info-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--color-icon-muted);
}

/* Icon circle */
.icon-circle {
  display: inline-flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: rgba(204, 0, 0, 0.1);
  color: var(--brand-red);
  margin-bottom: 1.25rem;
  transition: background-color 300ms ease, color 300ms ease;
}

.card:hover .icon-circle {
  background-color: var(--brand-red);
  color: var(--color-white);
}

.icon {
  width: 1.75rem;
  height: 1.75rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-button);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  transition: filter 300ms ease;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn-yellow {
  background-color: var(--brand-yellow);
  color: var(--brand-dark);
}

.btn-red {
  background-color: var(--brand-red);
  color: var(--color-white);
}

.btn-full {
  width: 100%;
  justify-content: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
}

.btn-full .btn-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* ========================================
   DECORAÇÕES GEOMÉTRICAS
   ======================================== */
.decoration {
  position: absolute;
  pointer-events: none;
  border-radius: 9999px;
}

.decoration-yellow-10 {
  background-color: rgba(255, 204, 0, 0.1);
}

.decoration-yellow-8 {
  background-color: rgba(255, 204, 0, 0.08);
}

.decoration-yellow-20 {
  background-color: rgba(255, 204, 0, 0.2);
}

.decoration-yellow-30-border {
  border: 4px solid rgba(255, 204, 0, 0.3);
}

.decoration-red-15 {
  background-color: rgba(204, 0, 0, 0.15);
}

.decoration-red-20 {
  background-color: rgba(204, 0, 0, 0.2);
}

.decoration-left-top {
  left: -2.5rem;
  top: 5rem;
  width: 15rem;
  height: 15rem;
}

.decoration-right-bottom {
  right: -5rem;
  bottom: -2.5rem;
  width: 20rem;
  height: 20rem;
}

.decoration-left-top-lg {
  left: -5rem;
  top: -5rem;
  width: 20rem;
  height: 20rem;
}

.decoration-right-mid {
  right: -8rem;
  top: 10rem;
  width: 24rem;
  height: 24rem;
}

.decoration-bottom-mid {
  bottom: 2.5rem;
  left: 33%;
  width: 10rem;
  height: 10rem;
}

.decoration-bottom-right {
  right: -4rem;
  bottom: -4rem;
  width: 16rem;
  height: 16rem;
}

.decoration-right-top {
  right: -4rem;
  top: -4rem;
  width: 18rem;
  height: 18rem;
}

.decoration-left-bottom {
  left: -1rem;
  bottom: -1rem;
  width: 5rem;
  height: 5rem;
  border: 4px solid rgba(255, 204, 0, 0.4);
  background-color: transparent;
}

.decoration-ring {
  right: -1rem;
  bottom: -1rem;
  width: 6rem;
  height: 6rem;
  border: 4px solid rgba(255, 204, 0, 0.4);
  background-color: transparent;
}

.decoration-left-top-sm {
  left: -1rem;
  top: -1rem;
  width: 8rem;
  height: 8rem;
}

.decoration-right-bottom-sm {
  right: -0.75rem;
  bottom: -0.75rem;
  width: 5rem;
  height: 5rem;
}

@media (max-width: 767px) {
  .decoration {
    display: none;
  }
}

@media (min-width: 768px) {
  .decoration-left-bottom {
    left: -1rem;
    bottom: -1rem;
  }

  .decoration-ring {
    right: -1.5rem;
    bottom: -1.5rem;
    width: 6rem;
    height: 6rem;
  }
}

/* ========================================
   ABOUT
   ======================================== */
.about-grid {
  align-items: start;
  gap: 3rem;
}

.about-text {
  text-align: left;
  font-size: 1rem;
  line-height: 1.625;
  color: rgba(255, 255, 255, 0.9);
}

.about-text p {
  margin-bottom: 1.25rem;
}

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

.about-text strong {
  color: var(--color-white);
  font-weight: 700;
}

.about-video-wrapper {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.about-video {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  width: 100%;
}

.about-video video {
  width: 100%;
  max-height: 700px;
  object-fit: contain;
  border-radius: var(--radius-button);
}

@media (min-width: 768px) {
  .about-text {
    font-size: 1.125rem;
  }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  border-top: 4px solid var(--brand-red);
  background-color: var(--brand-dark);
  padding-top: 3rem;
  padding-bottom: 3rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
}

.footer-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-text-muted {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-col-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 300ms ease;
}

.footer-link:hover {
  color: var(--color-white);
}

.footer-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-contact-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.footer-email {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-yellow);
  text-decoration: underline;
  transition: color 300ms ease;
}

.footer-email:hover {
  color: #fde047;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }

  .footer-col-right {
    align-items: flex-end;
  }
}

/* ========================================
   ANIMAÇÕES DE SCROLL
   ======================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px) perspective(800px) rotateX(6deg);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) perspective(800px) rotateX(0);
}

.animate-on-scroll.delay-100 { transition-delay: 100ms; }
.animate-on-scroll.delay-200 { transition-delay: 200ms; }
.animate-on-scroll.delay-300 { transition-delay: 300ms; }
.animate-on-scroll.delay-400 { transition-delay: 400ms; }

/* Hero content already visible on load */
.hero-content .animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) perspective(800px) rotateX(0);
}

/* Reduzir movimento para quem prefere */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
