/* FIFI H&A LLC — sitio de credibilidad (brokers, carriers, bancos) */

:root {
  --bg: #0A0C0F;
  --bg-2: #101418;
  --panel: #141A20;
  --line: #232B34;
  --text: #ECEFF2;
  --muted: #9AA6B2;
  --accent: #FF8A1F;
  --accent-hover: #FF9C40;
  --accent-ink: #1A0E02;
  --paper: #F2F0EB;
  --paper-2: #E6E2D8;
  --ink: #0E1115;
  --ink-muted: #4B5561;
  --radius: 16px;
  --max: 1200px;
  --header-h: 68px;
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: .95; text-transform: uppercase; letter-spacing: .005em; }
h2 { font-size: clamp(40px, 6vw, 68px); }
h3 { font-size: 26px; line-height: 1.05; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.lead { font-size: 19px; color: var(--muted); max-width: 620px; margin-top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 16px/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px; padding: 15px 24px;
  transition: transform .2s, background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255,255,255,.24); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--text); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #1d232b; transform: translateY(-1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,12,15,.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: .02em; }
.brand-name span { color: var(--accent); }
.brand-llc { display: block; font: 600 10.5px/1 var(--f-body); letter-spacing: .28em; color: var(--muted); margin-top: 4px; }
.nav-links { display: flex; gap: 30px; list-style: none; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { padding: 11px 18px; font-size: 15px; }
.lang {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
}
.lang button {
  font: 700 13px/1 var(--f-body); letter-spacing: .08em; cursor: pointer;
  color: var(--muted); background: transparent; border: 0; border-radius: 999px;
  min-height: 36px; padding: 9px 12px; transition: background-color .2s, color .2s;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,.18); color: var(--text);
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav-cta .btn-call-label { display: none; }
  .nav-cta .btn { padding: 11px 13px; }
  .nav-links {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .nav { gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 22px; }
  .brand-llc { font-size: 9px; letter-spacing: .22em; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn { padding: 10px 11px; }
  .menu-toggle { width: 40px; height: 40px; }
  .lang button { padding: 9px 9px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px 0 120px;
}
.hero-scene { position: absolute; inset: 0; z-index: -1; }
/* Foto del camión: <img> fija de respaldo + canvas WebGL con efecto 3D por capas (hero3d.js) encima.
   hero3d.js lee object-position de aquí; scale() debe coincidir con su ZOOM */
.hero-scene { background: var(--bg); }
.hero-photo, .hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo { object-fit: cover; object-position: 70% 50%; transform: scale(1.12); transform-origin: 70% 50%; }
.hero-3d { opacity: 0; transition: opacity .6s ease; }
.hero-3d.ready { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,12,15,.96) 0%, rgba(10,12,15,.82) 34%, rgba(10,12,15,.1) 64%, rgba(10,12,15,0) 100%);
}
.hero-content { position: relative; max-width: 660px; }
.hero-stage { display: none; }   /* solo en celular/tablet: hueco para que se vea el camión */
.hero h1 { font-size: clamp(52px, 8.4vw, 112px); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: #C3CBD3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

@media (max-width: 900px) {
  /* Celular/tablet: título arriba, el camión a la vista en el centro, descripción y botones abajo */
  .hero { padding: 26px 0 30px; justify-content: flex-start; }
  .hero-content { display: flex; flex-direction: column; max-width: none; min-height: calc(100svh - var(--header-h) - 56px); }
  .hero .eyebrow { font-size: 12px; letter-spacing: .16em; margin-bottom: 14px; }
  .hero h1 { font-size: clamp(38px, 10.5vw, 60px); }
  .hero-stage { display: block; flex: 1 1 auto; min-height: 38vh; }
  .hero .lead { font-size: 16.5px; margin-top: 0; }
  .hero-actions { margin-top: 18px; gap: 10px; }
  .hero-actions .btn { padding: 13px 20px; font-size: 15px; }
  .hero-photo { object-position: 73% 50%; transform-origin: 73% 50%; }
  .hero-shade { background: linear-gradient(180deg, rgba(10,12,15,.86) 0%, rgba(10,12,15,.6) 20%, rgba(10,12,15,.1) 38%, rgba(10,12,15,.06) 58%, rgba(10,12,15,.7) 76%, rgba(10,12,15,.95) 100%); }
}

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section-head { margin-bottom: 56px; }
.light { background: var(--paper); color: var(--ink); }
.light .lead { color: var(--ink-muted); }
.light .eyebrow { color: #C25F00; }
@media (max-width: 700px) { .section { padding: 84px 0; } .section-head { margin-bottom: 40px; } }

/* Bento de servicios */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--paper-2); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 14px; min-height: 260px;
}
.card p { color: var(--ink-muted); }
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: #C25F00; }
.card .icon svg { width: 26px; height: 26px; }
.card-a { grid-column: span 4; background: var(--ink); border-color: var(--ink); color: var(--text); }
.card-a p { color: var(--muted); max-width: 440px; }
.card-a .icon { background: rgba(255,138,31,.14); color: var(--accent); }
.card-a .ghost-word {
  position: absolute; right: -12px; bottom: -34px;
  font: 800 150px/1 var(--f-display); text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.1); pointer-events: none;
}
.card-b { grid-column: span 2; }
.card-c { grid-column: span 3; }
.card-d { grid-column: span 3; background: var(--accent); border-color: var(--accent); }
.card-d p { color: #3D2106; }
.card-d .icon { background: rgba(26,14,2,.1); color: var(--accent-ink); }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; list-style: none; padding-left: 0; }
.card .tags li { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--paper); color: var(--ink-muted); }
.card-a .tags li { background: rgba(255,255,255,.07); color: #C3CBD3; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }   /* tablet: dos columnas, la tarjeta principal a lo ancho */
  .card-a, .card-b, .card-c, .card-d { grid-column: auto; }
  .card-a { grid-column: 1 / -1; }
  .card { min-height: 0; padding: 26px; }
  .card-a .ghost-word { font-size: 110px; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .card-a { grid-column: auto; }
}

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; list-style: none; padding: 0; }
.step { position: relative; padding: 30px 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font: 800 54px/1 var(--f-display); color: transparent;
  -webkit-text-stroke: 1.5px var(--accent); margin-bottom: 22px;
}
.step h3 { font-size: 24px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Cobertura */
.coverage { background: var(--bg-2); border-block: 1px solid var(--line); }
.coverage-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; list-style: none; padding: 0; }
.chips li {
  font: 700 18px/1 var(--f-display); letter-spacing: .06em;
  padding: 11px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
}
.chips li strong { color: var(--accent); }
/* Mapa de EE. UU. (48 estados) con punto de origen y red de destinos — geometría en fuentes-fifi/make_usmap.py */
.usmap { position: relative; }
.usmap svg { width: 100%; height: auto; display: block; overflow: visible; }
.usmap .land { fill: url(#map-dots); stroke: rgba(255,255,255,.16); stroke-width: 1; stroke-linejoin: round; }
.usmap .borders { fill: none; stroke: rgba(255,255,255,.07); stroke-width: .8; stroke-linejoin: round; }
.usmap .route { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 5 7; opacity: .8; animation: dash 3s linear infinite; }
.usmap .dest { fill: var(--text); }
.usmap .dest-ring { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .55; }
.usmap .pulse { fill: var(--accent); transform-origin: center; transform-box: fill-box; animation: pulse 2.4s ease-out infinite; }
.usmap .label { font: 600 14px var(--f-body); letter-spacing: .08em; fill: var(--muted); text-transform: uppercase; }
@media (max-width: 900px) {   /* el viewBox de 975 px se reduce a ~340 px: se agrandan trazos, puntos y etiquetas */
  .usmap .label { font-size: 26px; }
  .usmap .dest { r: 5; }
  .usmap .dest-ring { r: 11; stroke-width: 2; }
  .usmap .route { stroke-width: 2.8; stroke-dasharray: 9 11; }
  .usmap .land { stroke-width: 1.6; }
  .usmap .borders { stroke-width: 1.2; }
}
@keyframes dash { to { stroke-dashoffset: -24; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3.2); opacity: 0; } }
@media (max-width: 900px) { .coverage-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Por qué nosotros */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.why { background: var(--bg); padding: 34px 28px; }
.why .icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 20px; }
.why h3 { font-size: 24px; margin-bottom: 10px; }
.why p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

/* Trabajar con nosotros */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.partner {
  display: flex; flex-direction: column; gap: 14px;
  padding: 34px 30px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--paper-2);
}
.partner .kicker { font: 700 14px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #C25F00; }
.partner p { color: var(--ink-muted); }
.partner .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 900px) { .partners { grid-template-columns: 1fr; } }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin-top: 34px; display: grid; gap: 14px; }
.contact-list a, .contact-list div {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  transition: border-color .2s;
}
.contact-list a:hover { border-color: var(--accent); }
.contact-list svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.contact-list small { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-list strong { font-size: 18px; font-weight: 600; word-break: break-word; }
.form { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 34px; display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: #C3CBD3; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px;
  transition: border-color .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form .btn { justify-self: start; }
.form-note { font-size: 13px; color: var(--muted); }
.hp { display: none; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 560px) { .form { padding: 22px; } .form-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 34px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: #C3CBD3; }
.site-footer a:hover { color: var(--accent); }
.footer-ids { margin-top: 16px; color: var(--muted); font-size: 15px; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Carrier profile ---------- */
.page-hero { padding: 88px 0 56px; border-bottom: 1px solid var(--line); background:
  radial-gradient(50% 120% at 85% 0%, rgba(255,138,31,.16), transparent 70%), var(--bg); }
.page-hero h1 { font-size: clamp(48px, 7vw, 88px); }
.profile { padding: 64px 0 110px; }
.profile-card { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 26px 30px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.profile-head h2 { font-size: 34px; }
.profile-list { display: grid; grid-template-columns: 1fr 1fr; }
.profile-list > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 18px 30px; border-bottom: 1px solid var(--line); }
.profile-list > div:nth-child(odd) { border-right: 1px solid var(--line); }
.profile-list dt { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.profile-list dd { font-size: 18px; font-weight: 600; word-break: break-word; }
.profile-list dd a { text-decoration: none; color: var(--accent); }
.profile-docs { padding: 28px 30px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.profile-docs p { color: var(--muted); max-width: 560px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
@media (max-width: 800px) {
  .profile-list { grid-template-columns: 1fr; }
  .profile-list > div { grid-template-columns: 1fr; gap: 4px; padding: 16px 20px; }
  .profile-list > div:nth-child(odd) { border-right: 0; }
  .profile-head, .profile-docs { padding: 20px; }
}

/* Página simple (gracias / 404) */
.simple { min-height: calc(100svh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.simple h1 { font-size: clamp(48px, 8vw, 96px); }
.simple p { color: var(--muted); margin: 18px auto 32px; max-width: 520px; font-size: 19px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .usmap .route, .usmap .pulse { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Print (ficha del carrier) ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .profile-actions, .no-print { display: none !important; }
  .page-hero { background: none; padding: 0 0 16px; border: 0; }
  .page-hero .lead, .profile-docs p { color: #333; }
  .profile { padding: 0; }
  .profile-card, .profile-head { background: #fff; border-color: #bbb; }
  .profile-list > div { border-color: #ccc !important; }
  .profile-list dt { color: #555; }
  .profile-list dd a { color: #000; }
  .eyebrow { color: #000; }
}
