/* ============================================================
   PAM CIVIL × A.S. ENGINEERING LINES — site stylesheet
   Design language: civil-engineering "spec plate" / survey marker
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root{
  --ink: #14161B;
  --ink-soft: #2A2D34;
  --paper: #ECE8DE;
  --paper-dim: #DFDACC;
  --white: #FBFAF7;
  --blue: #1E32C9;
  --blue-deep: #121F8A;
  --teal: #2E6A64;
  --sand: #B5842E;
  --line: rgba(20,22,27,0.14);
  --line-on-dark: rgba(251,250,247,0.16);
  --shadow: 0 18px 40px -20px rgba(20,22,27,0.35);
  --maxw: 1240px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
.wrap{ max-width: var(--maxw); margin:0 auto; padding: 0 28px; }

h1,h2,h3{
  font-family:'Big Shoulders Display', sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0;
}
.mono{
  font-family:'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
}
.eyebrow{
  font-family:'IBM Plex Mono', monospace;
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--blue);
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width:22px; height:1px;
  background: var(--blue);
  display:inline-block;
}
.eyebrow.on-dark{ color:#8EA0FF; }
.eyebrow.on-dark::before{ background:#8EA0FF; }

/* ---------- crosshair signature mark ---------- */
.tick{
  width:18px; height:18px;
  position:relative;
  flex-shrink:0;
}
.tick::before,.tick::after{
  content:"";
  position:absolute;
  background: currentColor;
}
.tick::before{ left:50%; top:0; width:1.5px; height:100%; transform:translateX(-50%); }
.tick::after{ top:50%; left:0; height:1.5px; width:100%; transform:translateY(-50%); }
.tick-dot{
  position:absolute; left:50%; top:50%;
  width:5px; height:5px; border-radius:50%;
  background: currentColor;
  transform:translate(-50%,-50%);
}

/* ============ NAV ============ */
.nav{
  position: sticky; top:0; z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
/* NOTE: intentionally no backdrop-filter here — it would make .nav a
   containing block for the fixed-position mobile menu panel inside it,
   trapping the panel to header-height instead of the full viewport. */
.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 28px;
  max-width: var(--maxw); margin:0 auto;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ height:30px; width:auto; }
.brand-text{ font-family:'IBM Plex Mono',monospace; font-size:12px; line-height:1.25; }
.brand-text b{ display:block; font-size:13px; letter-spacing:0.03em; }
.nav-links{ display:flex; align-items:center; gap:28px; font-size:14px; font-weight:600; }
.nav-links a:not(.btn){ opacity:0.75; transition: opacity .15s; }
.nav-links a:not(.btn):hover{ opacity:1; }
.nav-toggle{ display:none; }

/* ============ BUTTONS ============ */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  font-family:'IBM Plex Mono', monospace;
  font-weight:600; font-size:13.5px;
  letter-spacing:0.03em;
  padding: 13px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor:pointer;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--blue); color:var(--white); }
.btn-primary:hover{ background: var(--blue-deep); }
.btn-ghost{ background:transparent; color:var(--ink); border-color: var(--ink); }
.btn-ghost:hover{ background: var(--ink); color: var(--paper); }
.btn-on-dark{ border-color: var(--line-on-dark); color: var(--white); }
.btn-on-dark:hover{ background: rgba(251,250,247,0.1); }
.btn-whatsapp{ background:#25D366; color:#0B2B17; }
.btn-whatsapp:hover{ background:#1DB955; }
.btn-line{ background:#06C755; color:#04351C; }
.btn-line:hover{ background:#04b34a; }
.btn-sm{ padding: 9px 16px; font-size:12px; }
.btn svg{ width:16px; height:16px; }

/* ============ HERO ============ */
.hero{
  position: relative;
  min-height: 92vh;
  display:flex; align-items:flex-end;
  color: var(--white);
  overflow:hidden;
}
.hero-bg{
  position:absolute; inset:0;
  background-image: url('images/hero-jackie.jpg');
  background-size: cover;
  background-position: center 65%;
  transform: scale(1.03);
}
.hero-scrim{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(18,20,25,0.55) 0%, rgba(18,20,25,0.15) 32%, rgba(14,15,19,0.35) 62%, rgba(10,11,14,0.92) 100%);
}
.hero-content{
  position:relative; z-index:2;
  width:100%;
  padding: 160px 28px 0;
  max-width: var(--maxw); margin:0 auto;
}
.hero h1{
  font-size: clamp(44px, 7.4vw, 104px);
  margin: 18px 0 20px;
  max-width: 15ch;
}
.hero h1 em{
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
}
.hero-sub{
  font-size: clamp(15px, 1.6vw, 18px);
  max-width: 46ch;
  color: rgba(251,250,247,0.82);
  margin-bottom: 34px;
}
.hero-ctas{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 54px; }

.hero-ledger{
  position:relative; z-index:2;
  border-top: 1px solid var(--line-on-dark);
  display:grid;
  grid-template-columns: repeat(4,1fr);
}
.ledger-item{
  padding: 18px 28px;
  border-right: 1px solid var(--line-on-dark);
}
.ledger-item:last-child{ border-right:none; }
.ledger-num{
  font-family:'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 32px);
  color: var(--white);
}
.ledger-label{
  font-family:'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(251,250,247,0.6);
  margin-top: 4px;
}

/* ============ SECTION HEADERS ============ */
.section{ padding: 100px 0; }
.section-tight{ padding: 64px 0; }
.section-head{
  display:flex; justify-content:space-between; align-items:flex-end;
  gap: 24px; margin-bottom: 46px; flex-wrap: wrap;
}
.section-head h2{ font-size: clamp(34px, 4.6vw, 56px); margin-top:10px; }
.section-head p{ max-width: 40ch; color: var(--ink-soft); font-size:15px; }

/* ============ PORTFOLIO GRID ============ */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card{
  background: var(--white);
  border: 1px solid var(--line);
  overflow:hidden;
  display:flex; flex-direction:column;
}
.card.pre{ opacity:0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.card.pre.in{ opacity:1; transform:none; }
.card-photo{
  position:relative;
  aspect-ratio: 4/3;
  overflow:hidden;
  background: var(--ink);
}
.card-photo img{
  width:100%; height:100%; object-fit:cover;
  transition: transform .5s ease;
}
.card:hover .card-photo img{ transform: scale(1.05); }
.card-badge{
  position:absolute; top:12px; left:12px;
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px; letter-spacing:0.08em; text-transform:uppercase;
  padding: 5px 9px;
  background: rgba(20,22,27,0.78);
  color: var(--white);
  display:flex; align-items:center; gap:6px;
}
.card-badge.underway{ background: var(--sand); color:#241800; }
.card-badge .dot{ width:6px; height:6px; border-radius:50%; background:#43D67A; }
.card-badge.underway .dot{ background:#241800; }
.card-plate{
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  flex:1;
  display:flex; flex-direction:column; gap:10px;
  position:relative;
}
.card-plate .tick{ position:absolute; top:16px; right:18px; color: var(--blue); }
.card-name{
  font-family:'Big Shoulders Display', sans-serif;
  font-weight:800; text-transform:uppercase;
  font-size: 22px; line-height:1.02;
  padding-right: 26px;
}
.card-meta{
  font-family:'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  display:grid;
  grid-template-columns: 62px 1fr;
  row-gap:4px;
}
.card-meta span.k{ opacity:0.55; }
.card-meta .v-cost{ color: var(--blue); font-weight:600; }

/* ============ PROCESS BAND ============ */
.process{ background: var(--ink); color: var(--white); }
.process .section-head p{ color: rgba(251,250,247,0.62); }
.process-grid{
  display:grid; grid-template-columns: repeat(3,1fr); gap:2px;
  background: var(--line-on-dark);
  border: 1px solid var(--line-on-dark);
}
.process-item{ background: var(--ink); }
.process-photo{ aspect-ratio: 5/4; overflow:hidden; }
.process-photo img{ width:100%; height:100%; object-fit:cover; filter: grayscale(15%) contrast(1.05); }
.process-body{ padding: 22px 22px 28px; }
.process-num{
  font-family:'Big Shoulders Display', sans-serif;
  font-size: 15px; font-weight:800; color:#8EA0FF; letter-spacing:0.05em;
}
.process-title{ font-size:20px; margin-top:8px; }
.process-body p{ margin: 10px 0 0; font-size:14px; color: rgba(251,250,247,0.65); max-width:34ch; }

/* ============ CTA BAND ============ */
.cta-band{
  background: var(--blue);
  color: var(--white);
  position:relative;
  overflow:hidden;
}
.cta-band::before{
  content:"";
  position:absolute; inset:0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity:.5;
}
.cta-inner{
  position:relative; z-index:1;
  display:flex; align-items:center; justify-content:space-between;
  gap: 30px; flex-wrap:wrap;
  padding: 70px 0;
}
.cta-inner h2{ font-size: clamp(32px,4.4vw,54px); max-width: 12ch; }
.cta-phone{
  font-family:'IBM Plex Mono', monospace;
  font-size: clamp(28px,4vw,44px);
  font-weight:600;
  letter-spacing: 0.02em;
}
.cta-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.cta-band .btn-primary{ background: var(--white); color: var(--blue-deep); }
.cta-band .btn-primary:hover{ background: #E7E9FF; }
.cta-band .btn-on-dark{ border-color: rgba(255,255,255,0.5); }

/* ============ CONTACT / FOOTER ============ */
.contact{ padding: 90px 0 0; }
.contact-grid{
  display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px;
  padding-bottom: 60px;
}
.info-row{
  display:flex; gap:16px; padding: 18px 0; border-top:1px solid var(--line);
}
.info-row:last-child{ border-bottom:1px solid var(--line); }
.info-row .tick{ color: var(--blue); margin-top:3px; }
.info-k{ font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:0.09em; text-transform:uppercase; opacity:0.55; margin-bottom:4px; }
.info-v{ font-size:16px; font-weight:600; }
.info-v a:hover{ color:var(--blue); }
.map-frame{ border:1px solid var(--line); filter: grayscale(45%) contrast(1.05); width:100%; height:100%; min-height:340px; }

footer{
  background: var(--ink); color: rgba(251,250,247,0.6);
  padding: 34px 0; margin-top: 60px;
  font-family:'IBM Plex Mono', monospace; font-size: 12px;
}
.footer-inner{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:center; }
.footer-inner b{ color: var(--white); }

/* ============ CARD GALLERY TRIGGER ============ */
button.tick{
  border:none; background:none; padding:0; margin:0;
  cursor:pointer;
  color: var(--blue);
  transition: transform .15s ease, color .15s ease;
}
button.tick:hover{ color: var(--blue-deep); transform: scale(1.15); }
button.tick:focus-visible{ outline: 2px solid var(--blue); outline-offset: 4px; }

/* ============ LIGHTBOX ============ */
.lightbox{
  position: fixed; inset:0; z-index: 100;
  background: rgba(10,11,14,0.94);
  display:none; align-items:center; justify-content:center;
  padding: 24px;
}
.lightbox.open{ display:flex; }
.lightbox-inner{ width:100%; max-width: 1080px; }
.lightbox-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  color: var(--white); margin-bottom: 14px; gap:20px;
}
.lightbox-title{ font-size: 20px; text-transform:none; font-weight:600; letter-spacing:0; }
.lightbox-close{
  background:none; border:1px solid var(--line-on-dark); color:var(--white);
  width:38px; height:38px; font-size:22px; line-height:1; cursor:pointer;
  flex-shrink:0; transition: background .15s ease;
}
.lightbox-close:hover{ background: rgba(255,255,255,0.1); }
.lightbox-stage{
  position:relative;
  background:#000;
  border: 1px solid var(--line-on-dark);
  min-height: 200px;
  display:flex; align-items:center; justify-content:center;
}
.lightbox-stage img{
  width:100%; max-height: 62vh; object-fit:contain; display:block;
}
.lightbox-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%;
  border:1px solid var(--line-on-dark);
  background: rgba(10,11,14,0.55);
  color: var(--white);
  font-size:24px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background .15s ease;
}
.lightbox-arrow:hover{ background: rgba(30,50,201,0.7); }
.lightbox-arrow.left{ left:14px; }
.lightbox-arrow.right{ right:14px; }
.lightbox-count{
  position:absolute; bottom:12px; right:14px;
  color: rgba(251,250,247,0.75);
  font-size: 12px; background: rgba(10,11,14,0.55);
  padding: 4px 9px;
}
.lightbox-thumbs{
  display:flex; gap:8px; margin-top:12px;
  overflow-x:auto; padding-bottom:6px;
}
.lightbox-thumbs img{
  width:78px; height:58px; object-fit:cover; flex-shrink:0;
  cursor:pointer; opacity:0.5; border:2px solid transparent;
  transition: opacity .15s ease, border-color .15s ease;
}
.lightbox-thumbs img:hover{ opacity:0.8; }
.lightbox-thumbs img.active{ opacity:1; border-color: var(--blue); }

/* ============ STICKY MOBILE CALL BAR ============ */
.call-bar{
  position: fixed; left:0; right:0; bottom:0; z-index:70;
  display:none;
  background: var(--ink);
  border-top: 1px solid var(--line-on-dark);
  padding: 10px 14px;
  gap: 10px;
}
.call-bar .btn{ flex:1; justify-content:center; }

/* ============ REVEAL ============ */
/* Visible by default (no-JS / slow-JS safe). JS adds .pre before observing,
   so the fade only ever applies once it can also guarantee the reveal. */
.reveal.pre{ opacity:0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.pre.in{ opacity:1; transform:none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2,1fr); }
  .contact-grid{ grid-template-columns: 1fr; }
  .process-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .nav-links{
    position:fixed; inset: 60px 0 0 0; z-index:55;
    background: var(--paper);
    flex-direction:column; align-items:flex-start;
    padding: 28px; gap:22px;
    font-size: 20px;
    transform: translateX(100%);
    transition: transform .25s ease;
  }
  .nav-links.open{ transform: translateX(0); }
  .nav-toggle{
    display:flex; align-items:center; justify-content:center;
    width:38px; height:38px; border:1px solid var(--ink); background:none;
    font-family:'IBM Plex Mono',monospace; font-size:11px; cursor:pointer;
  }
  .hero-content{ padding-top: 120px; }
  .hero-ledger{ grid-template-columns: repeat(2,1fr); }
  .ledger-item:nth-child(2){ border-right:none; }
  .grid{ grid-template-columns: 1fr; }
  .cta-inner{ padding: 50px 0; }
  .call-bar{ display:flex; }
  .section{ padding: 64px 0; }
  body{ padding-bottom: 68px; }
}

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