/* ============================================
   BUENO STUDIO — styles.css
   Mobile-first. Clean. Conversion-focused.
   ============================================ */

/* --- Variables --- */
:root {
  --dark: #0f172a;
  --dark-2: #1e293b;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --white: #ffffff;
  --light: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --whatsapp: #25d366;
  --whatsapp-hover: #1ebd5a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  touch-action: manipulation;
}

a {
  touch-action: manipulation;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

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

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

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

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

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

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: transparent;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.nav--scrolled {
  background: var(--dark);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo svg {
  display: block;
  width: auto;
}

.nav-menu {
  display: none;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.18s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.25rem 0.1rem;
  transition: color 0.18s ease;
  letter-spacing: 0.04em;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--white);
}

.lang-divider {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

.nav-cta {
  display: none;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--white);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.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 menu */
.nav-menu.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--dark);
  padding: 1.5rem 1.25rem 2rem;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.nav-menu.open .nav-link {
  padding: 0.875rem 0;
  font-size: 1.0625rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  background: var(--dark);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-height) + 3rem) 1.25rem 4rem;
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-ctas .btn {
  width: 100%;
  justify-content: center;
}

/* Subtle dot grid background */
.hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(
    rgba(99, 102, 241, 0.15) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
}

/* Split variant — text + visual side by side (case study pages) */
.hero--split .hero-container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-visual img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: block;
}

@media (min-width: 768px) {
  .hero--split .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
}

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

.section-header--light p {
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  background: var(--light);
  padding: 5rem 1.25rem;
}

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

/* Last card spans full width when alone in a row (5th card in 2-col grid) */
.services-grid > .service-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.service-icon {
  width: 44px;
  height: 44px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
}

.service-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio {
  background: var(--dark);
  padding: 5rem 1.25rem;
}

.portfolio-grid {
  display: grid;
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--dark-2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.portfolio-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.portfolio-image {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.portfolio-image--1 {
  background-image: url("../images/juvetotecno_thumbnail.jpg");
}

.portfolio-image--2 {
  background-image: url("../images/candelaria_thumbnail.jpg");
}

.portfolio-image--3 {
  background-image: url("../images/quinta_thumbnail.webp");
  background-position: center top;
}

.portfolio-image--4 {
  background-image: url("../images/vancouver_pet_services_thumbnail.jpg");
}

.portfolio-info {
  padding: 1.5rem;
}

.portfolio-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.portfolio-info p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.portfolio-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition:
    color 0.18s ease,
    gap 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.portfolio-link:hover {
  color: #818cf8;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  background: var(--white);
  padding: 5rem 1.25rem;
}

.about-content {
  max-width: 680px;
  margin: 0 auto;
}

.about-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.about-body {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-tagline {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2rem;
  font-style: italic;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  background: var(--dark);
  padding: 5rem 1.25rem;
}

.contact-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contact-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.contact-content > p {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2.5rem;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.contact-actions .btn {
  width: 100%;
  justify-content: center;
}

.contact-note {
  margin-top: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #080e1a;
  padding: 2rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo svg {
  display: block;
  width: auto;
}

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   FLOATING WHATSAPP BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 1rem));
  right: 1.25rem;
  z-index: 99;
  width: 56px;
  height: 56px;
  background: var(--whatsapp);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.18s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  background: var(--whatsapp-hover);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

/* ============================================
   RESPONSIVE — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .nav-cta {
    display: inline-flex;
  }

  .hero {
    padding: calc(var(--nav-height) + 4rem) 2rem 5rem;
  }

  .hero-ctas {
    flex-direction: row;
  }

  /* Restore natural button width on tablet+ */
  .hero-ctas .btn,
  .contact-actions .btn {
    width: auto;
    justify-content: flex-start;
  }

  .services {
    padding: 6rem 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  /* Reset last-child override — not needed in 3-col grid */
  .services-grid > .service-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .portfolio {
    padding: 6rem 2rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about {
    padding: 6rem 2rem;
  }

  .contact {
    padding: 6rem 2rem;
  }

  .contact-actions {
    flex-direction: row;
    justify-content: center;
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================
   RESPONSIVE — Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  .nav-container {
    padding: 0 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
