/*
  Tinnit Comunicación - Stylesheet
  Paleta:
  - Azul Mar Profundo: #0D1B2A
  - Dorado Suave: #C9A74D
  - Blanco Puro: #FFFFFF
  - Gris Grafito: #2E2E2E
*/

:root {
  --deep-blue: #0D1B2A;
  --soft-gold: #C9A74D;
  --pure-white: #FFFFFF;
  --graphite-gray: #2E2E2E;
  --font-title: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
}

/* --- Base & Typography --- */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--deep-blue);
  color: var(--graphite-gray);
  overflow-x: hidden;
}

section {
    /* Animation for sections on scroll will be added via JS */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--deep-blue);
  font-weight: 700;
}

p {
  line-height: 1.7;
  font-size: 1rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2rem;
    text-align: center;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

/* --- Header & Navigation --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* High z-index for header */
  transition: background-color 0.4s ease;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    opacity: 1; /* Always visible in nav */
    transition: opacity 0.3s ease;
    z-index: 1001; /* Above menu */
}

.nav-logo img {
    height: 60px;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--deep-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--soft-gold);
}

.main-header.scrolled {
  transform: translateY(0);
  visibility: visible;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden by default, shown in media query */
    z-index: 1001; /* Above menu */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--deep-blue);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    position: absolute;
    left: 2.5px;
}

.hamburger-menu span:nth-child(1) { top: 5px; }
.hamburger-menu span:nth-child(2) { top: 13px; }
.hamburger-menu span:nth-child(3) { top: 21px; }

.hamburger-menu.is-open span:nth-child(1) { top: 13px; transform: rotate(45deg); }
.hamburger-menu.is-open span:nth-child(2) { opacity: 0; }
.hamburger-menu.is-open span:nth-child(3) { top: 13px; transform: rotate(-45deg); }

/* Mobile Navigation - Side Drawer */
.mobile-nav-container {
    position: fixed;
    top: 0;
    right: -280px; /* Start off-screen */
    width: 280px;
    height: 100vh;
    background-color: var(--deep-blue);
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-nav-container.is-open {
    transform: translateX(-280px);
}

.mobile-nav-links {
    list-style: none;
    padding: 0 0 0 3rem; /* Indent links */
    margin: 0;
    text-align: left;
}

.mobile-nav-links li {
    margin: 2.5rem 0;
}

.mobile-nav-links a {
    color: var(--pure-white);
    text-decoration: none;
    font-size: 1.8rem;
    font-family: var(--font-title);
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--soft-gold);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below menu, above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* Allow scrolling on mobile */
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    transition: opacity 0.3s ease;
}

.hero-logo img {
    height: 450px; /* Increased size */
    display: block;
    margin: 0 auto 2rem auto;
    animation: subtle-glow 4s ease-in-out infinite;
}

.main-header.scrolled ~ main .hero-logo {
    opacity: 0; /* Hide hero logo on scroll */
}

.hero-title {
  font-size: 3.5rem;
  color: var(--pure-white);
  margin: 0 0 1rem 0;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    fill: var(--pure-white);
}

/* --- Buttons --- */
.btn-primary {
  background-color: var(--soft-gold);
  color: var(--deep-blue);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: 1px solid var(--soft-gold);
  cursor: pointer;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--soft-gold);
  transform: scale(1.05);
}

.btn-secondary {
    background-color: transparent;
    color: var(--pure-white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--pure-white);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--pure-white);
    color: #060010;
}

/* --- Services Section --- */
.services-section {
    background-color: #f9f9f9;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--pure-white);
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 2.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 40px;
    height: 40px;
    color: var(--soft-gold);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Proyectos Section --- */
.proyectos-section {
    background-color: #f9f9f9;
}

.proyectos-section .section-title,
.proyectos-section .section-subtitle {
    color: var(--deep-blue);
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.proyecto-card {
    background: var(--pure-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.proyecto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.proyecto-card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.proyecto-card-content {
    padding: 2rem;
    text-align: left;
}

.proyecto-card-content h3 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.proyecto-card-content p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.proyecto-card-content .btn-secondary {
    background-color: var(--deep-blue);
    color: var(--pure-white);
    border-color: var(--deep-blue);
}

.proyecto-card-content .btn-secondary:hover {
    background-color: var(--soft-gold);
    color: var(--deep-blue);
    border-color: var(--soft-gold);
}

/* --- Social Proof Section --- */
.social-proof-section {
    background-color: #f9f9f9;
}

.client-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.client-logo img {
    height: 60px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* --- CTA Section & Form --- */
.cta-section {
    background-color: var(--graphite-gray);
}

.cta-section .section-title,
.cta-section .section-subtitle {
    color: var(--pure-white);
}

.cta-section .section-subtitle {
    margin-bottom: 3rem;
}

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

.form-group {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 800px;
}

.contact-form input {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--pure-white);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus {
    outline: none;
    border-color: var(--soft-gold);
}

.contact-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.cta-section .btn-primary {
    width: 100%;
    max-width: 800px;
}

.cta-section .btn-primary:hover {
    background-color: var(--pure-white);
    color: var(--graphite-gray);
    border-color: var(--pure-white);
}

#form-confirmation {
    color: var(--soft-gold);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    display: none; /* Hidden by default */
}

/* --- Footer --- */
.main-footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--deep-blue);
  color: rgba(255, 255, 255, 0.7);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes subtle-glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(201, 167, 77, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(201, 167, 77, 0.7));
  }
}

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

/* --- Scroll Animation --- */
.service-card, .proyecto-card, .social-proof-section .container, .cta-section .container {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.service-card.is-visible, 
.proyecto-card.is-visible,
.social-proof-section .container.is-visible,
.cta-section .container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
  .hero-logo img {
    height: 250px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .container {
    padding: 4rem 1rem;
  }
  .form-group {
      flex-direction: column;
  }

  .nav-links {
      display: none; /* Hide desktop links */
  }

  .hamburger-menu {
      display: block; /* Show hamburger */
  }

  .contact-form input {
    width: calc(100% - 2rem); /* Adjust for padding */
  }

  .cta-section .btn-primary {
    width: calc(100% - 2rem); /* Adjust for padding */
  }
}ray);
    border-color: var(--pure-white);
}

#form-confirmation {
    color: var(--soft-gold);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    display: none; /* Hidden by default */
}

/* --- Footer --- */
.main-footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--deep-blue);
  color: rgba(255, 255, 255, 0.7);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes subtle-glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(201, 167, 77, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(201, 167, 77, 0.7));
  }
}

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

/* --- Scroll Animation --- */
.service-card, .proyecto-card, .social-proof-section .container, .cta-section .container {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.service-card.is-visible, 
.proyecto-card.is-visible,
.social-proof-section .container.is-visible,
.cta-section .container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
  .hero-logo img {
    height: 250px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .container {
    padding: 4rem 1rem;
  }
  .form-group {
      flex-direction: column;
  }

  .main-nav {
  }

  .nav-links {
      display: none; /* Hide links on mobile, recommend hamburger menu */
  }
}