/* ============================================================
   Project detail pages — shared styles
   Used by: acapulco.html, ensenada.html, cajeme.html, tijuana.html
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --oe-blue: #0038AE;
  --oe-orange: #FF6A00;
  --oe-orange-deep: #D95800;
  --oe-cyan: #00D4FF;
  --oe-green: #00FF94;
  --oe-warn: #FFB347;
  --oe-err: #FF5050;
  --oe-black: #07090C;
  --bg-elev: #0E1116;
  --bg-elev-2: #11151B;
  --fg: #FFFFFF;
  --fg-muted: rgba(255,255,255,0.62);
  --fg-dim: rgba(255,255,255,0.38);
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --font-display: 'Inter Tight', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --container-px: clamp(24px, 4vw, 80px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  background: var(--oe-black);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: var(--oe-orange); color: white; }

/* ----- NAV ----- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px var(--container-px);
  background: rgba(7,9,12,0.78); backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.nav-logo img { height: 32px; display: block; }
.nav-links { display: flex; gap: 36px; font-size: 14px; }
.nav-links a { color: var(--fg-muted); transition: color .2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 500; font-size: 14px; transition: all .2s; }
.btn-primary { background: var(--oe-orange); color: white; }
.btn-primary:hover { background: var(--oe-orange-deep); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--oe-black); border-color: var(--fg); }
.btn-arrow { width: 14px; height: 14px; display: inline-block; position: relative; }
.btn-arrow::before, .btn-arrow::after { content: ""; position: absolute; background: currentColor; }
.btn-arrow::before { top: 50%; left: 0; right: 2px; height: 1.5px; transform: translateY(-50%); }
.btn-arrow::after { right: 0; top: 50%; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateY(-50%) rotate(45deg); background: none; }
@media (max-width: 920px) { .nav-links { display: none; } }

.eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg-muted); font-weight: 500;
}

/* ----- HERO ----- */
.p-hero {
  position: relative; padding: 140px var(--container-px) 80px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 50% at 70% 30%, rgba(255,106,0,0.10), transparent 70%),
    linear-gradient(180deg, #04060c 0%, #06090f 100%);
  overflow: hidden;
}
.p-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 35%;
  filter: brightness(0.45) saturate(1.15);
  opacity: 0.55;
  pointer-events: none;
}
.p-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,9,12,0.35) 0%, rgba(7,9,12,0.85) 70%, var(--oe-black) 100%),
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(255,106,0,0.18), transparent 70%);
}
.p-hero-inner { position: relative; }
.p-hero-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted);
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.p-hero-bar a:hover { color: var(--oe-orange); }
.p-hero-bar .crumbs { display: inline-flex; align-items: center; gap: 10px; }
.p-hero-bar .crumbs span:not(:last-child)::after { content: "·"; margin-left: 10px; opacity: 0.45; }
.p-hero h1 { font-weight: 500; line-height: 0.94; letter-spacing: -0.035em; text-wrap: balance; }
.p-hero .h-sub {
  font-size: clamp(20px, 2.2vw, 32px);
  color: var(--fg-muted); font-weight: 400;
  display: block; margin-bottom: 8px;
}
.p-hero .h-main {
  font-size: clamp(64px, 10vw, 168px);
  display: block; color: var(--fg);
}
.p-hero .h-loc {
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted);
  margin-top: 24px; letter-spacing: 0.04em;
}
.p-hero-tagline {
  margin-top: 56px;
  max-width: 28ch;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.15; letter-spacing: -0.02em;
  color: var(--fg); font-weight: 400;
  text-wrap: balance;
  position: relative; padding-left: 24px;
}
.p-hero-tagline::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 4px; height: calc(100% - 16px);
  background: var(--oe-orange);
}
.p-hero-kpis {
  margin-top: 80px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
}
.p-hero-kpi {
  background: rgba(0,0,0,0.55); padding: 32px 24px; backdrop-filter: blur(8px);
}
.p-hero-kpi .num {
  font-weight: 500; font-size: clamp(34px, 4.2vw, 64px);
  letter-spacing: -0.025em; color: var(--oe-orange); line-height: 1;
}
.p-hero-kpi .num .unit { font-size: 0.42em; color: var(--fg-muted); letter-spacing: 0; margin-left: 6px; font-weight: 400; }
.p-hero-kpi .lab {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted); margin-top: 16px;
}
.p-hero-kpi .sublab {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-dim); margin-top: 6px;
}
.p-hero-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.04em; color: var(--fg-muted);
  flex-wrap: wrap; gap: 12px;
}
.p-hero-foot::before { content: "▶ "; color: var(--oe-orange); }
@media (max-width: 880px) { .p-hero-kpis { grid-template-columns: 1fr; } }

/* ----- CONTEXT ----- */
.p-ctx { padding: 120px var(--container-px); border-bottom: 1px solid var(--border); }
.p-ctx-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; align-items: start; }
.p-ctx-text .lab { color: var(--oe-orange); margin-bottom: 16px; }
.p-ctx-text h2 {
  font-weight: 500; font-size: clamp(28px, 3.2vw, 52px);
  line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 32px;
  text-wrap: balance;
}
.p-ctx-text p { color: var(--fg-muted); font-size: 16px; line-height: 1.7; max-width: 60ch; }
.p-ctx-text p + p { margin-top: 1.2em; }
.p-ctx-side {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.p-ctx-side > div {
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.p-ctx-side .num {
  font-weight: 500; font-size: clamp(26px, 2.6vw, 38px);
  letter-spacing: -0.025em; color: var(--oe-orange); line-height: 1;
}
.p-ctx-side .lab {
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg-muted); margin-top: 10px; max-width: 26ch; line-height: 1.4;
}
@media (max-width: 1080px) { .p-ctx-grid { grid-template-columns: 1fr; gap: 48px; } }

/* ----- SOLUTION ----- */
.p-sol {
  padding: 120px var(--container-px);
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.p-sol-head { max-width: 800px; margin-bottom: 64px; }
.p-sol-head .lab { color: var(--oe-orange); margin-bottom: 16px; }
.p-sol-head h2 {
  font-weight: 500; font-size: clamp(28px, 3.2vw, 52px);
  line-height: 1.05; letter-spacing: -0.025em;
  text-wrap: balance;
}
.p-sol-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start;
}
.p-sol-grid p {
  color: var(--fg-muted); font-size: 16px; line-height: 1.7;
}
.p-sol-grid p + p { margin-top: 1.2em; }
.p-sol-spec {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  padding: 32px;
}
.p-sol-spec h3 {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg-muted); font-weight: 500; margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.p-sol-spec dl { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.p-sol-spec dt {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-dim); letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.p-sol-spec dd {
  font-size: 15px; color: var(--fg); font-weight: 500;
}
.p-sol-spec dd .small { color: var(--fg-muted); font-weight: 400; font-size: 12px; }
@media (max-width: 1080px) { .p-sol-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ----- BIG RESULTS BLOCK ----- */
.p-results { padding: 140px var(--container-px); border-bottom: 1px solid var(--border); }
.p-results-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 80px; }
.p-results-head .lab { color: var(--fg-muted); margin-bottom: 12px; }
.p-results-head h2 {
  font-weight: 500; font-size: clamp(32px, 3.8vw, 64px);
  line-height: 1.02; letter-spacing: -0.03em; max-width: 18ch;
  text-wrap: balance;
}
.p-results-head .helper { color: var(--fg-muted); max-width: 38ch; line-height: 1.6; }
.p-results-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.p-results-cell {
  background: var(--oe-black);
  padding: 48px 32px 40px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; min-height: 320px;
}
.p-results-cell .idx {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-dim); letter-spacing: 0.04em;
  margin-bottom: 32px;
}
.p-results-cell .big {
  font-weight: 500; font-size: clamp(56px, 7.2vw, 120px);
  letter-spacing: -0.04em; line-height: 0.94;
  color: var(--fg);
}
.p-results-cell .big .unit {
  display: block;
  font-size: 0.22em; letter-spacing: 0.05em;
  color: var(--oe-orange); margin-top: 8px;
  font-weight: 400; text-transform: uppercase;
}
.p-results-cell .label {
  margin-top: auto;
  font-size: 14px; color: var(--fg-muted); line-height: 1.5;
  max-width: 28ch;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.p-results-cell .pct {
  position: absolute; top: 32px; right: 32px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--oe-orange); letter-spacing: 0.04em;
}
@media (max-width: 880px) { .p-results-grid { grid-template-columns: 1fr; } }

/* ----- IMPACT ----- */
.p-imp {
  padding: 140px var(--container-px);
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.p-imp-inner { max-width: 900px; margin: 0 auto; }
.p-imp .lab { color: var(--oe-orange); margin-bottom: 24px; }
.p-imp blockquote {
  font-weight: 400; font-size: clamp(24px, 2.6vw, 40px);
  line-height: 1.25; letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
}
.p-imp blockquote em {
  color: var(--oe-orange); font-style: normal;
}
.p-imp-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 56px;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.p-imp-tag {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-muted);
  padding: 6px 12px; border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: color .2s, border-color .2s, background .2s;
  cursor: default;
}
.p-imp-tag:hover {
  color: var(--oe-orange);
  border-color: var(--oe-orange);
  background: rgba(255,106,0,0.08);
}

/* ----- PORTFOLIO BAND ----- */
.p-port {
  padding: 100px var(--container-px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(0,56,174,0.15), transparent 60%),
    var(--oe-black);
}
.p-port-head { max-width: 720px; margin-bottom: 56px; }
.p-port-head .lab { color: var(--fg-muted); margin-bottom: 12px; }
.p-port-head h2 {
  font-weight: 500; font-size: clamp(26px, 3vw, 44px);
  line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance;
}
.p-port-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
}
.p-port-cell { background: var(--oe-black); padding: 28px 24px; }
.p-port-cell .num {
  font-weight: 500; font-size: clamp(28px, 2.8vw, 40px);
  letter-spacing: -0.02em; color: var(--fg); line-height: 1;
}
.p-port-cell .lab {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-muted); margin-top: 14px; max-width: 22ch; line-height: 1.5;
}
@media (max-width: 1080px) { .p-port-grid { grid-template-columns: repeat(2, 1fr); } }

/* ----- OTHER PROJECTS ----- */
.p-others { padding: 100px var(--container-px); border-bottom: 1px solid var(--border); }
.p-others-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 24px; margin-bottom: 40px;
}
.p-others-head .lab { color: var(--fg-muted); margin-bottom: 8px; }
.p-others-head h2 {
  font-weight: 500; font-size: clamp(24px, 2.6vw, 36px);
  letter-spacing: -0.02em; line-height: 1.1;
}
.p-others-head a {
  font-size: 13px; color: var(--fg-muted); transition: color .2s;
}
.p-others-head a:hover { color: var(--oe-orange); }
.p-others-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.other-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 24px; transition: all .2s;
  display: flex; flex-direction: column; min-height: 180px;
}
.other-card:hover { background: var(--bg-elev-2); border-color: var(--border-strong); transform: translateY(-2px); }
.other-card .lab {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--oe-orange); margin-bottom: 12px;
}
.other-card h3 {
  font-size: 18px; font-weight: 500; letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.other-card .stat {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-muted); margin-top: auto;
}
.other-card .stat b { color: var(--oe-orange); font-weight: 500; }
@media (max-width: 1080px) { .p-others-grid { grid-template-columns: repeat(2, 1fr); } }

/* ----- CTA ----- */
.p-cta {
  padding: 140px var(--container-px); text-align: center;
  background: linear-gradient(180deg, var(--oe-black) 0%, #050a14 100%);
}
.p-cta h2 {
  font-weight: 500; font-size: clamp(36px, 4.5vw, 72px);
  line-height: 1.05; letter-spacing: -0.03em;
  margin-bottom: 24px; max-width: 22ch; margin-inline: auto;
  text-wrap: balance;
}
.p-cta p {
  color: var(--fg-muted); max-width: 50ch;
  margin: 0 auto 40px; line-height: 1.6;
}
.p-cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ----- FOOTER ----- */
.footer {
  background: var(--oe-black);
  padding: 80px var(--container-px) 32px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 80px;
  max-width: 1400px; margin-inline: auto;
}
.footer-brand img { height: 28px; margin-bottom: 24px; }
.footer-brand p {
  color: rgba(255,255,255,0.5); font-size: 14px;
  max-width: 32ch; line-height: 1.5;
}
.footer-col h4 {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 18px; font-weight: 500;
}
.footer-col a {
  display: block; font-size: 14px;
  color: rgba(255,255,255,0.85); padding: 6px 0; transition: color .2s;
}
.footer-col a:hover { color: var(--oe-orange); }
.footer-bottom {
  max-width: 1400px; margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 32px; display: flex; justify-content: space-between;
  font-size: 12px; color: rgba(255,255,255,0.45); flex-wrap: wrap; gap: 12px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  body { background: white; color: black; }
  .nav, .p-cta, .footer { display: none; }
  .p-hero, .p-results, .p-imp, .p-sol, .p-port { background: white; color: black; }
}
