/* Inversiones Panul SpA — landing
   Hereda el sistema de diseño v2: usa siempre las variables de tokens.css.
   Correcciones aplicadas sobre la maqueta de referencia:
   - fuera los verdes de la versión anterior -> paleta petróleo
   - logos SVG reales en vez de "Logo Panul.jpeg"
   - --muted #627579 -> --ink-muted
   - footer en navy; íconos dibujados en SVG (no glifos unicode) */

/* ---- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--brand-petrol); color: var(--on-brand); }
:focus-visible { outline: 3px solid var(--brand-petrol); outline-offset: 2px; border-radius: 4px; }
body { caret-color: var(--brand-petrol); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

.wrap { width: min(1140px, 92%); margin-inline: auto; }
.eyebrow { display: block; }
section { padding: var(--space-20) 0; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius-sm);
  background: var(--brand-petrol); color: var(--on-brand);
  border: 1px solid var(--brand-petrol);
  font-weight: 700; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--brand-petrol-deep); border-color: var(--brand-petrol-deep); transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(18,70,80,.5); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .ico { width: 17px; height: 17px; }
.btn.secondary { background: transparent; color: var(--brand-petrol); border-color: var(--border-strong); }
.btn.secondary:hover { background: rgba(23,85,99,.06); color: var(--brand-petrol-deep); border-color: var(--brand-petrol); box-shadow: none; }
.btn.on-dark { background: #FFFFFF; color: var(--brand-petrol-deep); border-color: #FFFFFF; }
.btn.on-dark:hover { background: var(--brand-yellow); color: #20383D; border-color: var(--brand-yellow); }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { height: 38px; width: auto; }
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: 17px; letter-spacing: .015em; color: var(--brand-petrol-deep); line-height: 1.04; }
.brand-text small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-top: 4px; }
.navlinks { display: flex; align-items: center; gap: 28px; }
.navlinks a { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; position: relative; padding: 4px 0; }
.navlinks a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--brand-petrol); transition: right .25s ease; }
.navlinks a:hover { color: var(--brand-petrol); }
.navlinks a:hover::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 44px; height: 44px; padding: 0; cursor: pointer; color: var(--brand-petrol-deep);
}
.menu-toggle svg { width: 22px; height: 22px; margin: auto; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--brand-petrol-deep); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.theme-toggle:hover { background: rgba(23,85,99,.06); border-color: var(--border-strong); }
.theme-toggle .ico { width: 20px; height: 20px; }
.theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(60% 80% at 88% 10%, rgba(2,196,201,.10), transparent 60%),
    linear-gradient(160deg, var(--surface-100) 0%, var(--surface-200) 100%);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; }
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.045em;
  color: var(--brand-petrol-deep); margin: 16px 0 20px; max-width: 14ch;
}
.hero-lead { font-size: 19px; line-height: 1.55; color: var(--ink-muted); max-width: 52ch; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { margin-top: 34px; display: flex; gap: 28px; flex-wrap: wrap; font-size: 13px; color: var(--ink-muted); }
.hero-meta b { color: var(--brand-petrol-deep); font-weight: 700; }

/* letrero: placa navy con el logo real, como el cartel de la oficina */
.hero-art { position: relative; display: grid; place-items: center; min-height: 380px; }
.letrero {
  position: relative; width: min(420px, 100%); aspect-ratio: 16 / 11;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(2,196,201,.18), transparent 55%),
    var(--logo-navy);
  border-radius: var(--radius-lg); padding: 38px;
  display: grid; place-items: center;
  box-shadow: 0 34px 70px -24px rgba(14,40,46,.55), inset 0 0 0 1px rgba(255,255,255,.06);
}
.letrero::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.10); border-radius: calc(var(--radius-lg) - 8px); pointer-events: none; }
.letrero img { width: 86%; height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.chip {
  position: absolute; background: var(--surface-100);
  border-radius: var(--radius-sm); padding: 13px 16px; display: flex; gap: 11px; align-items: center;
  box-shadow: 0 20px 44px -14px rgba(14,40,46,.4);
}
.chip .ico { width: 20px; height: 20px; color: var(--brand-petrol); flex: 0 0 auto; }
.chip b { display: block; font-size: 13px; font-weight: 700; color: var(--brand-petrol-deep); line-height: 1.2; }
.chip span { display: block; font-size: 11.5px; color: var(--ink-muted); line-height: 1.3; }
.chip.one { top: 8px; left: -18px; }
.chip.two { bottom: 14px; right: -16px; }

/* ---- Trust strip -------------------------------------------------------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-100); }
.trust .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 0; }
.trust strong { color: var(--brand-petrol-deep); font-size: 14px; font-weight: 800; letter-spacing: .01em; }
.trust span { color: var(--ink-muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.trust span .ico { width: 16px; height: 16px; color: var(--brand-petrol); }

/* ---- Section head ------------------------------------------------------- */
.section-head { max-width: 680px; margin: 0 auto var(--space-10); text-align: center; }
.section-head h2 { margin: 10px 0 12px; }
.section-head p { color: var(--ink-muted); margin: 0; font-size: 17px; }

/* ---- Divisiones --------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface-100); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 30px 28px; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 26px 48px -22px rgba(18,70,80,.35); border-color: var(--border-strong); }
.iconbox {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(23,85,99,.08); color: var(--brand-petrol); margin-bottom: 20px;
}
.iconbox .ico { width: 28px; height: 28px; }
.card h3 { margin: 0 0 10px; }
.card > p { color: var(--ink-muted); font-size: 14.5px; margin: 0 0 18px; }
.card ul { list-style: none; padding: 0; margin: 0 0 22px; }
.card li { position: relative; padding: 7px 0 7px 26px; font-size: 14px; color: var(--ink); border-top: 1px solid var(--border); }
.card li:first-child { border-top: 0; }
.card li::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: 14px; height: 2px;
  background: var(--brand-petrol); transform: translateY(-50%); border-radius: 2px;
}
.card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--brand-petrol); font-weight: 700; font-size: 14px; text-decoration: none; }
.card .more .ico { width: 16px; height: 16px; transition: transform .2s ease; }
.card .more:hover { color: var(--brand-petrol-deep); }
.card .more:hover .ico { transform: translateX(4px); }

/* ---- Nosotros ----------------------------------------------------------- */
.about { background: var(--surface-200); }
.about-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 56px; align-items: center; }
.about-panel {
  position: relative; overflow: hidden; color: var(--on-brand);
  background: linear-gradient(150deg, var(--brand-petrol-deep), var(--brand-petrol));
  border-radius: var(--radius-lg); padding: 38px; min-height: 320px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  box-shadow: 0 30px 60px -28px rgba(14,40,46,.5);
}
.about-panel .mark { position: absolute; top: 26px; left: 34px; width: 92px; opacity: .9; }
.about-panel h3 { color: var(--on-brand); font-size: 26px; line-height: 1.22; max-width: 15ch; margin: 0; }
.about-panel p { color: rgba(234,243,243,.82); margin: 0; max-width: 34ch; }
.about-copy h2 { margin: 10px 0 18px; }
.about-copy > p { color: var(--ink-muted); font-size: 16px; }
.about-copy > p + p { margin-top: 14px; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin-top: 28px; }
.value { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; font-weight: 600; color: var(--brand-petrol-deep); }
.value .ico { width: 21px; height: 21px; color: var(--brand-petrol); flex: 0 0 auto; margin-top: 1px; }

/* ---- Método / proceso --------------------------------------------------- */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative; overflow: hidden; background: var(--surface-100); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 28px 24px;
}
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--brand-yellow); }
.step .step-k { display: flex; align-items: center; gap: 10px; color: var(--brand-petrol); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.step .step-n { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-muted); font-weight: 800; }
.step h3 { margin: 14px 0 8px; font-size: 19px; }
.step p { margin: 0; font-size: 14px; color: var(--ink-muted); }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { background: linear-gradient(120deg, var(--brand-petrol-deep), var(--brand-petrol)); color: var(--on-brand); }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: 54px 0; }
.cta-band h2 { color: var(--on-brand); font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 8px; }
.cta-band p { margin: 0; color: rgba(234,243,243,.85); }

/* ---- Contacto ----------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 48px; align-items: start; }
.contact-intro h2 { margin: 10px 0 14px; }
.contact-intro > p { color: var(--ink-muted); font-size: 16px; max-width: 42ch; }
.contact-item { display: flex; gap: 14px; align-items: center; margin-top: 26px; }
.contact-item .iconbox { width: 46px; height: 46px; margin: 0; flex: 0 0 auto; }
.contact-item .iconbox .ico { width: 22px; height: 22px; }
.contact-item small { display: block; color: var(--ink-muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; margin-bottom: 2px; }
.contact-item a, .contact-item span { color: var(--brand-petrol-deep); font-weight: 600; font-size: 15px; text-decoration: none; }
.contact-item a:hover { color: var(--brand-petrol); text-decoration: underline; text-underline-offset: 3px; }

.form { background: var(--surface-100); border-radius: var(--radius-md); padding: 30px; box-shadow: 0 20px 50px -24px rgba(18,70,80,.32); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--brand-petrol-deep); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface-100); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .18s ease, box-shadow .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); opacity: .75; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-petrol); box-shadow: 0 0 0 3px rgba(23,85,99,.15); }
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23175563' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form button { width: 100%; }
.form-note { font-size: 12px; color: var(--ink-muted); margin: 14px 0 0; line-height: 1.5; }
.form-note a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.form-msg { display: none; margin: 14px 0 0; padding: 13px 15px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.form-msg.show { display: flex; gap: 9px; align-items: flex-start; }
.form-msg .ico { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.form-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.form-ok { background: rgba(31,122,77,.1); border: 1px solid var(--success); color: var(--success); }
.form-err { background: rgba(180,35,24,.08); border: 1px solid var(--danger); color: var(--danger); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--logo-navy); color: rgba(234,243,243,.72); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding: 34px 0; }
.site-footer img { height: 54px; width: auto; }
.site-footer p { font-size: 12.5px; margin: 0; color: rgba(234,243,243,.6); max-width: 46ch; }
.footlinks { display: flex; gap: 20px; }
.footlinks a { color: rgba(234,243,243,.82); font-size: 13px; font-weight: 600; text-decoration: none; }
.footlinks a:hover { color: var(--brand-yellow); }

/* ---- Reveal motion (mejora progresiva: sin JS todo es visible) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js [data-stagger] > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* ---- Modo oscuro (toggle) ----------------------------------------------- */
/* Los tokens voltean superficies/tinta/bordes; aquí se ajusta lo que queda
   fijo en petróleo (títulos, eyebrows, íconos) para que lea sobre fondo oscuro. */
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] .display,
:root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .about-copy h2,
:root[data-theme="dark"] .contact-intro h2,
:root[data-theme="dark"] .card h3,
:root[data-theme="dark"] .step h3,
:root[data-theme="dark"] .brand-text,
:root[data-theme="dark"] .trust strong,
:root[data-theme="dark"] .hero-meta b,
:root[data-theme="dark"] .value,
:root[data-theme="dark"] .contact-item span,
:root[data-theme="dark"] .field label { color: var(--ink); }

:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .step-k,
:root[data-theme="dark"] .card .more,
:root[data-theme="dark"] .contact-item a,
:root[data-theme="dark"] .trust span .ico,
:root[data-theme="dark"] .chip .ico,
:root[data-theme="dark"] .btn.secondary { color: var(--link); }

:root[data-theme="dark"] .iconbox { background: rgba(127,211,218,.12); color: var(--link); }
:root[data-theme="dark"] .card li::before { background: var(--link); }
:root[data-theme="dark"] .value .ico { color: var(--link); }
:root[data-theme="dark"] .navlinks a::after { background: var(--link); }
:root[data-theme="dark"] .navlinks a:hover { color: var(--link); }

:root[data-theme="dark"] .site-header { background: rgba(14,47,54,.82); border-bottom-color: var(--border); }
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .menu-toggle { color: var(--ink); border-color: var(--border); }
:root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .btn.secondary:hover { background: rgba(127,211,218,.1); border-color: var(--link); color: var(--link); }

:root[data-theme="dark"] .chip { background: var(--surface-200); }
:root[data-theme="dark"] .chip b { color: var(--ink); }
:root[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237FD3DA' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* Oscuro: recuperar el ritmo de color (las bandas petróleo quedan cerca del
   fondo surface-200, por eso se delinean para que anclen como en claro). */
:root[data-theme="dark"] .cta-band {
  box-shadow: inset 0 1px 0 rgba(127,211,218,.18), inset 0 -1px 0 rgba(127,211,218,.18);
}
:root[data-theme="dark"] .about-panel {
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.6), inset 0 0 0 1px rgba(127,211,218,.12);
}
:root[data-theme="dark"] .site-footer { border-top: 1px solid var(--border); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 920px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 320px; margin-top: 8px; }
  .about-panel { min-height: 260px; }
}
@media (max-width: 760px) {
  section { padding: 56px 0; }
  .menu-toggle { display: grid; }
  .navlinks {
    position: absolute; top: 78px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface-100); border-bottom: 1px solid var(--border); padding: 8px 6%;
    box-shadow: 0 24px 40px -24px rgba(18,70,80,.3); display: none;
  }
  .navlinks.open { display: flex; }
  .navlinks a { padding: 14px 0; border-top: 1px solid var(--border); }
  .navlinks a:first-child { border-top: 0; }
  .nav-actions .btn { display: none; }
  .cards, .process { grid-template-columns: 1fr; }
  .section-head { text-align: left; margin-left: 0; }
  .values { grid-template-columns: 1fr; }
  .chip.one { left: 0; }
  .chip.two { right: 0; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .chip { display: none; }
}
@media (max-width: 360px) {
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
