/* ============================================================================
   styles.css — Estilos Não-Críticos
   ============================================================================
   Projeto: Corte & Alma — Barbearia Artesanal no Porto
   Desenvolvido por valesmr — https://valesmrdev.com
   Todos os direitos reservados © 2026
   ============================================================================ */

/* --- Reset & Base (only if critical CSS not loaded) --- */
/* --- Typography (non-critical only) --- */
h2 { margin-bottom: .5rem; }
.section-tag{display:inline-block;font-family:'Inter',sans-serif;font-size:.75rem;font-weight:700;letter-spacing:.15em;text-transform:uppercase;color:#6B5025;margin-bottom:1rem;padding-left:2.5rem;position:relative}
.section-tag::before{content:'';position:absolute;left:0;top:50%;width:1.75rem;height:1px;background:#C69749}
.section-desc{font-size:1.125rem;color:#5A5A62;max-width:560px;margin-bottom:3rem}

.btn-secondary{background:transparent;color:#1B1B1F;border:1px solid #D4CEC4}
.btn-secondary:hover{border-color:#C69749;color:#C69749}
.section{padding:6rem 0}
.section-alt{background:#F0EDE8}

/* --- OFICIO --- */
.oficio-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}
.oficio-card{padding:2.5rem;background:#FAF8F5;border:1px solid #E8E4DC;transition:all .4s ease}
.oficio-card:hover{border-color:#C69749;transform:translateY(-4px)}.oficio-icon{width:3rem;height:3rem;margin-bottom:1.5rem;color:#C69749}
.oficio-icon svg{width:100%;height:100%;fill:currentColor}
.oficio-card h3{font-family:'DM Serif Display',Georgia,serif;font-size:1.5rem;font-weight:400;margin-bottom:.75rem;color:#1B1B1F}
.oficio-card p{font-size:.9375rem;color:#5A5A62;line-height:1.7}

/* --- SERVICES --- */
.services-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem}
.service-card{position:relative;overflow:hidden;min-height:320px;display:flex;align-items:flex-end;cursor:pointer;border:1px solid #E8E4DC;transition:all .4s ease}
.service-card:hover{border-color:#C69749;transform:translateY(-4px)}.service-card-bg{position:absolute;inset:0;z-index:0}
.service-card-bg img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease}
.service-card:hover .service-card-bg img{transform:scale(1.05)}
.service-card-bg::after{content:'';position:absolute;inset:0;background:linear-gradient(to top,rgba(27,27,31,.8) 0%,rgba(27,27,31,.1) 60%)}
.service-card-content{position:relative;z-index:1;padding:2rem;width:100%}
.service-card h3{font-family:'DM Serif Display',Georgia,serif;font-size:1.5rem;font-weight:400;color:#FAF8F5;margin-bottom:.25rem}
.service-card .price{font-size:1.125rem;font-weight:600;color:#C69749}
.service-card .service-desc{font-size:.875rem;color:rgba(250,248,245,.7);margin-top:.5rem;max-height:0;overflow:hidden;transition:max-height .4s ease}
.service-card:hover .service-desc{max-height:60px}
.service-card:first-child{grid-column:1/-1;min-height:400px}

/* --- MESTRE --- */
.mestre-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}
.mestre-card{overflow:hidden}
.mestre-img{width:100%;aspect-ratio:3/4;overflow:hidden;position:relative}
.mestre-img img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease;filter:grayscale(.3)}
.mestre-card:hover .mestre-img img{transform:scale(1.05);filter:grayscale(0)}
.mestre-img::after{content:'';position:absolute;inset:0;background:linear-gradient(to top,rgba(27,27,31,.3),transparent)}
.mestre-info{padding:1.25rem 0}
.mestre-info h3{font-family:'DM Serif Display',Georgia,serif;font-size:1.25rem;font-weight:400;color:#1B1B1F}
.mestre-info p{font-size:.875rem;color:#C69749;font-weight:500;margin-top:.25rem}

/* --- GALERIA --- */
.gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}
.gallery-item{overflow:hidden;position:relative;cursor:pointer}
.gallery-item:nth-child(1){grid-column:span 2;grid-row:span 2}
.gallery-item:nth-child(4){grid-column:span 2}
.gallery-item img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease}
.gallery-item:hover img{transform:scale(1.05)}.gallery-item .gallery-overlay{position:absolute;inset:0;background:rgba(27,27,31,.6);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .4s ease}
.gallery-item:hover .gallery-overlay{opacity:1}
.gallery-overlay span{color:#FAF8F5;font-family:'DM Serif Display',Georgia,serif;font-size:1.125rem}

/* --- TRABALHOS --- */
.trabalhos-wrapper{overflow:hidden}
.trabalhos-track{display:flex;gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:1rem}
.trabalhos-track::-webkit-scrollbar{display:none}.trabalho-slide{flex:0 0 auto;width:380px;scroll-snap-align:start;aspect-ratio:4/5;overflow:hidden;position:relative;cursor:pointer}
.trabalho-slide img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease}
.trabalho-slide:hover img{transform:scale(1.05)}.trabalho-slide .slide-label{position:absolute;bottom:0;left:0;right:0;padding:1.5rem;background:linear-gradient(to top,rgba(27,27,31,.8),transparent);color:#FAF8F5;font-size:.875rem;font-weight:500;opacity:0;transform:translateY(10px);transition:all .4s ease}
.trabalho-slide:hover .slide-label{opacity:1;transform:translateY(0)}
.carousel-controls{display:flex;gap:.75rem;margin-top:2rem;justify-content:center}
.carousel-btn{width:3rem;height:3rem;border:1px solid #A8A49C;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s ease;color:#1B1B1F}
.carousel-btn:hover{border-color:#C69749;color:#C69749;background:rgba(198,151,73,.05)}
.carousel-btn svg{width:1.25rem;height:1.25rem}

/* --- BOOKING --- */
.booking{background:#1B1B1F;color:#FAF8F5;padding:6rem 0}
.booking h2{color:#FAF8F5}.booking .section-desc{color:rgba(250,248,245,.6)}
.booking .section-tag::before{background:#C69749}
.booking-content{display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:start}
.booking-form{display:flex;flex-direction:column;gap:1.25rem}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
.form-group label{display:block;font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:rgba(250,248,245,.5);margin-bottom:.5rem}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:.875rem 1rem;background:rgba(250,248,245,.06);border:1px solid rgba(250,248,245,.12);color:#FAF8F5;font-family:'Inter',sans-serif;font-size:.9375rem;transition:border-color .3s;outline:none}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:#C69749}
.form-group input::placeholder,.form-group textarea::placeholder{color:rgba(250,248,245,.3)}
.form-group select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23C69749'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 1rem center;cursor:pointer}
.form-group select option{color:#1B1B1F}
.form-group textarea{resize:vertical;min-height:100px}
.booking-info{padding:2rem;border:1px solid rgba(250,248,245,.1)}
.booking-info h3{font-family:'DM Serif Display',Georgia,serif;font-size:1.5rem;color:#D4B06A;margin-bottom:1.5rem}
.booking-info-item{display:flex;gap:1rem;margin-bottom:1.25rem;align-items:flex-start}
.booking-info-item .icon{width:.875rem;height:.875rem;margin-top:.25rem;color:#C69749;flex-shrink:0}
.booking-info-item .label{font-size:.6875rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:rgba(250,248,245,.4)}
.booking-info-item .value{font-size:.9375rem;color:rgba(250,248,245,.85)}

/* --- CONTACTO --- */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:3rem}
.contact-info h3{font-family:'DM Serif Display',Georgia,serif;font-size:1.5rem;margin-bottom:.5rem}
.contact-info address{font-style:normal;font-size:.9375rem;color:#5A5A62;line-height:1.8;margin-bottom:2rem}
.contact-details{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}
.contact-details a{display:flex;align-items:center;gap:.75rem;font-size:.9375rem;color:#1B1B1F;transition:color .3s}
.contact-details a:hover{color:#C69749}
.contact-details svg{width:1rem;height:1rem;color:#C69749;flex-shrink:0}
.contact-social{display:flex;gap:.75rem}
.contact-social a{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border:1px solid #D4CEC4;transition:all .3s ease}
.contact-social a:hover{border-color:#C69749;background:rgba(198,151,73,.05)}
.contact-social svg{width:1rem;height:1rem;fill:#1B1B1F;transition:fill .3s}
.contact-social a:hover svg{fill:#C69749}
.contact-map{width:100%;min-height:400px;background:#E8E4DC;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}
.contact-map iframe{width:100%;height:100%;min-height:400px;border:none;filter:grayscale(1) invert(.05)}
.contact-map .map-fallback{text-align:center;color:#8A8580;font-size:.875rem}
.contact-map .map-fallback svg{width:2rem;height:2rem;margin-bottom:.5rem;fill:#8A8580}

/* --- Coração pulsante (footer) --- */
.footer-heart {
  display: inline-block;
  color: #C69749;
  animation: heartBeat 1.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}
.footer-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer-dev {
  font-size: 0.75rem;
  color: #9C9890;
}
.footer-dev a {
  color: #C69749;
  transition: color 0.3s;
}
.footer-dev a:hover {
  color: #D4B06A;
}

/* --- FOOTER --- */
.footer{background:#1B1B1F;color:#C0BCB5;padding:3rem 0 1.5rem}
.footer-inner{display:grid;grid-template-columns:2fr 1fr 1fr;gap:3rem;padding-bottom:2rem;border-bottom:1px solid rgba(250,248,245,.08);margin-bottom:1.5rem}
.footer-brand .logo{margin-bottom:1rem;display:inline-block}
.footer-brand p{font-size:.875rem;color:#C0BCB5;max-width:320px}
.footer-col h4{font-family:'Inter',sans-serif;font-size:.75rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#C69749;margin-bottom:1rem}
.footer-col a{display:block;font-size:.875rem;color:#C0BCB5;padding:.35rem 0;transition:color .3s}
.footer-col a:hover{color:#C69749}
.footer-col address{font-size:.875rem;color:#C0BCB5;padding:.35rem 0;line-height:1.6;font-style:normal}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;font-size:.8125rem;color:#9C9890}
.footer-social{display:flex;gap:.75rem}
.footer-social a{display:flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:1px solid rgba(250,248,245,.1);transition:all .3s ease}
.footer-social a:hover{border-color:#C69749;background:rgba(198,151,73,.1)}
.footer-social svg{width:.875rem;height:.875rem;fill:#C0BCB5;transition:fill .3s}
.footer-social a:hover svg{fill:#C69749}

/* --- SCROLL REVEAL — CSS only, plays immediately with staggered delays --- */
.reveal{opacity:0;will-change:transform,opacity}
.reveal{animation:revealUp .6s ease .1s forwards}
.reveal-delay-1{animation-delay:.2s}
.reveal-delay-2{animation-delay:.3s}
.reveal-delay-3{animation-delay:.4s}
.reveal-delay-4{animation-delay:.5s}
@keyframes revealUp{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}

/* --- CONTENT VISIBILITY (reduz TBT) — applied below the fold only --- */
.section, .booking, .footer { content-visibility: auto; contain-intrinsic-size: 600px; }
.section-alt { content-visibility: auto; contain-intrinsic-size: 600px; }
.gallery-grid { content-visibility: auto; contain-intrinsic-size: 400px; }
.booking .section-tag { color: #D4B06A; }
.hero-scroll { color: rgba(250, 248, 245, 0.8); }

/* --- RESPONSIVE --- */
@media(max-width:1024px){
  .header-nav{gap:1.25rem}
  .header-social{margin-left:1rem}
  .gallery-grid{grid-template-columns:repeat(3,1fr)}
  .gallery-item:nth-child(1){grid-column:span 2;grid-row:span 2}
  .gallery-item:nth-child(4){grid-column:span 2}
  .footer-inner{grid-template-columns:1fr 1fr;gap:2rem}
}
@media(max-width:768px){
  .header-nav{display:none}
  .header-nav.open{display:flex;flex-direction:column;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(27,27,31,.98);backdrop-filter:blur(20px);justify-content:center;align-items:center;gap:2rem;z-index:100}
  .header-nav.open a{font-size:1.5rem;color:#FAF8F5}
  .header-nav .header-social{display:none}
  .header-nav.open .header-social{display:flex!important;margin-top:1rem;margin-left:0}
  .menu-toggle{display:block}
  .section{padding:4rem 0}
  .oficio-grid{grid-template-columns:1fr}
  .services-grid{grid-template-columns:1fr}
  .service-card:first-child{min-height:320px}
  .mestre-grid{grid-template-columns:1fr 1fr;gap:1.5rem}
  .gallery-grid{grid-template-columns:repeat(2,1fr);gap:.5rem}
  .gallery-item:nth-child(1){grid-column:span 2;grid-row:span 1}
  .gallery-item:nth-child(4){grid-column:span 2}
  .booking-content{grid-template-columns:1fr;gap:2rem}
  .form-row{grid-template-columns:1fr}
  .contact-grid{grid-template-columns:1fr}
  .contact-map{min-height:300px}
  .trabalho-slide{width:280px}
  .footer-inner{grid-template-columns:1fr;gap:2rem}
  .footer-bottom{flex-direction:column;gap:1rem;text-align:center}
  .footer-bottom-left{align-items:center}
}
@media(max-width:480px){
  .mestre-grid{grid-template-columns:1fr}
  .gallery-grid{grid-template-columns:1fr 1fr}
  .hero-title{font-size:clamp(2.2rem,15vw,3.5rem)}
  .booking-info{padding:1.5rem}
}