/* SomosTraders — institutional site styles */

/* Self-hosted fonts (Inter, Space Grotesk — SIL Open Font License) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0B1120;
  --navy-deep: #070C18;
  --blue: #2563EB;
  --blue-hover: #1D4ED8;
  --blue-on-dark: #3B82F6; /* accessible tint of #2563EB for small text on navy */
  --slate: #334155;
  --slate-muted: #64748B;
  --white: #FFFFFF;

  --surface-muted: #F6F8FB;
  --line: #E2E8F0;
  --line-dark: rgba(255, 255, 255, 0.10);
  --text-on-dark: rgba(255, 255, 255, 0.92);
  --text-on-dark-muted: rgba(255, 255, 255, 0.70);

  --font-head: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --container: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(56px, 6vw, 80px);
  --header-h: 76px;
  --radius: 10px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0; }

a { color: var(--blue); text-underline-offset: 3px; }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--white); color: var(--navy);
  font-weight: 600; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.005em; text-decoration: none; white-space: nowrap;
  border-radius: 8px; border: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); }

.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.04); }

.btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.24); }
.btn-outline:hover { border-color: var(--blue-on-dark); color: var(--white); }

.btn-outline-dark { color: var(--navy); border-color: #CBD5E1; background: var(--white); }
.btn-outline-dark:hover { border-color: var(--navy); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 17, 32, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 24px;
}

.brand img { width: auto; height: 38px; }

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav ul { display: flex; gap: 30px; margin: 0; padding: 0; list-style: none; }
.site-nav ul a {
  color: var(--text-on-dark-muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; transition: color .2s ease;
}
.site-nav ul a:hover { color: var(--white); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line-dark); border-radius: 8px;
  cursor: pointer; position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute; left: 50%; width: 18px; height: 1.5px;
  background: var(--white); transform: translateX(-50%);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar { top: 50%; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; transform: none; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .brand img { height: 32px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 20px var(--gutter) 28px;
    background: var(--navy); border-bottom: 1px solid var(--line-dark);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--line-dark); }
  .site-nav .btn { align-self: flex-start; }
}

/* No-JS fallback: keep the menu reachable */
@media (max-width: 960px) {
  .no-js .nav-toggle { display: none; }
  .no-js .site-nav { display: flex; position: static; padding-inline: 0; border: 0; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section-muted { background: var(--surface-muted); }
.section-dark { background: var(--navy); color: var(--text-on-dark-muted); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.eyebrow-dark { color: var(--blue-on-dark); }

.section-head { margin-bottom: clamp(32px, 4vw, 48px); }
.section-head.split {
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
@media (min-width: 900px) {
  .section-head.split { grid-template-columns: 5fr 6fr; gap: 80px; align-items: end; }
}

.prose { display: grid; gap: 16px; font-size: 1.05rem; color: var(--slate); max-width: 62ch; }
.prose-dark { color: var(--text-on-dark-muted); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 88px);
}

.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; pointer-events: none;
  width: 720px; height: 720px; right: -220px; top: -260px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 65%);
}

.hero-inner { position: relative; z-index: 1; }

.hero-title {
  max-width: 20ch;
  font-size: clamp(2.4rem, 5.4vw, 4.25rem);
  line-height: 1.04; letter-spacing: -0.035em;
}

.hero-lead {
  max-width: 60ch; margin-top: 24px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.7;
  color: var(--text-on-dark-muted);
}

.hero-pillars {
  margin-top: 24px;
  font-family: var(--font-head); font-size: 0.98rem; font-weight: 500;
  letter-spacing: 0.01em; color: var(--text-on-dark);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.motto {
  display: flex; align-items: center; gap: 16px;
  margin-top: clamp(36px, 5vw, 56px);
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--white);
}
.motto-line { width: 48px; height: 1px; background: var(--blue); flex: none; }
.motto-accent { color: var(--blue-on-dark); }

@media (max-width: 560px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .motto { font-size: 1rem; letter-spacing: 0.18em; }
  .motto-line { width: 28px; }
}

/* ---------- Qué hacemos ---------- */

.cards {
  display: grid; gap: 1px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: 1fr;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--white); padding: 28px 28px 32px; }
@media (max-width: 639px) {
  .card { display: grid; grid-template-columns: 28px 1fr; gap: 6px 16px; padding: 22px 20px; }
  .card .icon { grid-row: span 2; }
  .card h3 { margin-top: 2px !important; }
  .card p { margin-top: 0 !important; }
}
.card h3 { margin-top: 20px; }
.card p { margin-top: 12px; color: var(--slate-muted); font-size: 0.97rem; }

.icon {
  width: 28px; height: 28px;
  fill: none; stroke: var(--blue); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Enfoque ---------- */

.pillars {
  display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 20px; margin: 0; padding: 0; list-style: none;
  border-top: 1px solid var(--line-dark);
}
@media (min-width: 1040px) { .pillars { grid-template-columns: repeat(4, 1fr); } }

.pillar { padding: 28px 32px 4px 0; }
@media (max-width: 639px) {
  .pillar { padding: 24px 0 8px; }
  .pillar-num { margin-bottom: 14px; }
  .pillar h3 { font-size: 0.92rem; letter-spacing: 0.1em; }
  .pillar p { font-size: 0.95rem; }
}
@media (min-width: 1040px) {
  .pillar + .pillar { padding-left: 32px; border-left: 1px solid var(--line-dark); }
}
.pillar-num {
  display: block; margin-bottom: 18px;
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 500;
  color: var(--blue-on-dark); letter-spacing: 0.08em;
}
.pillar h3 {
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.pillar p { margin-top: 12px; font-size: 1.05rem; color: var(--text-on-dark-muted); }

.head-actions { margin-top: 12px; }

/* ---------- Sobre ---------- */

/* Founders (inside "Sobre SomosTraders") */
.team-list {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 760px) { .team-list { grid-template-columns: 1fr 1fr; } }

.team-member {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.team-photo {
  display: block; aspect-ratio: 16 / 9; max-height: 280px; overflow: hidden;
  background: var(--surface-muted); border-bottom: 1px solid var(--line);
}
.team-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%;
}
.team-body { padding: clamp(24px, 3vw, 32px); }
.team-name {
  margin: 0; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700;
  color: var(--navy); letter-spacing: -0.01em;
}
.team-role {
  margin-top: 6px; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue);
}
.team-bio {
  display: grid; gap: 14px; margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--line); font-size: 0.98rem; color: var(--slate);
}

.team-close {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  margin-top: clamp(28px, 4vw, 40px);
}
.team-close-line {
  font-family: var(--font-head); font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 500;
  color: var(--slate); letter-spacing: -0.01em;
}

/* ---------- Principios (franja) ---------- */

.principles-band {
  padding-block: clamp(44px, 5vw, 64px);
  background: var(--white); border-top: 1px solid var(--line);
}
.principles-band .eyebrow { font-family: var(--font-body); }
.principles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; margin: 4px 0 0;
}
@media (min-width: 640px) { .principles { gap: 0 24px; } }
@media (min-width: 1040px) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principle { padding: 18px 0; border-top: 2px solid var(--navy); }
@media (max-width: 639px) {
  .principle { padding: 14px 0 18px; }
  .principle dt { font-size: 0.82rem !important; letter-spacing: 0.1em !important; }
  .principle dd { font-size: 0.92rem !important; }
}
.principle dt {
  font-family: var(--font-head); font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue);
}
.principle dd { margin: 8px 0 0; font-size: 1rem; color: var(--slate); }

/* ---------- Contacto ---------- */

.section.contact { padding-block: clamp(44px, 5vw, 64px); border-top: 1px solid var(--line); }
.contact-inner { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 900px) { .contact-inner { grid-template-columns: 1fr auto; gap: 64px; } }
.contact h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.contact-text { margin-top: 10px; max-width: 48ch; font-size: 1rem; color: var(--slate); }

.contact-cta { display: grid; gap: 14px; }
@media (min-width: 900px) { .contact-cta { justify-items: end; } }
.contact-email {
  font-family: var(--font-head); font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 600;
  color: var(--navy); text-decoration: none; word-break: break-word;
}
.contact-email:hover { text-decoration: underline; text-decoration-color: var(--blue); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) { .contact-actions .btn { flex: 1 1 100%; } }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep); color: var(--text-on-dark-muted);
  border-top: 1px solid var(--line-dark);
  padding-block: 40px 24px; font-size: 0.92rem;
}
.footer-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px;
  padding-bottom: 28px; border-bottom: 1px solid var(--line-dark);
}
.footer-brand img { height: 30px; width: auto; margin-bottom: 14px; }
.footer-name { color: var(--white); font-weight: 600; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--text-on-dark-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--white); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 20px; font-size: 0.85rem;
}
.footer-entity { color: var(--text-on-dark-muted); opacity: 0.85; }
.footer-legal { padding-block: 18px; border-bottom: 1px solid var(--line-dark); }
.footer-legal p { font-size: 0.72rem; line-height: 1.6; color: var(--text-on-dark-muted); }
.footer-legal strong { color: var(--text-on-dark); font-weight: 600; }

/* ---------- Legal pages ---------- */

.legal-hero { padding-block: clamp(72px, 10vw, 120px) clamp(48px, 7vw, 72px); }
.legal-hero h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); }
.legal-meta { margin-top: 16px; color: var(--text-on-dark-muted); font-size: 0.95rem; }

.legal { padding-block: clamp(56px, 8vw, 96px) var(--section-y); }
.legal-body { max-width: 72ch; }
.legal-body h2 {
  margin-top: 48px; margin-bottom: 14px;
  font-size: 1.35rem; letter-spacing: -0.01em;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--slate); }
.legal-body p + p { margin-top: 14px; }
.legal-body ul { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.legal-back { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.legal-back a { font-weight: 600; text-decoration: none; }
.legal-back a:hover { text-decoration: underline; }
.team-alias {
  margin-top: 4px; font-family: var(--font-head); font-size: 1.05rem; font-weight: 500;
  color: var(--slate-muted);
}
.team-more summary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--blue);
  cursor: pointer; list-style: none; border-radius: 4px;
}
.team-more summary::-webkit-details-marker { display: none; }
.team-more summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease;
}
.team-more[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.team-more summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.team-more .more-close,
.team-more[open] .more-open { display: none; }
.team-more[open] .more-close { display: inline; }
.team-more-body { display: grid; gap: 14px; margin-top: 14px; }

/* Testimonios (dentro de "La comunidad") */
.testimonials { margin-top: 0; }
.testimonials-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: clamp(20px, 3vw, 28px); }
.testimonial-list { display: grid; grid-template-columns: 1fr; gap: 24px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .testimonial-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .testimonial-list { grid-template-columns: repeat(3, 1fr); } }
.testimonial {
  display: flex; flex-direction: column; padding: 20px 24px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.testimonial blockquote { margin: 0 0 16px; }
.testimonial blockquote p { font-size: 0.95rem; line-height: 1.6; color: var(--slate); }
.testimonial blockquote p::before {
  content: "“"; display: block; height: 26px; margin-bottom: 4px;
  font-family: var(--font-head); font-size: 3.2rem; line-height: 1; color: rgba(37, 99, 235, 0.4);
}
.testimonial-name {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  font-weight: 600; color: var(--navy);
}
.testimonial-name span {
  display: block; margin-top: 2px; font-size: 0.82rem; font-weight: 400; color: var(--slate-muted);
}
.testimonials-note { margin-top: 16px; font-size: 0.82rem; color: var(--slate-muted); max-width: 70ch; }
@media (max-width: 699px) {
  /* Mobile: horizontal swipe instead of a long stack */
  .testimonial-list {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px;
    scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .testimonial-list::-webkit-scrollbar { display: none; }
  .testimonial { flex: 0 0 84%; margin-bottom: 0; scroll-snap-align: start; }
}
