/* --- Variables --- */
:root {
  --color-earth: #1f1510;
  --color-leather: #3d2a1f;
  --color-tan: #8b6914;
  --color-gold: #b8860b;
  --color-cream: #f5efe6;
  --color-warm-white: #faf7f2;
  --color-border: rgba(139, 105, 20, 0.2);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --radius: 6px;
  --transition: 0.25s ease;
}

/* --- Reset & base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-earth);
  background: var(--color-warm-white);
}

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

a {
  color: var(--color-tan);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-gold);
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-lg);
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--color-leather);
}

.logo:hover {
  color: var(--color-leather);
  opacity: 0.9;
}

.logo-img {
  height: 54px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo picture {
  display: block;
}

.logo-text.logo-fallback {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-leather);
  white-space: nowrap;
}

.footer-logo .logo-text.logo-fallback {
  color: var(--color-cream);
  font-size: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-xs);
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-leather);
}

.main-nav {
  display: flex;
  gap: var(--space-lg);
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-leather);
}

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

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: var(--space-sm);
}

.lang-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.25rem 0.35rem;
  border-radius: var(--radius);
  opacity: 0.65;
  transition: opacity var(--transition);
  text-decoration: none;
  color: inherit;
}

.lang-link:hover {
  opacity: 1;
}

.lang-link.is-active {
  opacity: 1;
}

.lang-code {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-leather);
  line-height: 1;
}

.lang-flag {
  display: block;
  line-height: 0;
}

.lang-flag img {
  display: block;
  width: 24px;
  height: 16px;
  object-fit: cover;
}

.lang-switcher-footer {
  margin-left: 0;
  margin-right: 0;
}

.lang-switcher-footer .lang-link {
  padding: 0.2rem 0.3rem;
}

.lang-switcher-footer .lang-code {
  font-size: 0.6rem;
  color: var(--color-cream);
}

.lang-switcher-footer .lang-flag img {
  width: 22px;
  height: 15px;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(80px + var(--space-xl)) var(--space-lg) var(--space-2xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-leather) 0%, var(--color-earth) 50%);
  opacity: 0.94;
}

/* Patrón de triángulos inspirado en el logo (parte marrón del hero) */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='70' viewBox='0 0 80 70'%3E%3Cg fill='none' stroke='%23b8860b' stroke-opacity='0.08' stroke-width='0.8'%3E%3Cpath d='M40 5 L75 65 L5 65 Z'/%3E%3Cpath d='M40 25 L60 55 L20 55 Z'/%3E%3C/g%3E%3Cg fill='%23f5efe6' fill-opacity='0.04'%3E%3Cpath d='M40 8 L72 62 L8 62 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 70px;
  background-repeat: repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  text-align: center;
}

.hero-tagline {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-cream);
  margin: 0 0 var(--space-md);
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(245, 239, 230, 0.9);
  margin: 0 0 var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: rgba(245, 239, 230, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(245, 239, 230, 0.5), transparent);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-earth);
  border: none;
}

.btn-primary:hover {
  background: #c99a0f;
  color: var(--color-earth);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-cream);
  border: 2px solid rgba(245, 239, 230, 0.5);
}

.btn-secondary:hover {
  border-color: var(--color-cream);
  color: var(--color-cream);
}

/* --- Sections --- */
.section {
  padding: var(--space-2xl) var(--space-lg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-tan);
  margin-bottom: var(--space-xs);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--color-leather);
  margin: 0;
}

/* --- Empresa --- */
.section-empresa {
  background: var(--color-warm-white);
}

.container-empresa {
  max-width: 900px;
}

.empresa-block {
  margin-bottom: var(--space-2xl);
}

.empresa-block:last-child {
  margin-bottom: 0;
}

.empresa-subtitle {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-leather);
  margin: 0 0 var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.empresa-foto {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.empresa-history {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.empresa-history-last {
  margin-bottom: 0;
}

.empresa-history:nth-of-type(even) {
  direction: rtl;
}

.empresa-history:nth-of-type(even) > * {
  direction: ltr;
}

.empresa-history-text p {
  margin: 0 0 var(--space-md);
  color: var(--color-earth);
}

.empresa-history-text p:last-child {
  margin-bottom: 0;
}

.empresa-foto-logo {
  max-width: 480px;
}

.empresa-block > p {
  margin: 0 0 var(--space-md);
  color: var(--color-earth);
}

.empresa-present,
.empresa-future {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: var(--space-xl);
  align-items: start;
}

.empresa-present-text p,
.empresa-future-text p {
  margin: 0 0 var(--space-md);
  color: var(--color-earth);
}

.empresa-present-text p:last-child,
.empresa-future-text p:last-child {
  margin-bottom: 0;
}

.empresa-present-imgs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.empresa-present-imgs .empresa-foto {
  max-width: 280px;
}

.empresa-present-lwg {
  max-width: 140px;
  height: auto;
}

.empresa-future .empresa-foto {
  max-width: 280px;
}

.section-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.section-img-wrap .section-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-visual {
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, #e8e0d5, #d4c9ba);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(61, 42, 31, 0.4);
  font-size: 0.9rem;
}

.section-img-wrap .placeholder-visual {
  position: relative;
}

.placeholder-visual.compact {
  aspect-ratio: 21/9;
  max-height: 200px;
}

/* --- Productos --- */
.section-productos {
  background: var(--color-cream);
}

.productos-intro {
  margin-bottom: var(--space-xl);
  max-width: 640px;
}

.productos-intro p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-leather);
}

/* --- Proceso del cuero --- */
.proceso-block {
  margin-top: var(--space-xl);
}

.proceso-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-leather);
  margin: 0 0 var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.proceso-step {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.proceso-step-noimg {
  grid-template-columns: 1fr;
}

.proceso-step:nth-child(even):not(.proceso-step-noimg) {
  direction: rtl;
}

.proceso-step:nth-child(even):not(.proceso-step-noimg) > * {
  direction: ltr;
}

.proceso-step:nth-child(even):not(.proceso-step-noimg) .proceso-img {
  order: 2;
}

.proceso-img {
  width: 400px;
  max-width: 100%;
  aspect-ratio: 400 / 250;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.proceso-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

.proceso-text h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-leather);
  margin: 0 0 var(--space-xs);
}

.proceso-text p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-earth);
  line-height: 1.6;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.producto-card {
  background: var(--color-warm-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}

.producto-card:hover {
  box-shadow: 0 12px 32px rgba(61, 42, 31, 0.08);
  transform: translateY(-4px);
}

.producto-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.producto-card-link:hover {
  color: inherit;
}

.producto-img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  background: linear-gradient(145deg, #c9b896, #a8956e);
}

.producto-img-wrap .producto-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.producto-img-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #c9b896, #a8956e);
}

.producto-card h3,
.producto-card-link h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-leather);
  margin: var(--space-md) var(--space-md) var(--space-xs);
}

.producto-card p,
.producto-card-link p {
  margin: 0 var(--space-md) var(--space-md);
  font-size: 0.95rem;
  color: var(--color-earth);
}

/* --- Medio ambiente --- */
.section-ambiente {
  background: var(--color-warm-white);
}

.ambiente-content {
  max-width: 720px;
}

.ambiente-content p {
  margin: 0 0 var(--space-lg);
  color: var(--color-earth);
}

.ambiente-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.ambiente-foto {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.ambiente-subtitle {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.ambiente-content .ambiente-links {
  margin: var(--space-xl) 0 0;
  font-size: 0.95rem;
}

.ambiente-links a {
  margin-right: 0.5em;
}

/* --- Contacto --- */
.section-contacto {
  background: var(--color-cream);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: start;
}

.contacto-info p {
  margin: 0 0 var(--space-sm);
  color: var(--color-leather);
}

.contacto-info a {
  color: var(--color-tan);
}

.contacto-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-leather);
  margin-bottom: var(--space-xs);
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-warm-white);
  transition: border-color var(--transition);
}

.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus {
  outline: none;
  border-color: var(--color-tan);
}

.contacto-form button {
  cursor: pointer;
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-lg) var(--space-lg);
  background: var(--color-earth);
  color: var(--color-cream);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.footer-logo {
  display: block;
}

.footer-logo:hover {
  opacity: 0.9;
}

.logo-img-footer {
  height: 46px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.copyright {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.85;
}

.footer-lwg {
  display: block;
  opacity: 0.85;
  transition: opacity var(--transition);
  text-decoration: none;
  color: inherit;
}

.footer-lwg:hover {
  opacity: 1;
  color: inherit;
}

.footer-lwg img {
  display: block;
  height: 69px;
  width: auto;
  object-fit: contain;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: flex-start;
}

.footer-nav a {
  color: var(--color-cream);
  opacity: 0.9;
}

.footer-nav a:hover {
  opacity: 1;
  color: var(--color-gold);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .empresa-history,
  .empresa-present,
  .empresa-future {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .empresa-history > *,
  .empresa-present > *,
  .empresa-future > * {
    order: unset;
  }

  .empresa-history .empresa-foto,
  .empresa-present-imgs .empresa-foto,
  .empresa-future .empresa-foto {
    max-width: 100%;
  }

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

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

  .ambiente-imgs {
    grid-template-columns: 1fr;
  }

  .proceso-step {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .proceso-step > * {
    order: unset;
  }

  .proceso-step .proceso-img {
    order: -1;
  }

  .proceso-img {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .logo-img {
    height: 44px;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-lg);
    background: rgba(250, 247, 242, 0.98);
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

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

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .section {
    padding: var(--space-xl) var(--space-md);
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-nav {
    align-items: center;
  }
}
