/* =============================================
   AFONSO ÓTICA — ESTILO PRINCIPAL
   Estética: Vintage elegante / Art Nouveau moderno
   ============================================= */

/* --- VARIÁVEIS --- */
:root {
  --cream:    #f5f0e8;
  --beige:    #e8dfc9;
  --gold:     #c9a84c;
  --gold-dk:  #9e7a2a;
  --dark:     #1a1510;
  --brown:    #3d2b1f;
  --green-wa: #25d366;
  --green-dk: #1da851;
  --text:     #2e2116;
  --text-lt:  #6b5544;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body:  'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', sans-serif;

  --radius: 4px;
  --shadow: 0 8px 40px rgba(26,21,16,.13);
  --shadow-lg: 0 20px 60px rgba(26,21,16,.18);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* =============================================
   HEADER
   ============================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,168,76,.25);
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 2.5rem;
}
.nav a {
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brown);
  position: relative;
  transition: color .25s;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1.5px;
  background: var(--gold);
  transition: width .3s;
}
.nav a:hover { color: var(--gold-dk); }
.nav a:hover::after { width: 100%; }

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE NAV */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--cream);
  border-top: 1px solid var(--beige);
  padding: .5rem 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brown);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--beige);
  transition: background .2s, color .2s;
}
.mobile-nav a:hover { background: var(--beige); color: var(--gold-dk); }

/* =============================================
   WHATSAPP BUTTON (shared styles)
   ============================================= */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--green-wa);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .85rem 2rem;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(37,211,102,.35);
  transition: background .25s, transform .2s, box-shadow .25s;
}
.btn-whatsapp svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-whatsapp:hover {
  background: var(--green-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,.45);
}
.btn-whatsapp:active { transform: translateY(0); }

.btn-whatsapp-lg {
  font-size: 1.1rem;
  padding: 1.1rem 2.8rem;
  box-shadow: 0 6px 30px rgba(37,211,102,.4);
}
.btn-whatsapp-lg svg { width: 24px; height: 24px; }

/* FLOAT BUTTON */
.whatsapp-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 200;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--green-wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.5);
  transition: transform .25s, box-shadow .25s;
  animation: pulse-wa 2.5s infinite;
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(37,211,102,.6);
  animation: none;
}

@keyframes pulse-wa {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.5); }
  50% { box-shadow: 0 4px 36px rgba(37,211,102,.75); }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  padding-top: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--dark);
}

/* Grain texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: .4;
}

/* Decorative circle */
.hero-bg-pattern {
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,.15);
  pointer-events: none;
  z-index: 0;
}
.hero-bg-pattern::before, .hero-bg-pattern::after {
  content: '';
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,.1);
}
.hero-bg-pattern::after { inset: 120px; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
  padding: 4rem 2rem 4rem 4rem;
  animation: fadeUp .9s ease both;
}

.hero-tagline {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,.4);
  padding: .35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1.2rem;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 1.6rem;
  font-weight: 300;
  color: rgba(255, 253, 253, 0.7);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 400px;
}

.hero-cta { animation: fadeUp 1s .3s ease both; }

/* HERO IMAGE */
.hero-image-wrap {
  position: relative;
  z-index: 2;
  padding: 4rem 4rem 4rem 2rem;
  animation: fadeUp .9s .15s ease both;
}

.hero-photo {
  width: 300px;
  height: 400px;
  object-fit: cover;
  object-position: top center;
  border: 3px solid rgba(201,168,76,.4);
  box-shadow: var(--shadow-lg);
  filter: sepia(20%) contrast(1.05);
}

.hero-photo-caption {
  position: absolute;
  bottom: 4rem; left: 0;
  background: rgba(201,168,76,.9);
  color: var(--dark);
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .4rem 1rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   SECTIONS (shared)
   ============================================= */
.section { padding: 6rem 1.5rem; }
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 3rem;
}
.section-title em {
  font-style: italic;
  color: var(--gold-dk);
}

/* =============================================
   HISTÓRIA
   ============================================= */
.historia { background: var(--cream); }

.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.historia-text p {
  font-size: 1.2rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.historia-text p strong { color: var(--gold-dk); font-weight: 600; }

.stat-row {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--beige);
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-dk);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .07em;
  color: var(--text-lt);
  margin-top: .3rem;
}

.historia-img-wrap {
  position: relative;
}
.historia-img-wrap img {
  width: 100%;
  max-width: 320px;
  height: 400px;
  object-fit: cover;
  object-position: top center;
  filter: sepia(15%);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  margin-left: auto;
}
.img-deco {
  position: absolute;
  top: 20px; right: -20px;
  bottom: -20px; left: 20px;
  border: 2px solid var(--gold);
  z-index: 0;
  opacity: .5;
}

/* =============================================
   PRODUTOS
   ============================================= */
.produtos { background: var(--dark); }
.produtos .section-label { color: var(--gold); }
.produtos .section-title { color: var(--cream); }
.produtos .section-title em { color: var(--gold); }

.produtos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.produto-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,168,76,.2);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  transition: background .3s, border-color .3s, transform .3s;
}
.produto-card:hover {
  background: rgba(201,168,76,.07);
  border-color: rgba(201,168,76,.5);
  transform: translateY(-4px);
}
.produto-card.destaque {
  background: rgba(201,168,76,.1);
  border-color: rgba(201,168,76,.45);
}

.produto-icon {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
}
.produto-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: .8rem;
}
.produto-card p {
  font-size: 1.5rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
}

.oculos-banner {
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 220px;
}
.oculos-banner img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity .4s;
}
.oculos-banner:hover img { opacity: 5; }

/* =============================================
   CONTATO
   ============================================= */
.contato {
  background: var(--cream);
  text-align: center;
}
.contato .section-label,
.contato .section-title,
.contato .section-title em {
  text-align: center;
}
.contato-sub {
  font-size: 2.0rem;
  line-height: 1.8;
  color: var(--text-lt);
  max-width: 520px;
  margin: 0 auto 3rem;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--dark);
  border-top: 1px solid rgba(201,168,76,.15);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: brightness(0,9);
}
.footer p {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  color: 
  rgba(255, 255, 255, 0.858);
  letter-spacing: .03em;
}

/* =============================================
   RESPONSIVO
   ============================================= */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    padding-top: 70px;
  }
  .hero-content {
    padding: 3rem 2rem 1.5rem;
    text-align: center;
  }
  .hero-sub { margin: 0 auto 2rem; }
  .hero-image-wrap {
    padding: 0 2rem 3rem;
  }
  .hero-photo {
    width: 240px; height: 320px;
    margin: 0 auto;
  }
  .hero-photo-caption { left: 50%; transform: translateX(-50%); white-space: nowrap; bottom: 1.5rem; }

  .historia-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .historia-img-wrap { display: none; }

  .produtos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .hamburger { display: flex; }

  .section { padding: 4rem 1rem; }
  .stat-row { gap: 1.2rem; }
  .btn-whatsapp-lg { font-size: .95rem; padding: 1rem 2rem; }
}

/* =============================================
   SCROLL REVEAL (adicionado pelo JS)
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Active nav link */
.nav a.active,
.mobile-nav a.active {
  color: var(--gold-dk);
}
.nav a.active::after { width: 100%; }