/* Finca Son Creixell - Sistema de diseño mediterráneo mallorquín */

:root {
  /* Colores principales */
  --cream: #F5EFE4;
  --cream-deep: #EDE4D3;
  --mares: #D4C4A8;        /* piedra arenisca mallorquina */
  --mares-dark: #B8A681;
  --olive: #4A5D3A;         /* verde oliva profundo */
  --olive-light: #7A8A68;
  --olive-pale: #C5CBB5;
  --terracotta: #B86F4A;
  --terracotta-deep: #8E4F34;
  --ink: #2B2620;
  --ink-soft: #4A413A;
  --ink-light: #6E655D;
  --white: #FEFCF7;
  --line: #D8CFBE;

  /* Tipografía */
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Espaciado */
  --container: 1360px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Transiciones */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Tipografía display */
.display, h1, h2, h3, .h-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(36px, 5vw, 64px); }
h3 { font-size: clamp(24px, 3vw, 36px); }

.display-italic { font-style: italic; font-weight: 300; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
}

.lede {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--ink-soft);
  font-weight: 300;
}

p { color: var(--ink-soft); }

a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease); }

/* Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: clamp(80px, 10vw, 140px) 0; }

/* Navegación */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled, .nav.solid {
  background: rgba(245, 239, 228, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 4px;
}
.nav-brand .sub {
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--olive);
  text-transform: uppercase;
}

.nav.hero-mode .nav-brand,
.nav.hero-mode .nav-links a,
.nav.hero-mode .nav-lang {
  color: var(--white);
}
.nav.hero-mode .nav-brand .sub { color: var(--mares); }
.nav.hero-mode.scrolled .nav-brand,
.nav.hero-mode.scrolled .nav-links a,
.nav.hero-mode.scrolled .nav-lang { color: var(--ink); }
.nav.hero-mode.scrolled .nav-brand .sub { color: var(--olive); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--olive); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.nav-lang {
  display: flex;
  gap: 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 500;
  align-items: center;
}
.nav-lang button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 4px 6px;
  font: inherit;
  opacity: 0.5;
  transition: opacity 0.2s;
  text-transform: uppercase;
}
.nav-lang button.active { opacity: 1; }
.nav-lang button:hover { opacity: 0.85; }
.nav-lang .divider { opacity: 0.3; }

/* Mobile menu toggle */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 4px;
}

/* Mobile nav drawer */
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--cream);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: var(--gutter);
}
.nav-mobile-drawer.open { display: flex; }
.nav-mobile-drawer a {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.nav-mobile-drawer a:hover { color: var(--olive); }
.nav-mobile-close {
  position: absolute;
  top: 24px; right: var(--gutter);
  background: none; border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
}
.nav-mobile-langs {
  display: flex;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  margin-top: 16px;
}
.nav-mobile-langs button {
  background: none; border: none;
  cursor: pointer;
  color: var(--ink-light);
  font: inherit;
  opacity: 0.6;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.nav-mobile-langs button.active,
.nav-mobile-langs button:hover { opacity: 1; color: var(--olive); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--olive);
  color: var(--cream);
  border-color: var(--olive);
}
.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost-light:hover { background: var(--white); color: var(--ink); }

.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Footer */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px var(--gutter) 32px;
}
.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(245,239,228,0.1);
}
.footer h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mares);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-brand .fname {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  margin-bottom: 16px;
}
.footer-brand p {
  color: rgba(245,239,228,0.6);
  font-size: 14px;
  max-width: 280px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; font-size: 14px; }
.footer a { color: rgba(245,239,228,0.7); }
.footer a:hover { color: var(--cream); }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(245,239,228,0.4);
  letter-spacing: 0.08em;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-lang { display: none; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* Utilidades */
.divider-ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--olive);
}
.divider-ornament::before,
.divider-ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.35;
  mix-blend-mode: multiply;
}

/* Animación reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero común para páginas interiores */
.page-hero {
  height: 70vh;
  min-height: 540px;
  position: relative;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.page-hero .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43,38,32,0.3) 0%, rgba(43,38,32,0.0) 40%, rgba(43,38,32,0.6) 100%);
  z-index: 1;
}
.page-hero .container {
  position: relative;
  z-index: 2;
  padding-bottom: 80px;
  width: 100%;
}
.page-hero .eyebrow { color: var(--mares); }
.page-hero h1 { color: var(--white); max-width: 900px; }
