﻿/* =========================================================
   Three Way Trading — estilos
   Cambia los colores de la marca aquí abajo (variables).
   ========================================================= */
:root {
  --green-900: #0d3527;   /* verde profundo (marca) */
  --green-700: #17543d;
  --green-500: #3fa36b;
  --mango:     #f4a62a;   /* acento */
  --coral:     #e85d3a;
  --cream:     #faf7f0;   /* fondo alterno */
  --white:     #ffffff;
  --ink:       #1c2420;   /* texto */
  --muted:     #5d6b64;
  --line:      #e4e2d9;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(13, 53, 39, .25);
  --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-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--mango); color: var(--green-900); box-shadow: 0 8px 20px -8px rgba(244,166,42,.7); }
.btn--primary:hover { background: #ffb53f; }
.btn--ghost { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--green-900); }
.btn--whatsapp { background: #25d366; color: #fff; margin-top: 8px; }
.btn--whatsapp svg { width: 22px; height: 22px; }
.btn--block { width: 100%; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--green-500); margin-bottom: 14px;
}
.eyebrow--light { color: var(--mango); }

/* ---------- Encabezado ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; color: var(--white);
  transition: background .3s, box-shadow .3s, color .3s;
}
.header.is-scrolled, .header.menu-open {
  background: rgba(255,255,255,.96); color: var(--green-900);
  box-shadow: 0 2px 20px rgba(0,0,0,.06); backdrop-filter: blur(8px);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo__text { font-family: var(--font-head); font-size: 20px; letter-spacing: -.01em; font-weight: 500; }
.logo__text strong { font-weight: 700; }
.logo__text--light { color: var(--white); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .9; transition: opacity .2s, color .2s; }
.nav a:hover { opacity: 1; color: var(--mango); }
.nav__cta { padding: 9px 18px; border-radius: 999px; background: var(--mango); color: var(--green-900) !important; opacity: 1 !important; }

.header__actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  font: 600 13px var(--font-body); padding: 8px 12px; border-radius: 999px; cursor: pointer;
  background: transparent; color: inherit; border: 1.5px solid currentColor; letter-spacing: .05em;
}
.lang-toggle span[data-lang] { opacity: .45; transition: opacity .2s; }
.lang-toggle span.is-active { opacity: 1; }
.lang-toggle__sep { opacity: .35; margin: 0 3px; }

.menu-btn { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100vh, 940px); color: var(--white);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--header-h) + 60px) 0 40px; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transform: scale(1.06); animation: heroZoom 14s ease-out forwards;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8,36,26,.92) 0%, rgba(8,36,26,.72) 45%, rgba(8,36,26,.25) 100%),
              linear-gradient(0deg, rgba(8,36,26,.85) 0%, transparent 40%);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__content { position: relative; max-width: 1200px; margin-bottom: auto; padding-top: 6vh; }
.hero__title { font-size: clamp(36px, 5.4vw, 66px); max-width: 16ch; font-weight: 700; letter-spacing: -.02em; }
.hero__title em { font-style: italic; color: var(--mango); font-weight: 500; }
.hero__lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 56ch; opacity: .9; margin-bottom: 32px; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.stats {
  position: relative; list-style: none; margin: 56px 0 0; padding: 26px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.stats__item { display: flex; flex-direction: column; }
.stats__num { font-family: var(--font-head); font-size: clamp(30px, 4vw, 46px); font-weight: 700; color: var(--mango); line-height: 1.1; }
.stats__label { font-size: 14px; opacity: .85; }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section--tint { background: var(--cream); }
.section--dark { background: var(--green-900); color: var(--white); }
.section__head { max-width: 680px; margin-bottom: 52px; }
.section__title { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.015em; }
.section__lead { font-size: 18px; color: var(--muted); }
.section--dark .section__lead { color: rgba(255,255,255,.75); }

/* Split (imagen + texto) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.split__text p { color: var(--muted); font-size: 17px; }
.split__text strong { color: var(--ink); }
.badge-float {
  position: absolute; right: -20px; bottom: 32px; background: var(--white); padding: 18px 22px;
  border-radius: 14px; box-shadow: var(--shadow); max-width: 230px; border-left: 4px solid var(--mango);
}
.badge-float strong { display: block; font-family: var(--font-head); font-size: 20px; color: var(--green-900); }
.badge-float span { font-size: 14px; color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; font-weight: 500; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ---------- Tarjetas de producto ---------- */
/* 3 columnas en computador: 15 tarjetas = 5 filas completas */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 var(--line), 0 4px 18px -10px rgba(0,0,0,.15);
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__img { aspect-ratio: 4/3; overflow: hidden; background: var(--cream); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card__img img { transform: scale(1.06); }
.card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card h3 { font-size: 24px; color: var(--green-900); }
.card p { font-size: 15px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--green-700); background: #e8f3ec; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.card__season { margin-top: auto; margin-bottom: 10px; font-size: 14px !important; }
.card__season strong { color: var(--ink); }

.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.months span {
  font-size: 10px; font-weight: 600; text-align: center; padding: 5px 0; border-radius: 4px;
  background: #f0eee7; color: #a5a99f;
}
.months span.on { background: var(--mango); color: var(--green-900); }

/* ---------- Proceso ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.step {
  position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--cream);
  border: 1px solid var(--line); transition: background .3s, color .3s, transform .3s;
}
.step:hover { background: var(--green-900); color: var(--white); transform: translateY(-4px); }
.step:hover p { color: rgba(255,255,255,.8); }
.step:hover h3 { color: var(--white); }
.step__num { position: absolute; top: 22px; right: 24px; font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--mango); opacity: .6; }
.step__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--white); display: grid; place-items: center; margin-bottom: 20px; box-shadow: 0 4px 12px -6px rgba(0,0,0,.2); }
.step__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--green-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step h3 { font-size: 22px; color: var(--green-900); transition: color .3s; }
.step p { font-size: 15px; color: var(--muted); margin: 0; transition: color .3s; }

.banner {
  position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; min-height: 340px;
  background-size: cover; background-position: center; display: flex; align-items: flex-end; color: var(--white);
}
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,36,26,.9), rgba(8,36,26,.2)); }
.banner__text { position: relative; padding: clamp(28px, 5vw, 56px); max-width: 560px; }
.banner__text h3 { font-size: clamp(26px, 3vw, 36px); }
.banner__text p { opacity: .88; margin: 0; }

/* ---------- Oficinas ---------- */
.offices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.office {
  padding: 34px 30px; border-radius: var(--radius); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); transition: background .3s, border-color .3s;
  display: flex; flex-direction: column;
}
.office__role { margin-bottom: 14px; }
.office:hover { background: rgba(255,255,255,.09); border-color: var(--mango); }
.flag { width: 48px; height: 32px; border-radius: 5px; margin-bottom: 22px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.office h3 { font-size: 26px; margin-bottom: 2px; }
.office__city { color: var(--mango); font-weight: 600; margin-bottom: 14px; }
.office__role { color: rgba(255,255,255,.8); font-size: 15px; }
.office__phone {
  display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12); font-size: 15px; font-weight: 600;
  color: rgba(255,255,255,.85); text-decoration: none;
}
p.office__phone { margin-bottom: 0; }
/* Ícono de WhatsApp solo en el teléfono clickeable (Chile) */
a.office__phone::before {
  content: ""; width: 18px; height: 18px; flex: none; background: #25d366;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3a13 13 0 0 0-11.2 19.6L3 29l6.6-1.7A13 13 0 1 0 16 3Zm5.9 15.7c-.3-.2-1.9-1-2.2-1-.3-.1-.5-.2-.7.2l-1 1.2c-.2.2-.4.2-.7.1a8.8 8.8 0 0 1-4.4-3.8c-.3-.6.3-.5 1-1.7.1-.2 0-.4 0-.6l-1-2.4c-.3-.6-.5-.5-.7-.5h-.6c-.2 0-.6.1-.9.4-.3.3-1.1 1.1-1.1 2.7s1.2 3.2 1.3 3.4c.2.2 2.3 3.5 5.5 4.9 2 .9 2.8.9 3.8.8.6-.1 1.9-.8 2.1-1.5.3-.7.3-1.4.2-1.5 0-.2-.3-.3-.6-.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3a13 13 0 0 0-11.2 19.6L3 29l6.6-1.7A13 13 0 1 0 16 3Zm5.9 15.7c-.3-.2-1.9-1-2.2-1-.3-.1-.5-.2-.7.2l-1 1.2c-.2.2-.4.2-.7.1a8.8 8.8 0 0 1-4.4-3.8c-.3-.6.3-.5 1-1.7.1-.2 0-.4 0-.6l-1-2.4c-.3-.6-.5-.5-.7-.5h-.6c-.2 0-.6.1-.9.4-.3.3-1.1 1.1-1.1 2.7s1.2 3.2 1.3 3.4c.2.2 2.3 3.5 5.5 4.9 2 .9 2.8.9 3.8.8.6-.1 1.9-.8 2.1-1.5.3-.7.3-1.4.2-1.5 0-.2-.3-.3-.6-.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.office__phone:hover { color: var(--mango); }

/* ---------- Calidad ---------- */
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.cert { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.cert__seal {
  width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--green-700); border: 2px dashed var(--green-500); background: #eef7f1; text-align: center;
}
.cert strong { display: block; font-size: 15px; color: var(--ink); }
.cert small { color: var(--muted); font-size: 13px; line-height: 1.35; display: block; }

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact__info p { color: var(--muted); font-size: 17px; }
.contact__list { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.contact__list svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--white); fill: none; stroke: var(--green-700); stroke-width: 1.8; stroke-linejoin: round; box-shadow: 0 2px 8px -4px rgba(0,0,0,.2); }
.contact__list a { text-decoration: none; word-break: break-word; }
.contact__list a:hover { color: var(--green-500); }
.contact__list li > div { display: flex; flex-direction: column; min-width: 0; }
.contact__list small { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contact__groups { display: grid; gap: 22px; margin: 28px 0; }
.contact__groups .contact__list { margin: 0; }
.contact__groups .contact__list + .contact__list { padding-top: 22px; border-top: 1px solid var(--line); }

.form { background: var(--white); padding: clamp(24px, 4vw, 40px); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--green-900); }
.form input, .form select, .form textarea {
  font: 400 15px var(--font-body); padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fcfbf8; color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(63,163,107,.15); background: #fff; }
.form .is-invalid { border-color: var(--coral); }
.form__status { margin: 0; font-size: 14px; min-height: 1.4em; }
.form__status.ok { color: var(--green-700); }
.form__status.err { color: var(--coral); }

/* ---------- Footer ---------- */
.footer { background: #08241a; color: rgba(255,255,255,.7); padding: 56px 0 28px; font-size: 15px; }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__inner p { margin-top: 10px; max-width: 40ch; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: var(--mango); }
.footer__bottom { padding-top: 22px; display: flex; flex-direction: column; gap: 6px; }
.footer__credits { font-size: 12px; opacity: .75; }
.footer__credits a:hover { color: var(--mango); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 25px -6px rgba(37,211,102,.6); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Animación al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg, .wa-float::before { animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  /* Si sobra una tarjeta sola en la última fila, se centra */
  .cards > .card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 12px); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 20px; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 16px 24px 32px;
    background: var(--white); color: var(--green-900);
    transform: translateX(100%); transition: transform .35s ease; overflow-y: auto;
  }
  .menu-open .nav { transform: none; }
  .nav a { padding: 16px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: 20px; text-align: center; border-bottom: 0 !important; }

  .split, .contact__grid { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split__media img { aspect-ratio: 16/11; }
  .badge-float { right: 16px; bottom: -24px; }
  .offices { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .logo__text { font-size: 17px; }
  .cards, .steps, .certs, .form__row { grid-template-columns: 1fr; }
  .cards { gap: 18px; }
  .cards > .card:last-child:nth-child(odd) { width: auto; justify-self: stretch; }
  .card__img { aspect-ratio: 16/9; }
  .card__body { padding: 18px; }
  .hero__buttons .btn { flex: 1 1 100%; }
  .section__head { margin-bottom: 36px; }
  .banner { min-height: 280px; }
  .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}
