/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:       #100c09;
  --bg-2:     #17120d;
  --bg-3:     #221a13;
  --cream:    #F2EBDA;
  --cream-2:  #DDD2BC;
  --cream-3:  #8B7E68;
  --accent:   #B8874B;
  --accent-2: #96693A;
  --gold:     #D9BB84;
  --line:     rgba(242,235,218,.14);

  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 76px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 500; }
em { font-style: italic; color: var(--gold); }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

.kicker {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream-3);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .35s var(--ease-out), background .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.btn-primary {
  background: var(--accent);
  color: #17110a;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(184,135,75,.55); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--gold); transform: translateY(-2px); }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(16,12,9,.92), rgba(16,12,9,0));
  backdrop-filter: blur(6px);
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(16,12,9,.92);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.nav-brand em { color: var(--cream); font-style: normal; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav-links {
  display: none;
  gap: 2.1rem;
  list-style: none;
}
.nav-links a {
  position: relative;
  font-size: .92rem;
  font-weight: 500;
  color: var(--cream-2);
  padding-block: .3rem;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--accent);
  transition: right .35s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { right: 0; }
.nav-cta { display: none; }
.lang-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--cream-2);
  transition: border-color .3s var(--ease-out), color .3s var(--ease-out);
}
.lang-toggle:hover { border-color: var(--accent); color: var(--gold); }
.lang-toggle-mobile {
  display: inline-flex;
  width: auto;
  height: auto;
  padding: .5rem 1rem;
  margin-top: .4rem;
}
.nav-toggle {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--cream);
  position: relative;
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 1.5px; background: var(--cream);
  transition: transform .3s var(--ease-out);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 99;
  background: var(--bg);
  padding: 2rem 1.5rem;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu ul { list-style: none; display: grid; gap: 1.4rem; }
.mobile-menu a { font-family: var(--serif); font-size: 1.6rem; }
.mobile-menu .btn { margin-top: 1.5rem; width: fit-content; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .lang-toggle { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  animation: heroKenBurns 22s ease-in-out infinite alternate;
}
@keyframes heroKenBurns {
  from { transform: scale(1.06) translate3d(0,0,0); }
  to   { transform: scale(1.14) translate3d(-1.2%, -1%, 0); }
}
.hero-tint {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(16,12,9,.35) 0%, rgba(16,12,9,.55) 45%, rgba(16,12,9,.96) 100%),
    linear-gradient(90deg, rgba(16,12,9,.75) 0%, rgba(16,12,9,.15) 55%);
}
.hero-mesh {
  position: absolute; inset: -20% -10%; z-index: -1;
  background:
    radial-gradient(38% 30% at 18% 22%, rgba(184,135,75,.35), transparent 70%),
    radial-gradient(30% 26% at 82% 78%, rgba(217,187,132,.22), transparent 70%);
  filter: blur(70px);
  animation: meshDrift 26s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes meshDrift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(2%, -3%, 0) scale(1.08); }
}
.hero-inner {
  position: relative;
  padding-block: 7rem 4.5rem;
  max-width: 46rem;
}
.hero-kicker {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1.4rem;
}
.hero-kicker .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(184,135,75,.2);
}
.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  max-width: 16ch;
  color: var(--cream);
}
.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--cream-2);
  max-width: 42ch;
  font-weight: 300;
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: .6rem;
  list-style: none;
  margin-top: 1.6rem;
}
.hero-tags li {
  padding: .4rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--cream-2);
  background: rgba(242,235,218,.04);
}
.hero-tags li:first-child {
  border-color: rgba(184,135,75,.55);
  color: var(--gold);
  background: rgba(184,135,75,.1);
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 2.4rem;
}

.hero-window {
  position: absolute;
  right: max(2.5rem, calc((100vw - 1180px) / 2 + 1.25rem));
  bottom: clamp(6rem, 12vw, 8rem);
  width: min(320px, 84vw);
  padding: 1.8rem 1.7rem;
  border-radius: 20px;
  background: rgba(23,18,13,.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: none;
}
@supports not (backdrop-filter: blur(14px)) {
  .hero-window { background: rgba(20,16,11,.94); }
}
.hero-window-icon {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: .4rem;
}
.hero-window-quote {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--cream);
  margin-bottom: .7rem;
}
.hero-window-text {
  font-size: .86rem;
  color: var(--cream-3);
  line-height: 1.55;
}
.hero-window-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.1rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--gold);
  transition: gap .3s var(--ease-out);
}
.hero-window-cta:hover { gap: .7rem; }

@media (min-width: 860px) {
  .hero-window { display: block; }
}
.hero-scroll {
  position: absolute;
  right: min(4vw, 3rem);
  bottom: 2.4rem;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  color: var(--cream-3);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-scroll .line { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); }
@media (min-width: 720px) { .hero-scroll { display: flex; } }

/* =============================================================
   7. Sections shared
   ============================================================= */
section { position: relative; }
.section-pad { padding-block: clamp(4.5rem, 8vw, 7.5rem); }
.section-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-top: .9rem; }
.section-head .kicker { margin-bottom: 0; }

/* =============================================================
   8. Empresa / concept
   ============================================================= */
.concept {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.concept-grid {
  display: grid;
  gap: 3rem;
}
.concept-figure {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
}
.concept-figure img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}
.concept-figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(16,12,9,.65) 100%);
}
.concept-lead {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-family: var(--serif);
  color: var(--cream);
  max-width: 46rem;
  margin-top: 1.6rem;
  font-weight: 400;
}
.pillars {
  margin-top: 3.2rem;
  display: grid;
  gap: 2.2rem;
}
.pillar { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.pillar-num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 1.1rem;
  display: block;
  margin-bottom: .6rem;
}
.pillar h3 { font-size: 1.15rem; font-weight: 500; margin-bottom: .5rem; }
.pillar p { color: var(--cream-3); font-size: .95rem; max-width: 32ch; }

@media (min-width: 960px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   9. Servicios
   ============================================================= */
.services-grid {
  display: grid;
  gap: 1.6rem;
}
@media (min-width: 720px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }

.service-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
  transition: transform .5s var(--ease-out), border-color .5s var(--ease-out), box-shadow .5s var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}
.service-card:hover {
  border-color: rgba(184,135,75,.5);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.service-photo { aspect-ratio: 4/3; overflow: hidden; }
.service-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease-out), filter .7s var(--ease-out);
}
.service-card:hover .service-photo img { transform: scale(1.08); filter: saturate(1.15) brightness(1.04); }
.service-body { padding: 1.6rem 1.7rem 1.9rem; }
.service-body h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.service-body p { color: var(--cream-3); font-size: .94rem; }

/* =============================================================
   10. Galería — pinned horizontal showcase
   ============================================================= */
.showcase { background: var(--bg-2); overflow: hidden; }
.showcase-head { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.showcase-track {
  display: flex;
  gap: 1.4rem;
  padding-inline: max(1.25rem, calc((100vw - 1180px) / 2));
  padding-block: 1rem 1.5rem;
  will-change: transform;
}
.showcase-item {
  position: relative;
  flex: 0 0 min(78vw, 460px);
  aspect-ratio: 4/5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-3);
}
.showcase-item img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.08);
}
.showcase-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem;
  background: linear-gradient(180deg, transparent, rgba(16,12,9,.92));
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--cream);
}
.showcase-note {
  width: min(1180px, 100% - 2.5rem);
  margin: 1.6rem auto 0;
  color: var(--cream-3);
  font-size: .84rem;
  max-width: 46rem;
}

/* Fallback: no-JS / no ScrollTrigger horizontal scroll */
.showcase-track {
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
}
.showcase-item { scroll-snap-align: start; }
.showcase-track::-webkit-scrollbar { height: 6px; }
.showcase-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

/* =============================================================
   11. Contacto
   ============================================================= */
.contact { background: var(--bg); }
.contact-grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.contact-cards { display: grid; gap: 1rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color .35s var(--ease-out), transform .35s var(--ease-out);
}
.contact-card:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-card .ico {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(184,135,75,.14);
  color: var(--gold);
  flex-shrink: 0;
}
.contact-card .label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cream-3); }
.contact-card .value { font-family: var(--serif); font-size: 1.05rem; color: var(--cream); }
.contact-note { margin-top: 1.2rem; color: var(--cream-3); font-size: .9rem; }

.form {
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: .5rem; }
.field label { font-size: .82rem; color: var(--cream-2); font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  padding: .9rem 1rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cream);
  font: inherit;
  transition: border-color .3s var(--ease-out);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: .78rem; color: var(--cream-3); }
.form-status { font-size: .86rem; color: var(--gold); min-height: 1.2em; }

/* =============================================================
   12. Footer
   ============================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.4rem;
  background: var(--bg-2);
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  font-size: .84rem; color: var(--cream-3);
}
.footer-inner a:hover { color: var(--gold); }

/* =============================================================
   13. Responsive base
   ============================================================= */
@media (min-width: 540px)  { }
@media (min-width: 720px)  { }
@media (min-width: 960px)  {
  .concept-grid { grid-template-columns: 1.1fr .9fr; align-items: center; }
}
@media (min-width: 1280px) { }

/* =============================================================
   14. Reduced motion — only intrusive
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; transform: scale(1.02); }
  .hero-mesh { animation: none; }
}
