:root {
  --blue-900: #0a2a5e;
  --blue-800: #0d3a80;
  --blue-700: #114aa3;
  --blue-600: #1a5cc4;
  --blue-50: #eef4fc;
  --yellow: #f7cf2e;
  --yellow-600: #e8bb10;
  --ink: #16233a;
  --muted: #55627a;
  --line: #dfe6f0;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(13, 42, 94, .08);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; margin: 0; color: var(--blue-800); }
p { margin: 0; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 8px;
  font-weight: 800; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--yellow); color: var(--blue-900); }
.btn-primary:hover { background: var(--yellow-600); }
.btn-outline { border-color: var(--blue-800); color: var(--blue-800); background: #fff; }
.btn-outline:hover { background: var(--blue-800); color: #fff; }

/* Top bar */
.topbar { background: var(--blue-800); color: #fff; font-size: .86rem; }
.topbar .container { display: flex; align-items: center; gap: 28px; min-height: 40px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar svg { width: 16px; height: 16px; color: var(--yellow); flex: none; }
.topbar .push { margin-left: auto; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.header .logo { min-width: 0; }
.menu-toggle { flex: none; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 48px; height: 48px; flex: none; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text small { font-size: .74rem; font-weight: 800; letter-spacing: .02em; color: var(--blue-800); text-transform: uppercase; }
.logo-text strong { font-size: 1.85rem; font-weight: 900; color: var(--blue-800); letter-spacing: -.01em; }

.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a { font-weight: 600; color: var(--ink); position: relative; padding: 6px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: var(--yellow); border-radius: 2px; transform: scaleX(0); transition: transform .2s;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--blue-800); font-weight: 800; }
.header .btn { padding: 12px 22px; font-size: .95rem; }

.menu-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; padding: 8px; cursor: pointer; color: var(--blue-800);
}
.menu-toggle svg { width: 28px; height: 28px; }

/* Hero */
.hero {
  --hero-bg: #101b2b;
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(600px, 44vw, 760px);
  background: var(--hero-bg); color: #fff;
}
.hero-media { position: absolute; inset: 0 0 0 calc((100% - min(var(--max), 100% - 32px)) / 2 + 470px); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--hero-bg) 0%, rgba(16,27,43,.7) 8%, rgba(16,27,43,0) 22%),
    linear-gradient(0deg, rgba(16,27,43,.45) 0%, rgba(16,27,43,0) 30%);
}
.hero .container { position: relative; z-index: 2; padding: 72px 0; }
.hero-content { max-width: 680px; }
.hero .eyebrow { color: var(--yellow); }
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); font-weight: 900; letter-spacing: -.02em; color: #fff; max-width: 540px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p.lead { margin-top: 18px; font-size: 1.1rem; color: rgba(255,255,255,.86); max-width: 500px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.hero .btn-outline { background: transparent; border-color: rgba(255,255,255,.85); color: #fff; }
.hero .btn-outline:hover { background: #fff; border-color: #fff; color: var(--blue-900); }

.hero-badges { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 40px; }
.badge { display: flex; align-items: flex-start; gap: 10px; }
.badge svg { width: 28px; height: 28px; color: var(--yellow); flex: none; }
.badge strong { display: block; font-size: .95rem; color: #fff; }
.badge span { font-size: .8rem; color: rgba(255,255,255,.72); }

/* Highlights strip */
.strip { background: var(--blue-800); color: #fff; }
.strip .container {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 26px 0;
}
.strip-item { display: flex; align-items: center; gap: 14px; min-width: 0; }
.strip-item b { font-size: 2rem; font-weight: 900; color: var(--yellow); line-height: 1; white-space: nowrap; }
.strip-item span { font-size: .92rem; line-height: 1.3; opacity: .92; }

/* About */
.section { padding: 88px 0; }
.about .container { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.about-media { position: relative; }
.about-media img {
  width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 60% 72%;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.years {
  position: absolute; right: -18px; bottom: -22px;
  background: var(--yellow); color: var(--blue-900);
  border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow);
  text-align: center; line-height: 1;
}
.years b { display: block; font-size: 2.8rem; font-weight: 900; }
.years span { display: block; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }

.about h2, .section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 900; }
.about p { margin-top: 18px; color: var(--muted); font-size: 1.05rem; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.feature { text-align: center; }
.feature svg { width: 34px; height: 34px; color: var(--blue-700); margin: 0 auto 10px; }
.feature span { display: block; font-size: .88rem; font-weight: 700; color: var(--blue-900); line-height: 1.35; }

/* Services */
.services { background: var(--blue-50); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { margin-top: 14px; color: var(--muted); }
.grid-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(13,42,94,.12); border-color: #c9d7ec; }
.card-img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { display: flex; gap: 18px; align-items: flex-start; padding: 0 24px 24px; }
.card-icon {
  width: 60px; height: 60px; flex: none; border-radius: 12px;
  display: grid; place-items: center; background: #fff;
  margin-top: -26px; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(13,42,94,.12);
}
.card-body { flex: 1; }
.card-body > div:last-child { padding-top: 18px; display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; }
.card-body > div:last-child > .card-link { margin-top: auto; }
.card-body > div:last-child > :nth-last-child(2) { margin-bottom: 16px; }
.card-icon svg { width: 34px; height: 34px; color: var(--blue-700); }
.card-icon .y { fill: var(--yellow); }
.card-icon .b { fill: var(--blue-700); }
.card h3 { font-size: 1.12rem; font-weight: 800; }
.card p { margin-top: 6px; font-size: .93rem; color: var(--muted); }
.card .tag {
  display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 99px;
  background: var(--yellow); color: var(--blue-900); font-size: .78rem; font-weight: 800;
}
.card-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  padding: 10px 16px; border-radius: 8px; line-height: 1.25;
  background: var(--yellow); color: var(--blue-900);
  font-weight: 800; font-size: .88rem;
  transition: background-color .2s;
}
.card-link:hover { background: var(--yellow-600); }
.card-link svg { width: 16px; height: 16px; flex: none; transition: transform .2s; }
.card:hover .card-link svg { transform: translateX(3px); }

/* Machinery feature */
.machinery .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.machinery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; border-radius: var(--radius); box-shadow: var(--shadow); }
.machinery .container.gallery { grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 56px; align-items: start; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-position: 50% 55%; }
.gallery figcaption { margin-top: 12px; font-weight: 800; font-size: .95rem; color: var(--blue-900); }
.machinery h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 900; }
.machinery p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.checklist { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checklist svg { width: 22px; height: 22px; color: var(--blue-700); flex: none; margin-top: 2px; }

/* Contact */
.contact { background: var(--blue-50); }
.contact-box {
  display: grid; grid-template-columns: 1fr 1.15fr;
  border-radius: 14px; overflow: hidden; box-shadow: 0 16px 40px rgba(13,42,94,.14);
  background: #fff;
}
.contact-info {
  position: relative; color: #fff; padding: 48px 44px;
  background:
    linear-gradient(160deg, rgba(10,42,94,.96) 0%, rgba(13,58,128,.9) 55%, rgba(13,58,128,.72) 100%),
    url("../img/camion-cuba-sm.jpg") center 70% / cover no-repeat;
}
.contact-info .eyebrow { color: #c9daf5; }
.contact-info h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 900; }
.contact-info > p { margin-top: 14px; opacity: .9; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.05rem; }
.contact-list svg { width: 22px; height: 22px; color: var(--yellow); flex: none; margin-top: 3px; }
.contact-list a:hover { text-decoration: underline; }

.form { padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; align-content: start; }
.contact-box > *, .form > * { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 800; color: var(--blue-900); }
.field label i { color: #d33; font-style: normal; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  border: 1px solid #cdd7e6; border-radius: 8px; padding: 12px 14px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(26,92,196,.15);
}
.privacy { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); }
.privacy input { margin-top: 4px; accent-color: var(--blue-700); }
.privacy a { color: var(--blue-700); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .btn { grid-column: 1 / -1; width: 100%; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.form-note { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); text-align: center; }

/* Footer */
.footer { background: var(--blue-900); color: #d6e0f0; }
.footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.3fr; gap: 40px; padding: 60px 0 44px; }
.footer .logo-text small, .footer .logo-text strong { color: #fff; }
.footer p { margin-top: 16px; font-size: .92rem; }
.footer h4 { color: #fff; font-size: 1rem; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer ul a:hover { color: var(--yellow); }
.footer .contact-list { margin: 0; gap: 12px; }
.footer .contact-list li { font-size: .92rem; }
.footer .contact-list svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 18px 0; grid-template-columns: none; }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a:hover { color: var(--yellow); }

/* Floating call button (mobile) */
.fab-call {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--yellow); color: var(--blue-900);
  place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.fab-call svg { width: 26px; height: 26px; }
.fab-whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .2s, background-color .2s;
}
.fab-whatsapp:hover { transform: scale(1.06); background: #1ebe5b; }
.fab-whatsapp svg { width: 32px; height: 32px; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5b; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 1360px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-media { position: relative; inset: auto; height: clamp(240px, 56vw, 520px); }
  .hero-media img { object-position: 78% 50%; }
  .hero-media::after { background: linear-gradient(0deg, var(--hero-bg) 0%, rgba(16,27,43,0) 40%); }
  .hero-content { max-width: 640px; }
  .hero .container { padding: 8px 0 56px; }
}

@media (max-width: 1080px) {
  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .footer .container { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }

}

@media (max-width: 900px) {
  .topbar .hide-sm { display: none; }
  .menu-toggle { display: block; }
  .header .btn { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { display: flex; margin-top: 14px; border: 0; }

  .strip .container { grid-template-columns: 1fr 1fr; gap: 20px; }
  .about .container, .machinery .container { grid-template-columns: 1fr; gap: 48px; }
  .machinery .media { order: -1; }
  .machinery .container.gallery { grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
  .years { right: 12px; }
  .contact-box { grid-template-columns: 1fr; }
  .fab-call { display: grid; }
  .fab-whatsapp { right: 16px; bottom: 86px; width: 58px; height: 58px; }
}

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .machinery .container.gallery { grid-template-columns: 1fr; gap: 24px; }
  .topbar .container { gap: 4px 16px; justify-content: center; flex-wrap: wrap; padding: 6px 0; }
  .topbar .push { margin-left: 0; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-text strong { font-size: clamp(1.1rem, 7.4vw, 1.5rem); }
  .header .container { gap: 12px; }
  .logo-text small { font-size: clamp(.5rem, 3.1vw, .64rem); }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-badges { gap: 18px; }
  .grid-services { grid-template-columns: 1fr; }
  .card-body { flex-direction: column; gap: 0; }
  .card-body > div:last-child { padding-top: 14px; }
  .contact-info, .form { padding: 32px 22px; }
  .form { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr; gap: 32px; }
  .strip .container { gap: 22px 16px; }
  .strip-item { flex-direction: column; align-items: flex-start; gap: 6px; }
  .strip-item b { font-size: 1.6rem; }
  .strip-item span { font-size: .85rem; }
}

/* Legal pages */
.legal { padding: 64px 0 88px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 900; }
.legal .updated { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.legal h2 { font-size: 1.25rem; font-weight: 800; margin: 36px 0 10px; }
.legal p, .legal li { color: #34425a; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 10px 0; display: grid; gap: 6px; }
.legal a { color: var(--blue-700); text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .92rem; }
.legal th, .legal td { text-align: left; border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.legal th { background: var(--blue-50); color: var(--blue-900); }
.legal .data { background: var(--blue-50); border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; }
.legal .data p { margin: 0; }
.legal .back { display: inline-flex; margin-top: 40px; }

/* Cookie consent bar */
.cc {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 980px; margin-inline: auto;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(10, 42, 94, .25);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.cc.cc-show { opacity: 1; transform: none; pointer-events: auto; }
.cc-inner { padding: 22px 24px; display: grid; gap: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.cc-text strong { display: block; font-size: 1.05rem; color: var(--blue-800); margin-bottom: 4px; }
.cc-text p { font-size: .9rem; color: var(--muted); line-height: 1.5; }
.cc-text a { color: var(--blue-700); text-decoration: underline; }
.cc-settings { display: grid; gap: 10px; }
.cc-settings[hidden] { display: none; }
.cc-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.cc-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blue-700); flex: none; }
.cc-opt b { display: block; color: var(--blue-900); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc-btn {
  font: inherit; font-weight: 800; font-size: .92rem; cursor: pointer;
  padding: 11px 22px; border-radius: 8px;
  border: 2px solid var(--blue-800); background: #fff; color: var(--blue-800);
  transition: background-color .2s, color .2s;
}
.cc-btn:hover { background: var(--blue-50); }
.cc-btn[hidden] { display: none; }
.cc-primary { background: var(--blue-800); color: #fff; }
.cc-primary:hover { background: var(--blue-900); }
.cc-link { border-color: transparent; text-decoration: underline; margin-right: auto; padding-inline: 6px; }
.cc-link:hover { background: none; color: var(--blue-600); }
.footer-bottom nav button[data-cookie-settings] { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.footer-bottom nav button[data-cookie-settings]:hover { color: var(--yellow); }
@media (max-width: 600px) {
  .cc { left: 10px; right: 10px; bottom: 10px; }
  .cc-inner { padding: 18px; }
  .cc-actions .cc-btn { flex: 1 1 40%; }
  .cc-link { flex-basis: 100% !important; order: 3; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .cc { transition: none; } }
