/* ========================================
   Café Sierra Negra — Stylesheet
   ======================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* ── Custom Properties (Design Tokens) ── */
:root {
  /* Colores principales */
  --color-dark: #2B1709;
  /* café muy oscuro — textos principales  */
  --color-brown: #3E2316;
  /* café oscuro — header / footer         */
  --color-accent: #C47B2B;
  /* naranja tostado / dorado — CTA        */
  --color-accent-hover: #D9922F;
  /* dorado claro — hover CTA              */
  --color-cream: #FAF3E8;
  /* crema / beige claro — fondos          */
  --color-cream-alt: #F2E8D5;
  /* crema más intenso — sección alterna   */
  --color-white: #FFFFFF;
  --color-light-text: #F5EDE3;
  /* texto claro sobre fondo oscuro        */
  --color-muted: #8C7A6B;
  /* texto secundario                      */
  --color-border: #D4C4AE;
  /* bordes suaves                         */

  /* Tipografía */
  --font-family: 'Montserrat', sans-serif;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(43, 23, 9, .08);
  --shadow-md: 0 4px 20px rgba(43, 23, 9, .12);
  --shadow-lg: 0 8px 32px rgba(43, 23, 9, .18);

  /* Radios */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transición */
  --transition: .3s ease;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* compensa header fijo */
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  color: var(--color-dark);
  background-color: var(--color-cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* =============================================
   HEADER — fijo, café oscuro
   ============================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--color-brown);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5%;
  box-shadow: var(--shadow-md);
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ── Navegación ── */
nav ul {
  display: flex;
  gap: 6px;
}

nav ul li a {
  color: var(--color-light-text);
  font-weight: 500;
  font-size: .95rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

nav ul li a:hover,
nav ul li a:focus-visible {
  background-color: rgba(255, 255, 255, .12);
  color: var(--color-accent);
}

/* ── Barra de búsqueda ── */
.search-bar {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}

.search-bar:focus-within {
  border-color: var(--color-accent);
  background-color: rgba(255, 255, 255, .18);
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-light-text);
  font-family: var(--font-family);
  font-size: .88rem;
  padding: 8px 14px;
  width: 160px;
}

.search-bar input::placeholder {
  color: var(--color-muted);
}

.search-bar button {
  background: transparent;
  border: none;
  color: var(--color-light-text);
  cursor: pointer;
  padding: 8px 14px;
  font-size: 1rem;
  transition: color var(--transition);
}

.search-bar button:hover {
  color: var(--color-accent);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('https://images.unsplash.com/photo-1497935586351-b67a49e012bf?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center / cover no-repeat fixed;
  padding: 120px 5% 80px;
}

/* Overlay oscuro */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, .65) 0%,
      rgba(43, 23, 9, .72) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, .85);
  font-weight: 300;
  margin-bottom: 32px;
}

/* ── Botón CTA ── */
.cta-button {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 38px;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(196, 123, 43, .4);
}

.cta-button:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(196, 123, 43, .55);
}

.cta-button:active {
  transform: translateY(0);
}

/* =============================================
   VIDEO SECTION
   ============================================= */
.video-section {
  background-color: var(--color-cream-alt);
  padding: 70px 5%;
  text-align: center;
}

.video-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 36px;
  position: relative;
}

/* Decoración bajo el título */
.video-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 2px;
  margin: 14px auto 0;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 56.25%;
  /* ratio 16:9 */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background-color: var(--color-brown);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-section {
  background-color: var(--color-cream);
  padding: 70px 5%;
  display: flex;
  flex-direction: column;
  /* mobile-first: columna única */
  gap: 40px;
}

/* ── Info de contacto ── */
.contact-info {
  flex: 1;
}

.contact-info h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 22px;
  position: relative;
}

.contact-info h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 2px;
  margin-top: 12px;
}

.contact-info p {
  font-size: 1rem;
  color: var(--color-dark);
  margin-bottom: 14px;
  line-height: 1.8;
}

/* ── Formulario ── */
.contact-form {
  flex: 1;
  background-color: var(--color-white);
  padding: 36px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-form h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 24px;
}

.contact-form label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-family);
  font-size: .95rem;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-cream);
  color: var(--color-dark);
  margin-bottom: 18px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(196, 123, 43, .18);
}

.contact-form textarea {
  resize: vertical;
}

/* ── Botón Submit ── */
.submit-btn {
  display: inline-block;
  width: 100%;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(196, 123, 43, .35);
}

.submit-btn:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(196, 123, 43, .5);
}

.submit-btn:active {
  transform: translateY(0);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background-color: var(--color-brown);
  color: var(--color-muted);
  text-align: center;
  padding: 28px 5%;
  font-size: .88rem;
  letter-spacing: .5px;
}

/* =============================================
   MEDIA QUERIES — Mobile First → Desktop
   ============================================= */

/* ── Tablets  (≥ 768px) ── */
@media (min-width: 768px) {

  /* Contacto a dos columnas */
  .contact-section {
    flex-direction: row;
    align-items: flex-start;
  }

  .contact-info,
  .contact-form {
    flex: 1;
  }

  /* Hero ajuste */
  .hero-content h1 {
    font-size: 2.6rem;
  }
}

/* ── Desktop  (≥ 1024px) ── */
@media (min-width: 1024px) {

  header {
    padding: 14px 6%;
  }

  .search-bar input {
    width: 200px;
  }

  .hero-content h1 {
    font-size: 3.4rem;
  }

  .video-section,
  .contact-section {
    padding: 90px 8%;
  }
}

/* ── Pantallas pequeñas (≤ 600px) ── */
@media (max-width: 600px) {

  header {
    flex-direction: column;
    gap: 10px;
    padding: 12px 4%;
    text-align: center;
  }

  nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  nav ul li a {
    font-size: .85rem;
    padding: 6px 12px;
  }

  .search-bar {
    width: 100%;
    justify-content: center;
  }

  .search-bar input {
    width: 100%;
  }

  .hero {
    min-height: 90vh;
    padding: 100px 6% 60px;
  }

  .contact-form {
    padding: 28px 20px;
  }
}