/* ==========================================================================
   Operflor Logistica SAS — sistema de diseño
   Paleta tomada del logo: navy #11417B · cyan #2EA5D3
   ========================================================================== */

:root {
  --navy:        #11417B;
  --navy-700:    #0E3566;
  --navy-900:    #0A2A54;
  --navy-950:    #0B1B33;
  --cyan:        #2EA5D3;
  --cyan-200:    #BFE0F2;
  --cyan-50:     #EAF4FB;
  --green:       #7A9A4A;
  --green-50:    #F1F5EA;

  --ink:         #47566B;
  --ink-soft:    #6B7C93;
  --bg:          #F4F8FC;
  --surface:     #FFFFFF;
  --line:        #E3EBF3;

  --shadow-sm:   0 1px 2px rgba(11, 27, 51, .05);
  --shadow:      0 4px 16px rgba(11, 27, 51, .07);
  --shadow-lg:   0 12px 40px rgba(11, 27, 51, .10);

  --r:           14px;
  --r-lg:        22px;
  --wrap:        1180px;
  --nav-h:       76px;

  --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.18;
  margin: 0 0 .5em;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); font-weight: 700; }
.h1--lg { font-size: clamp(2.5rem, 5.6vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem);  font-weight: 700; }
h3 { font-size: 1.16rem; font-weight: 700; }
.card__title--lg { font-size: 1.4rem; }
h4 { font-size: 1rem;    font-weight: 700; }
p  { margin: 0 0 1rem; }
a  { color: var(--navy); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.pagehead + .section { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.center { text-align: center; }
.lead { font-size: 1.06rem; color: var(--ink); max-width: 62ch; }
.muted { color: var(--ink-soft); }

/* --- Eyebrow + regla ------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-display);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan); margin: 0 0 .9rem;
}
.eyebrow--green { color: var(--green); }
.rule { width: 54px; height: 3px; border-radius: 3px; background: var(--cyan); margin: 1.25rem 0 1.5rem; }
.rule--green { background: var(--green); }
.center .rule { margin-inline: auto; }

/* --- Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: .18s ease;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-700); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }

.link-more {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--cyan);
}
.link-more svg { transition: transform .18s ease; }
.link-more:hover svg { transform: translateX(4px); }

/* --- Navegación ----------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 1rem; }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: .35rem; }
.nav__links a {
  font-family: var(--font-display); font-weight: 500; font-size: .92rem;
  color: var(--navy-900); padding: .5rem .7rem; border-radius: 8px; transition: .15s;
}
.nav__links a:hover { background: var(--cyan-50); color: var(--navy); }
.nav__links a.is-active { color: var(--cyan); font-weight: 600; }
.nav__links a.nav__portal {
  border: 1.5px solid var(--cyan); color: var(--navy); border-radius: 999px; padding: .45rem 1rem;
}
.nav__links a.nav__portal:hover { background: var(--cyan); color: #fff; }

.lang { display: flex; align-items: center; gap: .15rem; margin-left: .4rem; font-family: var(--font-display); font-size: .82rem; }
.lang button {
  border: 0; background: none; cursor: pointer; padding: .25rem .4rem; border-radius: 6px;
  font: inherit; font-weight: 600; color: var(--ink-soft);
}
.lang button.is-active { color: var(--navy); background: var(--cyan-50); }
.lang span { color: var(--line); }

.nav__burger { display: none; border: 0; background: none; cursor: pointer; padding: .5rem; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--navy-900); border-radius: 2px; }
.nav__burger span + span { margin-top: 5px; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 45%, #2C6BA8 100%);
  color: #fff; padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(5rem, 9vw, 8rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(10,42,84,.88) 0%, rgba(17,65,123,.82) 45%, rgba(44,107,168,.72) 100%);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.86); }
.hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.hero--solo .hero__grid { grid-template-columns: 1fr; max-width: 640px; }
.hero__badge {
  display: inline-block; font-family: var(--font-display); font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; padding: .45rem 1rem; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); margin-bottom: 1.5rem;
}
.hero__slogan { font-style: italic; font-weight: 700; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; display: block; z-index: 2; }

/* Hero interior (páginas secundarias): claro, como en las maquetas */
.pagehead { position: relative; overflow: hidden; background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%); padding: clamp(3rem, 6vw, 4.75rem) 0 clamp(2.5rem, 5vw, 4rem); }
.pagehead__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.pagehead--solo .pagehead__grid { grid-template-columns: 1fr; max-width: 760px; }

/* --- Tarjetas ------------------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.75rem; box-shadow: var(--shadow-sm); transition: .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--cyan-50); color: var(--navy); margin-bottom: 1.1rem; flex: none;
}
.card__icon--green { background: var(--green-50); color: var(--green); }
.card__icon-img { width: 52px; height: 52px; margin-bottom: 1.1rem; display: block; }
.card p { color: var(--ink); font-size: .95rem; }
.card .link-more { margin-top: auto; padding-top: .75rem; }

/* Tarjeta de servicio con cabecera ilustrada */
.svc { padding: 0; overflow: hidden; }
.svc__media { position: relative; height: 168px; }
.svc__media svg { width: 100%; height: 100%; display: block; }
.svc__badge {
  position: absolute; top: 14px; left: 14px; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; color: var(--navy); box-shadow: var(--shadow-sm);
}
.svc__body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.svc__body > h3 { margin-bottom: .6rem; }
.svc__label {
  font-family: var(--font-display); font-weight: 700; font-size: .84rem;
  color: var(--green); margin: 1.1rem 0 .6rem;
}
.checklist li {
  position: relative; padding-left: 1.7rem; font-size: .9rem; margin-bottom: .45rem; color: var(--ink);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--green);
  background: no-repeat center/8px 8px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1 6.2 4.3 9.5 11 2.8' fill='none' stroke='%237A9A4A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.svc__foot { height: 4px; background: var(--green); margin-top: auto; }
.svc__foot--navy { background: var(--navy); }

/* --- Chips de atributos --------------------------------------------------- */
.chips {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .85rem 1.5rem; margin-top: 2rem;
}
.chip {
  display: flex; align-items: center; gap: .65rem;
  font-family: var(--font-display); font-size: .84rem; font-weight: 600; color: var(--navy-900);
  line-height: 1.25;
}
.chip svg { color: var(--green); flex: none; }
.chip--light { color: rgba(255,255,255,.92); }
.chip--light svg { color: var(--cyan-200); }

/* --- Banda de productos --------------------------------------------------- */
.products { background: var(--navy); color: #fff; padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.products h2 { color: #fff; }
.products__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-top: 2rem; }
.product {
  background: #fff; border-radius: var(--r); padding: 1rem;
  display: flex; align-items: center; gap: .8rem; text-align: left;
}
.product svg { color: var(--navy); flex: none; }
.product b { display: block; font-family: var(--font-display); font-size: .92rem; color: var(--navy-900); }
.product i { font-size: .78rem; color: var(--ink-soft); font-style: italic; }

/* --- Equipo --------------------------------------------------------------- */
.team { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; margin-top: 2.5rem; }
.team figure { margin: 0; flex: 0 0 calc(25% - .94rem); max-width: calc(25% - .94rem); }
.team img {
  /* height:auto es necesario: sin el, el atributo height="900" del <img>
     gana sobre aspect-ratio y la foto sale estirada. */
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--r); background: var(--cyan-50); box-shadow: var(--shadow-sm);
}
.team figcaption {
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  color: var(--navy-900); text-align: center; margin-top: .8rem;
}

/* --- Franja de foto / marcador de imagen --------------------------------- */
.figure { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--cyan-50); }
.figure svg, .figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.figure--ratio { aspect-ratio: 16 / 10; }

/* --- Contacto ------------------------------------------------------------- */
.contact-card { display: flex; flex-direction: column; gap: .35rem; }
.contact-card .card__icon { width: 44px; height: 44px; border-radius: 50%; margin-bottom: .9rem; }
.contact-card h3 { color: var(--navy); margin-bottom: .5rem; }
.contact-card a { color: var(--ink); font-size: .95rem; word-break: break-word; }
.contact-card a:hover { color: var(--cyan); }
.contact-card .tel { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--navy-900); display: block; margin-bottom: .15rem; }
.contact-card p { word-break: break-word; }

/* --- Dashboard (Tecnología) ---------------------------------------------- */
.dash {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); background: #fff;
}
.dash svg, .dash video { width: 100%; height: auto; display: block; }

/* --- Footer --------------------------------------------------------------- */
.footer { background: var(--navy-950); color: rgba(255,255,255,.72); padding: clamp(3rem, 5vw, 4rem) 0 1.5rem; font-size: .9rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 2.5rem; }
.footer h4 {
  color: #fff; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.1rem;
}
.footer a { color: rgba(255,255,255,.72); }
.footer a:hover { color: #fff; }
.footer li { margin-bottom: .5rem; }
.footer__logo { height: 30px; width: auto; margin-bottom: 1rem; }
.footer__slogan { font-style: italic; color: rgba(255,255,255,.6); max-width: 30ch; }
.footer__row { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .7rem; }
.footer__row svg { flex: none; margin-top: .2rem; color: var(--cyan); }
.footer__social { display: flex; gap: .6rem; margin-top: 1.4rem; }
.footer__social a {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; transition: .18s;
}
.footer__social a:hover { background: var(--cyan); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.10); margin-top: 2.5rem; padding-top: 1.25rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem;
}
.footer__bottom ul { display: flex; gap: 1.25rem; }
.footer__bottom li { margin: 0; }

/* --- Utilidades de idioma ------------------------------------------------- */
[data-i18n] { transition: opacity .12s ease; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .products__grid { grid-template-columns: repeat(3, 1fr); }
  .team figure { flex-basis: calc(33.33% - 0.84rem); max-width: calc(33.33% - 0.84rem); }
  .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav__burger { display: block; }
  .nav__links {
    position: absolute; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem;
    gap: .1rem; box-shadow: var(--shadow); display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .7rem .5rem; }
  .nav__links a.nav__portal { text-align: center; margin-top: .5rem; }
  .lang { margin: .5rem 0 0; }

  .hero__grid, .pagehead__grid { grid-template-columns: 1fr; }
  .pagehead__media { order: -1; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .chips { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .products__grid, .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .team figure { flex-basis: calc(50% - .625rem); max-width: calc(50% - .625rem); }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
