/* ================================
   DESIGN TOKENS & SYSTEM LAYERS (no @layer)
   ================================ */

/* ---- Tokens ---- */
:root{
  /* Colors */
  --brand:#1e40af;         /* cobalt (unified) */
  --brand-600:#1b3a99;
  --accent:#f59e0b;        /* amber */
  --ink:#0b1220;           /* deep slate */
  --muted:#6b7280;
  --stone:#f6f7f9;

  /* Typographic scale */
  --h1: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  --h4: clamp(1.05rem, 0.95rem + 0.6vw, 1.35rem);
  --p: clamp(.95rem, .9rem + .3vw, 1.05rem);

  /* Motion */
  --motion-duration: 480ms;
  --motion-ease: cubic-bezier(.22,.61,.36,1);
  --hover-raise: translateY(-4px);

  /* Layout */
  --nav-h: 72px; /* updated via JS if needed */
}

/* ---- Resets ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

/* ---- Base ---- */
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--stone);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-top: var(--nav-h);
}
a{ color: var(--brand); text-decoration: none; }
a:hover{ text-decoration: underline; }
.navbar-brand strong{ color: var(--brand); }

/* Code & typography helpers */
pre{
  background:#0b1220; color:#e5e7eb; padding:1rem; border-radius:.5rem; overflow:auto;
}
blockquote{
  border-inline-start:4px solid var(--brand);
  padding-inline-start:1rem; color:#374151;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

/* ---- Components ---- */
/* Hero */
.hero{
  min-height:85vh; position:relative; display:flex; align-items:center; color:#fff;
  background: url('../img/hero.jpg') center/cover no-repeat;
}
.hero::after{
  content:''; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.55));
}
.hero .inner{ position:relative; z-index:1; }

/* Buttons */
.btn-brand{
  background:var(--brand); color:#fff; border:none;
  transition: transform 180ms var(--motion-ease), box-shadow 180ms var(--motion-ease);
}
.btn-brand:hover, .btn-brand:focus{
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(30,64,175,.35);
  color:#fff;
}
.btn-accent{
  background:var(--accent); color:#111 !important; border:none;
  transition: filter 160ms var(--motion-ease), transform 160ms var(--motion-ease);
}
.btn-accent:hover{ filter: brightness(.95); color:#111 !important; }

/* Pills / chips */
.badge-chip{ border-radius:999px; background:#e5e7eb; color:#111827; padding:.35rem .75rem; font-size:.85rem; }
.badge-soft{ background:#edf2ff; color:#1e40af; border-radius:999px; padding:.2rem .6rem; font-weight:600; }

/* Cards */
.card.service,
.blog-card{
  border:none; border-radius:1rem;
  box-shadow:0 12px 30px rgba(0,0,0,.08);
  transition: transform 240ms var(--motion-ease), box-shadow 240ms var(--motion-ease);
  will-change: transform, box-shadow;
  background:#fff;
}
.card.service:hover{ transform: var(--hover-raise); box-shadow:0 18px 40px rgba(0,0,0,.14); }
.blog-card:hover{ transform: var(--hover-raise); box-shadow:0 22px 48px rgba(0,0,0,.16); }

/* Tables */
.table-clean td, .table-clean th{ border:0 !important; }

/* Figures */
.figure-caption{ color: var(--muted); }

/* Footer (sticky) */
footer{
  margin-top:auto; background:#0e1726; color:#dbe5f3;
}
footer a{ color:#cfe1ff; }

/* Navbar stacking (modals are 1050) */
.navbar.fixed-top{ z-index:1045; }

/* WordPress admin bar offset */
@media (min-width:783px){
  .admin-bar .navbar.fixed-top{ top:32px; }
  .admin-bar body{ padding-top: calc(var(--nav-h) + 32px); }
}
@media (max-width:782px){
  .admin-bar .navbar.fixed-top{ top:46px; }
  .admin-bar body{ padding-top: calc(var(--nav-h) + 46px); }
}

/* Header dark (matches footer) */
.header-dark{
  background:#0e1726; color:#dbe5f3; text-align:center; padding:4rem 1rem;
}
.header-dark :is(h1,h2,h3,h4,h5){ color:#fff; font-weight:700; }
.header-dark a{ color:#cfe1ff; }

/* Gallery (filterable + improved interactions) */
.gallery img{ border-radius:.75rem; }
.gallery-item{
  transition: transform .45s var(--motion-ease), opacity .45s var(--motion-ease), box-shadow .45s var(--motion-ease);
  transform-origin: center;
  will-change: opacity, transform;
}
.gallery-item img{
  transition: transform .32s var(--motion-ease), box-shadow .32s var(--motion-ease);
}
.gallery-item:hover img{
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}
.gallery-item.is-hidden{
  opacity:0 !important; transform: scale(.85) translateY(10px);
  pointer-events:none; position:absolute;
}
#filterBar .btn{
  border-radius:999px;
  transition: background-color 160ms var(--motion-ease), color 160ms var(--motion-ease), transform 160ms var(--motion-ease);
}
#filterBar .btn:hover{ transform: translateY(-1px); }
#filterBar .btn.active{ background:var(--brand); color:#fff; border-color:var(--brand); }

/* Reveal-on-scroll */
.reveal{
  opacity:0; transform: translateY(16px);
  transition: opacity var(--motion-duration) var(--motion-ease), transform var(--motion-duration) var(--motion-ease);
  will-change: opacity, transform;
}
.reveal.is-visible{ opacity:1; transform:none; }
.reveal[data-stagger]{ transition-delay: calc(var(--stagger, 0) * 60ms); }

/* Sticky bottom CTA (mobile-first) */
.cta-sticky{
  position:fixed; inset-inline:0; bottom:0; z-index:1040;
  background:#ffffffd9; backdrop-filter:saturate(180%) blur(6px);
  border-top:1px solid rgba(0,0,0,.06);
  padding:.65rem .75rem; display:flex; gap:.5rem; align-items:center; justify-content:center;
}
.cta-sticky .btn{ border-radius:999px; padding:.65rem 1rem; font-weight:600; }
@media (min-width:992px){ .cta-sticky{ display:none; } }

/* Floating FABs */
.fab-floating{
  position:fixed; right:18px; bottom:88px; z-index:1040; display:flex; flex-direction:column; gap:.5rem;
}
.fab-floating a{
  display:inline-flex; align-items:center; justify-content:center; inline-size:48px; block-size:48px;
  border-radius:999px; color:#fff; text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  transition: transform .2s ease;
}
.fab-floating a:hover{ transform: translateY(-2px); }
.fab-whatsapp{ background:#25D366; }
.fab-facebook{ background:#1877F2; }

/* Inquiry / Multi-step form */
.form-steps{ max-width:720px; margin-inline:auto; padding:2rem 1rem; background:#fff; border-radius:1rem; box-shadow:0 10px 40px rgba(0,0,0,.06); }
.step{ display:none; padding:1rem 0; animation: fadeSlide .35s ease; }
.step.active{ display:block; }
@keyframes fadeSlide{ from{ opacity:0; transform:translateY(12px); } to{ opacity:1; transform:none; } }

.form-steps :is(h4){ font-weight:800; font-size:var(--h4); text-align:center; margin-bottom:1.5rem; color:var(--brand); }
.form-steps :is(.form-label, label){ font-weight:600; }
.form-steps :is(.form-control, .form-select){ border-radius:.65rem; font-size:1rem; padding:.65rem .85rem; }
.form-steps :is(.form-control:focus, .form-select:focus){
  border-color:var(--accent); box-shadow:0 0 0 .2rem rgba(245,158,11,.25);
}

.progress-small{ block-size:10px; background:#e5e7eb; border-radius:999px; overflow:hidden; max-width:500px; margin:1rem auto; }
.progress-small .bar{ block-size:100%; inline-size:0%; background:#fbbf24; transition: inline-size .35s ease; }

.option-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:1rem; margin-top:.5rem; }
.option-tile{
  position:relative; text-align:center; font-weight:600; padding:1.25rem 1rem; cursor:pointer; user-select:none;
  border:1px solid #e5e7eb; border-radius:.75rem; background:#fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.option-tile.active{
  border-color:var(--brand); box-shadow:0 10px 28px rgba(0,0,0,.08); transform: translateY(-2px);
}
.option-tile::after{
  content:'\2713'; position:absolute; inset-inline-end:10px; inset-block-start:10px;
  inline-size:24px; block-size:24px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center;
  font-size:14px; background:var(--brand); color:#fff; opacity:0; transform: scale(.8);
  transition: opacity .2s ease, transform .2s ease;
}
.option-tile.active::after{ opacity:1; transform: scale(1); }

.input-help{ font-size:.875rem; color:#6b7280; }
.field-error{ color:#b91c1c; font-size:.9rem; margin-top:.35rem; display:none; }
.field-error.show{ display:block; }
.is-invalid, .option-tile.error{
  border-color:#dc2626 !important; box-shadow:0 0 0 .15rem rgba(220,38,38,.15) !important;
}

.step .btn{ border-radius:.65rem; padding:.75rem 1.5rem; font-size:1.05rem; }
.step .actions{ display:flex; gap:.5rem; justify-content:flex-end; margin-top:1rem; }
@media (max-width:576px){
  .step .actions{ flex-direction:column; }
  .step .actions .btn{ inline-size:100%; }
  .form-steps .row > [class*="col-"]{ inline-size:100%; }
}

/* Centered Inquiry Shell/Card variants */
.inquiry-shell{
  min-height: min(100vh, calc(100vh - 160px));
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(180deg,#f8fafc 0%, #eef2ff 100%);
  padding:2rem 1rem;
}
.inquiry-card{
  inline-size:100%; max-inline-size:860px; background:#fff; border-radius:1rem;
  box-shadow:0 12px 40px rgba(2,6,23,.1); overflow:hidden; border:1px solid #e5e7eb; display:flex; flex-direction:column;
}
.inquiry-card header.card-head{ text-align:center; padding:2rem 1.5rem 1rem; }
.inquiry-card header.card-head h1{ font-weight:800; font-size:var(--h1); line-height:1.2; }
.inquiry-card header.card-head p{ font-size:var(--p); color:#475569; max-width:60ch; margin:.5rem auto 0; }
.inquiry-card .card-body{ padding:1.5rem; }
@media (min-width:992px){
  .inquiry-card header.card-head h1{ font-size: clamp(2rem, 1.4rem + 1.2vw, 2.4rem); }
  .inquiry-card .card-body{ padding:2rem 2.5rem; }
}

/* Light header (secondary) */
header.light{
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color:#fff; text-align:center;
}
header.light h1{ font-weight:800; }
header.light p{ max-width:640px; margin:.5rem auto 0; }

/* Step chips (shared) */
.step-chips{ display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; margin:.75rem 0 0; }
.step-chips .chip{ font-size:.8rem; padding:.25rem .6rem; border-radius:999px; background:#eef2ff; color:#1e40af; }
.step-chips .chip.active{ background:#1e40af; color:#fff; }

/* Summary card */
.summary-card{ border:none; border-radius:.75rem; box-shadow:0 10px 26px rgba(0,0,0,.08); background:#fff; }

/* Utility bits */
.section-title{ font-weight:800; }
.light{ background: var(--stone); }
.gallery .glightbox img, .gallery img{
  transition: transform 320ms var(--motion-ease), box-shadow 320ms var(--motion-ease);
}
.gallery a:hover img{
  transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
#errType{ text-align:center; } /* keep space for fixed navbar error message */