/* =========================================================
   Farfay · estilos
   Paleta: borgoña #7A1C2C · azul noche #0E1B33 · oro #C9A45C
           crema #F7F3EC · pizarra #5C6676
   ========================================================= */

:root {
  --burgundy: #7A1C2C;
  --burgundy-dark: #5E1421;
  --navy: #0E1B33;
  --navy-2: #16274A;
  --gold: #C9A45C;
  --gold-light: #E2C98F;
  --cream: #F7F3EC;
  --paper: #FFFFFF;
  --ink: #1B2333;
  --slate: #5C6676;
  --line: #E6DFD3;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 27, 51, .08);
  --font-sans: 'Inter', 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', 'Songti SC', 'Noto Serif SC', serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--burgundy); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-serif); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--navy); }
h3 { font-size: 1.15rem; color: var(--navy); }
p { margin: 0 0 1em; }
.lang-zh h1, .lang-zh h2 { font-family: var(--font-sans); letter-spacing: .02em; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font: 600 .95rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .65em 1.2em; font-size: .88rem; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); }
.btn-primary { background: var(--burgundy); color: #fff; }
.btn-primary:hover { background: var(--burgundy-dark); }
.btn-primary[disabled] { opacity: .65; cursor: wait; transform: none; }
.btn-ghost { border-color: rgba(247, 243, 236, .45); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); background: rgba(255, 255, 255, .06); }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  color: var(--cream); transition: background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { background: rgba(14, 27, 51, .96); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); backdrop-filter: blur(8px); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.35rem; letter-spacing: .12em; }
.brand-text small { font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a:not(.btn) { color: inherit; text-decoration: none; font-size: .93rem; font-weight: 500; opacity: .88; position: relative; }
.main-nav a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s; }
.main-nav a:not(.btn):hover { opacity: 1; }
.main-nav a:not(.btn):hover::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: 10px; }

/* Selector de idioma (arriba a la derecha) */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 12px; border: 1px solid rgba(247, 243, 236, .35); border-radius: 999px;
  font-size: .85rem; font-weight: 600; user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-switch summary .chev { width: 14px; height: 14px; transition: transform .2s; }
.lang-switch[open] summary .chev { transform: rotate(180deg); }
.lang-switch ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; margin: 0; padding: 6px;
  list-style: none; background: var(--paper); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}
.lang-switch li a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.lang-switch li a:hover { background: var(--cream); }
.lang-switch li a[aria-current] { color: var(--burgundy); font-weight: 700; }
.lang-switch li a[aria-current]::after { content: ' ✓'; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--cream); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero con globo ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--cream);
  background: radial-gradient(1200px 700px at 75% 40%, #1C3060 0%, var(--navy) 55%, #0A1426 100%);
  padding: calc(var(--header-h) + 40px) 0 70px;
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
}
.hero-glow { position: absolute; inset: auto -20% -40% auto; width: 70vw; height: 70vw; background: radial-gradient(circle, rgba(201, 164, 92, .12), transparent 60%); pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; }
.eyebrow { display: inline-block; color: var(--gold); font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px; }
.eyebrow::before { content: ''; display: inline-block; width: 34px; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 12px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); color: #fff; margin-bottom: .35em; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: rgba(247, 243, 236, .82); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 42px; }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 26px 0 0; border-top: 1px solid rgba(247, 243, 236, .15); }
.highlights li { display: flex; align-items: center; gap: 12px; }
.highlights strong { font-family: var(--font-serif); font-variant-numeric: lining-nums; font-size: 2rem; color: var(--gold); line-height: 1; }
.highlights span { font-size: .85rem; color: rgba(247, 243, 236, .75); line-height: 1.35; }

.hero-globe { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; justify-self: center; }
.hero-globe canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.hero-globe canvas:active { cursor: grabbing; }

/* ---------- Secciones ---------- */
.section { padding: clamp(70px, 9vw, 110px) 0; }
.section-alt { background: var(--paper); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.section-head h2::after { content: ''; display: block; width: 56px; height: 3px; background: var(--gold); margin: 18px auto 0; border-radius: 3px; }
.section-head p { color: var(--slate); font-size: 1.05rem; }

.icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: rgba(122, 28, 44, .08); color: var(--burgundy); margin-bottom: 18px; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-round { border-radius: 50%; background: var(--navy); color: var(--gold); }

.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card h3 { color: var(--burgundy); }
.service-card p { color: var(--slate); font-size: .94rem; flex: 1; }
.link-more { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--burgundy); }
.link-more span { display: inline-block; transition: transform .2s; }
.link-more:hover span { transform: translateX(4px); }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.why-item p { color: var(--slate); font-size: .95rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; counter-reset: s; }
.steps li { position: relative; padding: 26px 0 0; border-top: 2px solid var(--line); }
.steps li::before { content: ''; position: absolute; top: -2px; left: 0; width: 60px; height: 2px; background: var(--burgundy); }
.step-num { display: block; font-family: var(--font-serif); font-variant-numeric: lining-nums; font-size: 2.4rem; color: var(--gold); line-height: 1; margin-bottom: 12px; }
.steps p { color: var(--slate); font-size: .95rem; }

.band { background: linear-gradient(120deg, var(--burgundy-dark), var(--burgundy)); color: var(--cream); padding: 56px 0; }
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.band h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.band p { margin: 0; max-width: 680px; color: rgba(247, 243, 236, .85); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.contact-intro > p { color: var(--slate); font-size: 1.05rem; }
.contact-intro h3 { margin-top: 34px; font-size: .85rem; text-transform: uppercase; letter-spacing: .16em; color: var(--slate); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--burgundy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact-list a { color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--burgundy); }

.contact-form { background: var(--paper); border-radius: 18px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); border-top: 4px solid var(--burgundy); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: .82rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .95rem; color: var(--ink);
  background: #FBF9F5; border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(122, 28, 44, .12); background: #fff; }
.field .is-invalid, .field input.is-invalid, .field textarea.is-invalid { border-color: #C0392B; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--slate); margin-bottom: 22px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--burgundy); width: 16px; height: 16px; flex: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .93rem; }
.form-status.is-ok { display: block; background: #E8F4EC; color: #1E6B3A; }
.form-status.is-error { display: block; background: #FBEAEA; color: #9B2C2C; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy); color: rgba(247, 243, 236, .75); padding: 60px 0 26px; font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 34px; border-bottom: 1px solid rgba(247, 243, 236, .12); }
.footer-brand img { width: 210px; height: auto; margin-bottom: 14px; }
.footer-brand p { max-width: 340px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-nav a, .footer-langs a { color: inherit; text-decoration: none; }
.footer-nav a:hover, .footer-langs a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: .84rem; }
.footer-langs { display: flex; gap: 14px; }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); padding: 10px 20px 24px; box-shadow: 0 20px 30px rgba(0, 0, 0, .25);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .25s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(247, 243, 236, .1); }
  .main-nav a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 16px; }
  .site-header.menu-open { background: var(--navy); }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 20px); }
  .hero-inner { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .hero-globe { order: -1; max-width: 420px; }
  .lead { margin-inline: auto; }
  .hero-actions, .highlights { justify-content: center; }
  .highlights li { text-align: left; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .band-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  :root { --header-h: 66px; }
  .container { width: calc(100% - 32px); }
  .brand-text small { display: none; }
  .services-grid, .why-grid, .steps, .form-row { grid-template-columns: 1fr; }
  .form-row { gap: 0; }
  .hero-globe { max-width: 320px; }
  .highlights { gap: 18px; }
  .highlights { grid-template-columns: 1fr; }
  .highlights li { justify-content: center; }
  .hero-actions .btn { flex: 1 1 100%; }
  .footer-inner, .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
