/* ═══════════════════════════════════════════════════════════════════
   TIDE GLOBAL TRADE · institutional site
   Paleta y estética coherentes con la app (app.tide.gt)
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  --bg:         #f7f8fa;
  --surface:    #ffffff;
  --surface-2:  #eef1f5;
  --border:     #e3e7ec;
  --tx-hi:      #2c3a46;
  --tx-md:      #4d606e;
  --tx-lo:      #8fa3b1;
  --accent:     #627a8c;
  --accent-h:   #506070;
  --acc-lt:     #ecf0f3;
  --ok:         #7ea59f;
  --shadow-sm:  0 1px 2px rgba(44,58,70,.04), 0 1px 3px rgba(44,58,70,.04);
  --shadow-md:  0 4px 14px rgba(44,58,70,.06), 0 2px 4px rgba(44,58,70,.04);
  --radius:     10px;
  --radius-sm:  6px;
  --nav-h:      64px;
  --wrap:       1180px;
  --ease:       cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior:smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--tx-md);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent-h); }

img,svg { max-width: 100%; display: block; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────── LOGO ───────── */
.logo { display:flex; align-items:center; gap:10px; color:inherit; }
.logo-ico {
  width:32px; height:32px; border-radius:7px;
  background: var(--accent); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family: 'Poppins', sans-serif;
  font-weight: 900; font-size: 16px;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.logo-name strong {
  display:block;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: .12em;
  line-height: 1;
}
.logo-name small {
  display:block;
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tx-lo);
  margin-top: 3px;
}

/* ───────── NAV ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  height: var(--nav-h);
  display:flex; align-items:center; justify-content:space-between; gap: 24px;
}
.nav-links {
  display:flex; align-items:center; gap: 28px;
  flex: 1; justify-content: center;
}
.nav-links a {
  color: var(--tx-md); font-size: 14px; font-weight: 500;
  padding: 6px 2px; position: relative;
}
.nav-links a:hover { color: var(--tx-hi); }
.nav-actions { display:flex; align-items:center; gap: 14px; }
.nav-burger {
  display: none;
  background:none; border:none; cursor:pointer;
  width: 36px; height: 36px;
  flex-direction: column; justify-content:center; align-items:center; gap:4px;
}
.nav-burger span {
  display:block; width:20px; height:2px;
  background: var(--tx-md); border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

/* Lang switch */
.lang-switch {
  display:flex; align-items:center; gap: 2px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.lang {
  font-size: 11.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 4px;
  color: var(--tx-lo); letter-spacing: .05em;
}
.lang.on {
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ───────── BUTTONS ───────── */
.btn {
  display: inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 13px 26px; font-size: 14.5px; border-radius: 8px; }
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--tx-md); border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); color: var(--tx-hi); border-color: var(--tx-lo); }

/* ───────── HERO ───────── */
.hero {
  padding: 46px 0 80px;
  background:
    radial-gradient(1000px 400px at 50% -100px, rgba(98,122,140,.09), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 12px;
  background: var(--acc-lt);
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--tx-hi);
  max-width: 880px;
  margin: 0 auto 24px;
}
.hero-title .hl {
  color: var(--accent);
  background: linear-gradient(180deg, transparent 60%, rgba(98,122,140,.12) 60%);
  padding: 0 4px;
}
.hero-sub {
  max-width: 680px; margin: 0 auto 36px;
  font-size: 17px; line-height: 1.65;
  color: var(--tx-md);
}
.hero-cta { display:flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.hero-meta {
  display:flex; gap: 28px; justify-content: center; flex-wrap: wrap;
  font-size: 12.5px; color: var(--tx-lo); font-weight: 500;
}
.hero-meta span { display:inline-flex; align-items:center; gap: 6px; }
.dot {
  display:inline-block; width:6px; height:6px; border-radius:50%;
  background: var(--ok);
}

/* ───────── SECTION ───────── */
.sec { padding: 88px 0; }
.sec-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { margin-bottom: 48px; text-align: center; }
.sec-eye {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--tx-lo);
  margin-bottom: 12px;
}
.sec h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.2; letter-spacing: -.015em;
  color: var(--tx-hi);
  max-width: 720px; margin: 0 auto;
}
.sec-body { max-width: 820px; margin: 0 auto; }
.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.lead { font-size: 17px; color: var(--tx-md); }
.lead strong { color: var(--tx-hi); font-weight: 600; }

/* ───────── CARDS ───────── */
.cards {
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-ico {
  width: 42px; height: 42px; border-radius: 9px;
  background: var(--acc-lt); color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 16px;
}
.card-ico svg { width: 20px; height: 20px; }
.card h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 15.5px;
  color: var(--tx-hi); margin-bottom: 8px;
  letter-spacing: -.01em;
}
.card p { font-size: 13.5px; color: var(--tx-md); line-height: 1.55; }

/* ───────── PILLARS ───────── */
.pillars { display:grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1000px; margin: 0 auto; }
.pillar { text-align: left; }
.pillar-num {
  font-family: 'Poppins', sans-serif;
  font-weight: 900; font-size: 28px;
  color: var(--accent); opacity: .35;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}
.pillar h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 18px;
  color: var(--tx-hi); margin-bottom: 10px;
}
.pillar p { font-size: 14.5px; color: var(--tx-md); }

/* ───────── PROFILES ───────── */
.profiles { display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.profile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.profile h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 16px;
  color: var(--tx-hi); margin-bottom: 10px;
}
.profile p { font-size: 14px; color: var(--tx-md); }

/* ───────── SHOWCASE / CAROUSEL ───────── */
.sec-showcase {
  background:
    radial-gradient(800px 300px at 50% 0, rgba(98,122,140,.07), transparent 60%),
    var(--bg);
}

.carousel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.carousel-track {
  position: relative;
  min-height: 520px;
}

.carousel-slide {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  padding: 44px 56px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity .45s var(--ease), visibility 0s linear 0s;
}

.carousel-img {
  display: flex; align-items: center; justify-content: center;
  min-height: 420px;
}

/* Browser frame decoration */
.frame {
  width: 100%; max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.frame-bar {
  height: 26px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
}
.frame-bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: #cfd6dd;
}
.frame-bar span:nth-child(1) { background: #e8a09c; }
.frame-bar span:nth-child(2) { background: #e8cf9c; }
.frame-bar span:nth-child(3) { background: #a5cfb2; }
.frame img { display: block; width: 100%; height: auto; }

/* Phone frame (mobile screenshots) */
.frame-phone {
  max-width: 280px;
  border-radius: 22px;
  border: 8px solid var(--tx-hi);
  background: var(--tx-hi);
  box-shadow: 0 10px 30px rgba(44,58,70,.18);
}
.frame-phone img {
  border-radius: 14px;
}

.carousel-text {
  display: flex; flex-direction: column; justify-content: center;
  padding: 10px 0;
}
.carousel-eye {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.carousel-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 26px; line-height: 1.25;
  color: var(--tx-hi); margin-bottom: 16px;
  letter-spacing: -.015em;
}
.carousel-desc {
  font-size: 15px; color: var(--tx-md); line-height: 1.65;
  margin-bottom: 24px;
}
.carousel-stats {
  display: flex; flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.carousel-stat {
  display: grid; grid-template-columns: 180px 1fr; gap: 12px;
  align-items: baseline;
  font-size: 13.5px; color: var(--tx-md);
}
.carousel-stat strong {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 13.5px;
  letter-spacing: -.005em;
}

/* Wrapper reserves lateral space for arrows outside the carousel box */
.carousel-wrap {
  position: relative;
  padding: 0 56px;
}

/* Arrows live in the lateral reserved space (outside the carousel box) */
.carousel-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--tx-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 4;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
  padding: 0;
}
.carousel-nav:hover {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(44,58,70,.14);
  transform: translateY(-50%) scale(1.06);
}
.carousel-nav:active { background: var(--acc-lt); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* Dots */
.carousel-dots {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  margin-top: 22px;
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  border: none; padding: 0;
  transition: all .2s var(--ease);
}
.carousel-dot:hover { background: var(--tx-lo); }
.carousel-dot.active {
  background: var(--accent);
  width: 26px; border-radius: 4px;
}

@media (max-width: 960px) {
  .carousel-wrap { padding: 0 44px; }
  .carousel-slide {
    grid-template-columns: 1fr;
    padding: 18px 18px;
    gap: 14px;
  }
  .carousel-track { min-height: 600px; }
  .carousel-img { min-height: auto; }
  .frame { max-width: 100%; }
  .frame-phone { max-width: 180px; }
  .carousel-eye { margin-bottom: 8px; }
  .carousel-title { font-size: 19px; line-height: 1.25; margin-bottom: 8px; }
  .carousel-desc { font-size: 13.5px; line-height: 1.5; margin-bottom: 12px; }
  .carousel-stats { padding-top: 10px; gap: 4px; }
  .carousel-stat {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12.5px;
    line-height: 1.4;
  }
  .carousel-stat:last-child { border-bottom: none; padding-bottom: 0; }
  .carousel-stat strong { font-size: 12.5px; }

  .carousel-nav { width: 34px; height: 34px; }
  .carousel-dots { margin-top: 16px; }
}

@media (max-width: 720px) {
  /* Flechas pequeñas pero siempre visibles por fuera del carrusel */
  .carousel-wrap { padding: 0 30px; }
  .carousel-nav { width: 28px; height: 28px; }
  .carousel-nav svg { width: 14px; height: 14px; }
}

@media (max-width: 520px) {
  .carousel-slide { padding: 14px 14px; gap: 10px; }
  .carousel-track { min-height: 540px; }
  .frame-phone { max-width: 150px; }
  .carousel-title { font-size: 17px; }
  .carousel-desc { font-size: 13px; margin-bottom: 10px; }
  .carousel-stat { font-size: 12px; padding: 4px 0; }
  .carousel-stat strong { font-size: 12px; }
  .carousel-wrap { padding: 0 26px; }
  .carousel-nav { width: 24px; height: 24px; }
  .carousel-nav svg { width: 12px; height: 12px; }
}

/* ───────── CTA SECTION ───────── */
.cta-sec { background: var(--accent); color: #fff; padding: 72px 0; }
.cta-sec .sec-eye { color: rgba(255,255,255,.6); }
.cta-sec h2 { color: #fff; }
.cta-sec .lead { color: rgba(255,255,255,.85); }
.cta-wrap {
  display:grid; grid-template-columns: 1fr auto; gap: 48px; align-items:center;
}
.cta-box { display:flex; flex-direction: column; gap: 10px; }
.cta-sec .btn-primary {
  background: #fff; color: var(--accent); border-color: #fff;
}
.cta-sec .btn-primary:hover { background: var(--acc-lt); color: var(--accent-h); }
.cta-sec .btn-ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.35);
}
.cta-sec .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.7); }

/* ───────── FOOTER ───────── */
.foot {
  background: var(--tx-hi);
  color: rgba(255,255,255,.65);
  padding: 48px 0 32px;
  font-size: 13px;
}
.foot-wrap {
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px; align-items: center;
}
.foot-brand { display:flex; align-items:center; gap:10px; }
.foot-brand .logo-ico { background: rgba(255,255,255,.12); }
.foot-brand .logo-name strong { color: #fff; }
.foot-brand .logo-name small { color: rgba(255,255,255,.5); }
.foot-links { display:flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.foot-links a { color: rgba(255,255,255,.75); font-weight: 500; }
.foot-links a:hover { color: #fff; }
.foot-legal { text-align: right; font-size: 12px; display:flex; flex-direction: column; gap: 4px; }
.foot-author { color: rgba(255,255,255,.45); font-size: 11.5px; letter-spacing: .05em; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: 1fr; gap: 28px; max-width: 520px; }
  .profiles { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .cta-wrap { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .cta-box { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .two-col { grid-template-columns: 1fr; gap: 16px; }
  .foot-wrap { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .foot-brand { justify-content: center; }
  .foot-legal { text-align: center; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-actions .btn { display: none; }

  /* Cuando el menú está abierto, nav se vuelve sólido
     (sin backdrop-filter, para que el menú fixed respete el viewport). */
  body.menu-open .nav {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.menu-open .nav-links {
    display: flex; flex-direction: column; gap: 0;
    justify-content: flex-start;
    align-items: stretch;
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: #ffffff;
    padding: 16px 20px; z-index: 49;
    box-shadow: 0 10px 30px rgba(44,58,70,.08);
    overflow-y: auto;
  }
  body.menu-open .nav-links a {
    padding: 16px 8px; border-bottom: 1px solid var(--border); width: 100%;
    font-size: 16px;
  }
  body.menu-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .hero { padding: 28px 0 60px; }
  .sec { padding: 56px 0; }
  .cta-sec { padding: 56px 0; }
  .sec-head { margin-bottom: 36px; }
  .cards { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOTION (respect prefers-reduced-motion)
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
