/*
Theme Name: Del Toro Facial Plastic Surgery
Theme URI: https://deltorodiez.com
Author: Prompt Studios
Author URI: https://prompt-studios.com
Description: Lightweight custom one-page responsive theme for Dr. Edgar F. Del Toro, facial plastic & reconstructive surgeon in Mayagüez, Puerto Rico. Modern-luxury, minimalist, wabi-sabi inspired. Bilingual (ES/EN) toggle, no page builder or bloat.
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: deltorodiez
*/

/* ==========================================================================
   0. Variables & Reset
   ========================================================================== */
:root {
  /* Brand palette — sand/neutral tones are the dominant colors;
     teal is reserved for small, deliberate accents only (buttons,
     hover states, icons, underlines) — never large fills. */
  --color-white: #ffffff;
  --color-cream: #e6dfd4;
  --color-taupe: #c0b6a3;
  --color-charcoal: #41403e;
  --color-charcoal-dark: #2a2927;
  --color-deep: #003139;

  --color-bg: var(--color-white);
  --color-bg-alt: var(--color-cream);
  --color-text: var(--color-charcoal);
  --color-text-light: #7d7a6f;
  --color-accent: var(--color-deep);
  --color-dark: var(--color-charcoal);

  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --max-width: 1160px;
  --radius: 10px;
  --radius-pill: 999px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--color-charcoal);
  letter-spacing: 0.02em;
}
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--color-taupe);
  font-weight: 600;
  margin-bottom: 0.9em;
  display: block;
}

.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), transform var(--transition), opacity var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-taupe);
  color: var(--color-deep);
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--color-white);
}
.btn-outline:hover { background: var(--color-white); color: var(--color-deep); border-color: var(--color-white); }

.btn-light {
  background: var(--color-white);
  color: var(--color-deep);
}
.btn-light:hover { background: var(--color-cream); transform: translateY(-1px); }

/* ==========================================================================
   1. Bilingual toggle (ES/EN shown/hidden via body[data-lang])
   ========================================================================== */
body[data-lang="es"] .lang-en { display: none !important; }
body[data-lang="en"] .lang-es { display: none !important; }

.lang-switch {
  display: flex;
  gap: 4px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-pill);
  padding: 3px;
  transition: border-color var(--transition);
}

.site-header.is-scrolled .lang-switch { border-color: rgba(65,64,62,0.2); }

.lang-switch button {
  border: none;
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.site-header.is-scrolled .lang-switch button { color: var(--color-charcoal); }

.lang-switch button.is-active {
  background: var(--color-deep);
  color: var(--color-white);
}

/* ==========================================================================
   2. Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: 10px;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}

/* Solid state, applied by JS once the hero has scrolled out of view */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(65,64,62,0.08);
  backdrop-filter: saturate(160%) blur(10px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-white);
  transition: color var(--transition);
}

.site-header.is-scrolled .site-branding { color: var(--color-charcoal); }

.site-branding img.custom-logo { max-height: 46px; }

.site-branding .site-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-white);
  line-height: 1.15;
  transition: color var(--transition);
}

.site-header.is-scrolled .site-branding .site-title { color: var(--color-charcoal); }

.site-branding .site-title small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
  transition: color var(--transition);
}

.site-header.is-scrolled .site-branding .site-title small { color: var(--color-text-light); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav ul {
  display: flex;
  gap: 28px;
}

.main-nav a {
  color: var(--color-white);
  font-size: 0.78rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.site-header.is-scrolled .main-nav a { color: var(--color-charcoal); }

.main-nav a:hover { color: var(--color-cream); }
.site-header.is-scrolled .main-nav a:hover { color: var(--color-deep); }

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: var(--color-cream);
  transition: width var(--transition), background var(--transition);
}

.site-header.is-scrolled .main-nav a::after { background: var(--color-deep); }

.main-nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--color-white);
  transition: background var(--transition);
}

.site-header.is-scrolled .nav-toggle span { background: var(--color-charcoal); }

/* ==========================================================================
   3. Hero
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  background: url('img/hero-bg.jpg') center/cover no-repeat, var(--color-charcoal);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(192,182,163,0.2), transparent 55%),
    radial-gradient(circle at 8% 92%, rgba(230,223,212,0.1), transparent 50%),
    linear-gradient(160deg, rgba(42,41,39,0.86) 0%, rgba(65,64,62,0.78) 55%, rgba(65,64,62,0.62) 100%);
}

.hero::after {
  content: '';
  position: absolute;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  right: -14vw;
  bottom: -18vw;
  background: rgba(192,182,163,0.08);
  border-radius: 61% 39% 52% 48% / 44% 49% 51% 56%;
}

.hero .container { position: relative; }

.hero-content { max-width: 640px; }

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 4.3vw, 3.2rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.45em;
}

.hero h1 em {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  color: var(--color-cream);
}

.hero p.lead {
  font-size: 1.08rem;
  color: rgba(255,255,255,0.82);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-credentials {
  margin-top: 52px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-credentials div {
  border-left: 1px solid var(--color-taupe);
  padding-left: 16px;
}

.hero-credentials strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
}

.hero-credentials span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   4. About
   ========================================================================== */
.about {
  padding: 120px 0;
  background: var(--color-white);
}

.about .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}

.about-photo {
  aspect-ratio: 4 / 5;
  background: var(--color-cream);
  border-radius: 63% 37% 54% 46% / 43% 51% 49% 57%;
  color: var(--color-text-light);
  font-size: 0.88rem;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 40px 70px -30px rgba(0, 49, 57, 0.25);
}

.about-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.about h2 { font-size: 2rem; font-weight: 300; }

.about-list {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.about-list li {
  display: flex;
  gap: 12px;
  font-size: 0.94rem;
  color: var(--color-text-light);
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(65,64,62,0.08);
}

.about-list li strong {
  color: var(--color-charcoal);
  font-weight: 600;
}

.about-list li:last-child { border-bottom: none; padding-bottom: 0; }

.about-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--color-taupe);
  flex-shrink: 0;
}

/* ==========================================================================
   5. Services
   ========================================================================== */
.services {
  position: relative;
  padding: 140px 0;
  background: url('img/services-bg.jpg') center/cover no-repeat, linear-gradient(160deg, var(--color-charcoal) 0%, var(--color-charcoal-dark) 100%);
  color: var(--color-white);
  overflow: hidden;
}

.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(42,41,39,0.85) 0%, rgba(65,64,62,0.78) 100%);
}

.services .container { position: relative; }

.services-header {
  max-width: 640px;
  margin: 0 auto 70px;
  text-align: center;
}

.services-header h2 { color: var(--color-white); font-size: 2.1rem; font-weight: 300; }
.services-header p { color: rgba(255,255,255,0.72); }

.services-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 40px;
  align-items: start;
}

.service-panel {
  background: transparent;
  padding: 0;
  border: none;
}

.service-panel h3 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-white);
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

.service-panel ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.service-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}

.service-panel li .plus {
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.services-cta {
  text-align: center;
  margin-top: 72px;
}

/* ==========================================================================
   5.1 Gallery
   ========================================================================== */
.gallery {
  padding: 120px 0;
  background: var(--color-white);
}

.gallery-header {
  max-width: 640px;
  margin: 0 auto 60px;
  text-align: center;
}

.gallery-header h2 { font-size: 2.1rem; font-weight: 300; }
.gallery-header p { color: var(--color-text-light); }

.gallery-slider { position: relative; }

.gallery-track {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 24px 4px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-track::-webkit-scrollbar { display: none; }

.gallery-slide {
  flex: 0 0 auto;
  width: 300px;
  aspect-ratio: 4 / 5;
  margin: 0;
  scroll-snap-align: center;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(0, 49, 57, 0.22);
}

.gallery-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gallery-slide.blob-1 { border-radius: 63% 37% 54% 46% / 43% 51% 49% 57%; transform: rotate(-3deg); }
.gallery-slide.blob-2 { border-radius: 42% 58% 65% 35% / 48% 42% 58% 52%; transform: rotate(2deg); }
.gallery-slide.blob-3 { border-radius: 58% 42% 39% 61% / 55% 48% 52% 45%; transform: rotate(-1.5deg); }
.gallery-slide.blob-4 { border-radius: 48% 52% 62% 38% / 40% 55% 45% 60%; transform: rotate(3deg); }
.gallery-slide.blob-5 { border-radius: 65% 35% 46% 54% / 52% 60% 40% 48%; transform: rotate(-2.5deg); }

.gallery-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid rgba(65,64,62,0.15);
  color: var(--color-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.18);
  transition: background var(--transition), color var(--transition);
  z-index: 2;
}

.gallery-arrow:hover { background: var(--color-deep); color: var(--color-white); }
.gallery-arrow svg { width: 18px; height: 18px; }
.gallery-prev { left: -10px; }
.gallery-next { right: -10px; }

/* ==========================================================================
   6. Contact
   ========================================================================== */
.contact {
  padding: 120px 0;
  background: var(--color-taupe);
  color: var(--color-charcoal);
}

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
}

.contact .section-label { color: var(--color-deep); }

.contact h2 { color: var(--color-charcoal); font-size: 2rem; font-weight: 300; }

.contact p.lead { color: rgba(65,64,62,0.75); }

.contact-list { margin-top: 30px; display: grid; gap: 22px; }

.contact-list li { display: flex; gap: 16px; align-items: flex-start; }

.contact-list .icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-cream);
  color: var(--color-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-list .icon svg { width: 18px; height: 18px; }

.contact-list strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-deep);
  margin-bottom: 6px;
}
.contact-list span, .contact-list a { color: rgba(65,64,62,0.85); font-size: 0.9rem; }
.contact-list a:hover { color: var(--color-deep); }
.contact-list .note {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: rgba(65,64,62,0.55);
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  border: 1px solid rgba(65,64,62,0.18);
}

.contact-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer {
  background: var(--color-cream);
  color: var(--color-text-light);
  padding: 28px 0;
  font-size: 0.8rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a:hover { color: var(--color-deep); }

/* ==========================================================================
   7.1 Animations
   ========================================================================== */

/* Scroll-triggered entrances. JS toggles .is-visible via IntersectionObserver;
   .reveal-left/-right/-scale set the starting offset, .reveal always fades+lifts. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.reveal-left { transform: translate(-40px, 0); }
.reveal.reveal-right { transform: translate(40px, 0); }
.reveal.reveal-scale { transform: translateY(20px) scale(0.94); }

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Hero content fades/lifts in on load (above the fold, not scroll-triggered) */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1,
.hero p.lead,
.hero-actions,
.hero-credentials {
  opacity: 0;
  animation: hero-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 { animation-delay: 0.1s; }
.hero p.lead { animation-delay: 0.25s; }
.hero-actions { animation-delay: 0.4s; }
.hero-credentials { animation-delay: 0.55s; }

/* Slow idle float on the hero's decorative organic shape */
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12px, 14px) scale(1.04); }
}

.hero::after { animation: blob-float 18s ease-in-out infinite; }

/* Micro-interactions */
.gallery-slide img { transition: transform 0.6s ease; }
.gallery-slide:hover img { transform: scale(1.08); }

.service-panel li { transition: padding-left 0.3s ease, color 0.3s ease; }
.service-panel li:hover { padding-left: 6px; color: var(--color-white); }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.reveal-left,
  .reveal.reveal-right,
  .reveal.reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero h1, .hero p.lead, .hero-actions, .hero-credentials {
    animation: none !important;
    opacity: 1 !important;
  }
  .hero::after { animation: none !important; }
  .gallery-slide img { transition: none !important; }
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .about .container { grid-template-columns: 1fr; }
  .about-photo { max-width: 380px; margin: 0 auto; }
  .services-columns { grid-template-columns: 1fr 1fr; }
  .contact .container { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-header { padding-top: 14px; }

  .hero { padding-top: 94px; }

  .main-nav {
    position: fixed;
    top: 94px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid rgba(65,64,62,0.08);
    box-shadow: 0 12px 24px -12px rgba(0,0,0,0.1);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 24px;
    transform: translateY(-150%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
  }

  .main-nav.is-open { transform: translateY(0); opacity: 1; }

  .main-nav ul { flex-direction: column; gap: 18px; }

  /* The dropdown panel is always a light surface, regardless of whether
     the fixed header itself is transparent or solid at this scroll position */
  .main-nav a { color: var(--color-charcoal); }
  .main-nav a:hover { color: var(--color-deep); }

  .nav-toggle { display: flex; }

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

  .hero-actions { flex-direction: column; align-items: flex-start; }

  .hero-credentials { gap: 24px; }

  .gallery-arrow { display: none; }
  .gallery-slide { width: 240px; }

  /* Lighter, faster entrances on mobile — large transforms feel janky on
     phones, and the idle blob float isn't worth the battery/GPU cost. */
  .reveal,
  .reveal.reveal-left,
  .reveal.reveal-right,
  .reveal.reveal-scale {
    transform: translateY(16px);
    transition-duration: 0.5s;
  }

  .hero::after { animation: none; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .about, .services, .contact, .gallery { padding: 80px 0; }
  .service-panel ul { grid-template-columns: 1fr; }
}
