/* ==========================================================================
   PVS Construction — Design tokens
   ========================================================================== */
:root{
  --bg:            #EFEBE2;   /* concrete paper */
  --bg-raised:     #E6E0D2;   /* deeper paper panel */
  --ink:           #1C1F1D;   /* near-black charcoal */
  --ink-soft:      #52564F;   /* secondary text */
  --line:          #C9C0A9;   /* hairline / drawing stroke */
  --line-strong:   #9C9280;
  --blue:          #1F4E5F;   /* blueprint teal-navy — primary brand */
  --blue-deep:     #123542;
  --blue-tint:     #E5EEEF;
  --brick:         #A8471F;   /* rust/brick — CTA + highlight accent */
  --brick-deep:    #7E3216;
  --ochre:         #B08A3E;   /* sand — tertiary, used sparingly */
  --white:         #FBFAF6;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body:    "Karla", "Segoe UI", sans-serif;

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --radius: 2px; /* sharp, drawing-plate edges — not the rounded SaaS default */
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

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

img{ max-width: 100%; display: block; }
a{ color: inherit; }

h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.4em;
  letter-spacing: 0.2px;
  color: var(--blue-deep);
}
h1{ font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 500; }
h2{ font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3{ font-size: 1.2rem; }

p{ margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }
.lede{ font-size: 1.15rem; max-width: 52ch; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden{
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

:focus-visible{
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  padding: 0.85em 1.6em;
  border: 1.5px solid var(--blue-deep);
  border-radius: var(--radius);
  background: transparent;
  color: var(--blue-deep);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover{ background: var(--blue-deep); color: var(--white); }
.btn-primary{ background: var(--brick); border-color: var(--brick); color: var(--white); }
.btn-primary:hover{ background: var(--brick-deep); border-color: var(--brick-deep); }
.btn-ghost{ border-color: var(--white); color: var(--white); }
.btn-ghost:hover{ background: var(--white); color: var(--blue-deep); }
.btn-small{ padding: 0.5em 1em; font-size: 0.82rem; }
.btn-danger{ border-color: var(--brick-deep); color: var(--brick-deep); }
.btn-danger:hover{ background: var(--brick-deep); color: var(--white); }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .container{
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px;
}
.brand{
  display: flex; align-items: baseline; gap: 0.5em;
  text-decoration: none; color: var(--blue-deep);
}
.brand-mark{
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: 0.3px;
}
.brand-sub{
  font-size: 0.7rem; color: var(--ink-soft); letter-spacing: 0.5px;
}
.nav-toggle{
  display: none;
  background: none; border: 1.5px solid var(--blue-deep); border-radius: var(--radius);
  width: 42px; height: 42px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content: ""; display: block; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--blue-deep);
}
.nav-toggle span{ top: 20px; }
.nav-toggle span::before{ top: -7px; }
.nav-toggle span::after{ top: 7px; }

.main-nav ul{
  display: flex; gap: clamp(14px, 2vw, 30px);
  list-style: none; margin: 0; padding: 0;
}
.main-nav a{
  text-decoration: none; font-family: var(--font-display);
  font-size: 0.95rem; letter-spacing: 0.3px; color: var(--ink);
  padding: 0.3em 0.1em; border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"]{
  border-bottom-color: var(--brick); color: var(--blue-deep);
}

@media (max-width: 760px){
  .nav-toggle{ display: block; }
  .main-nav{
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .main-nav.open{ max-height: 400px; }
  .main-nav ul{ flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .main-nav a{ display: block; padding: 0.8em 0; border-bottom: 1px solid var(--line); }
}

/* ==========================================================================
   Dimension divider — a structural device standing in for a hairline rule,
   used only where a section marks a measured quantity (a stat, a count,
   a span of years) — echoes an architectural dimension line.
   ========================================================================== */
.dim-divider{
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 2.2em; color: var(--ink-soft);
  font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.4px;
}
.dim-divider::before, .dim-divider::after{
  content: ""; flex: 1; height: 1px; background: var(--line-strong);
  position: relative;
}
.dim-divider::before{ margin-left: 0; }
.dim-divider::after{ margin-right: 0; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position: relative;
  background: var(--blue-deep);
  color: var(--white);
  overflow: hidden;
}
.hero-grid{
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(251,250,246,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,250,246,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.15));
}
.hero .container{
  position: relative;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--gutter);
  align-items: center;
  padding-top: clamp(56px, 8vw, 100px); padding-bottom: clamp(56px, 8vw, 100px);
}
.hero h1{ color: var(--white); }
.hero .lede{ color: rgba(251,250,246,0.82); }
.hero-actions{ display: flex; gap: 14px; margin-top: 1.8em; flex-wrap: wrap; }

.hero-callouts{
  display: grid; gap: 18px;
}
.callout{
  border: 1px solid rgba(251,250,246,0.28);
  border-left: 3px solid var(--brick);
  padding: 16px 18px;
  background: rgba(251,250,246,0.04);
}
.callout .num{
  font-family: var(--font-display); font-size: 1.9rem; color: var(--white); display: block;
}
.callout .lbl{ font-size: 0.82rem; color: rgba(251,250,246,0.72); }

@media (max-width: 860px){
  .hero .container{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
section{ padding: clamp(48px, 7vw, 88px) 0; }
.section-head{ max-width: 62ch; margin-bottom: 2em; }
.section-alt{ background: var(--bg-raised); }

.eyebrow{
  font-family: var(--font-display); font-size: 0.78rem;
  color: var(--brick); margin-bottom: 0.6em; letter-spacing: 0.3px;
}

/* ==========================================================================
   Cards — flat, sharp-cornered, drawing-plate style with corner crop marks
   ========================================================================== */
.grid{ display: grid; gap: 26px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .grid-3{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px){ .grid-3, .grid-2{ grid-template-columns: 1fr; } }

.plate{
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--white);
  padding: 26px 24px;
}
.plate::before, .plate::after{
  content: ""; position: absolute; width: 10px; height: 10px;
  border-top: 2px solid var(--brick); border-left: 2px solid var(--brick);
  top: -1px; left: -1px;
}
.plate::after{
  top: auto; left: auto; bottom: -1px; right: -1px;
  border-top: none; border-left: none;
  border-bottom: 2px solid var(--brick); border-right: 2px solid var(--brick);
}
.plate h3{ margin-bottom: 0.35em; }
.plate .plate-icon{
  width: 42px; height: 42px; margin-bottom: 14px;
  color: var(--blue);
}

/* Project card */
.project-card{
  border: 1px solid var(--line-strong);
  background: var(--white);
  display: flex; flex-direction: column;
}
.project-media{
  aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-raised);
  border-bottom: 1px solid var(--line-strong);
}
.project-media img{ width: 100%; height: 100%; object-fit: cover; }
.project-body{ padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 0.5em; flex: 1; }
.tag{
  display: inline-block; align-self: flex-start;
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.3px;
  padding: 0.3em 0.7em; border: 1px solid currentColor; color: var(--blue);
}
.tag-completed{ color: #2E6B3E; }
.tag-ongoing{ color: var(--brick); }
.tag-future{ color: var(--ochre); }
.project-meta{ font-size: 0.85rem; color: var(--ink-soft); }

/* Long project descriptions */
.project-description-wrap{ position: relative; }
.project-description{
  margin: 0;
  line-height: 1.6;
}
.project-description.is-collapsed{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}
.read-more-btn{
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.read-more-btn:hover,
.read-more-btn:focus-visible{
  text-decoration: underline;
}

body.modal-open{ overflow: hidden; }
.project-modal{
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(18,53,66,0.82);
}
.project-modal.open{ display: flex; }
.project-modal-panel{
  position: relative; width: min(1100px, 100%); max-height: min(820px, 92vh); overflow: hidden;
  background: var(--white); border: 1px solid var(--line-strong); box-shadow: 0 20px 60px rgba(18,53,66,0.35);
}
.project-modal-grid{ display: grid; gap: 0; max-height: min(820px, 92vh); grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr); align-items: stretch; }
.project-modal-media{ min-height: 500px; height: auto; background: var(--bg-raised); border: 1px solid var(--line-strong); overflow: hidden; }
.project-modal-media img{ width: 100%; height: 100%; object-fit: cover; }
.project-modal-nav{
  position: absolute; top: 50%; z-index: 1; transform: translateY(-50%);
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(19,43,69,0.82); color: var(--white); cursor: pointer; font-size: 1.8rem; line-height: 1;
}
.project-modal-nav:hover{ background: var(--blue); }
.project-modal-prev{ left: 16px; }
.project-modal-next{ right: 16px; }
.project-modal-counter{
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 4px 10px; border-radius: 999px; background: rgba(19,43,69,0.78);
  color: var(--white); font-size: 0.75rem; font-weight: 700;
}
.field-help{ margin: 6px 0 0; font-size: 0.78rem; color: var(--ink-soft); }
.project-modal-content{ max-height: min(820px, 92vh); overflow-y: auto; padding: 42px 36px 36px; background: var(--white); border: 1px solid var(--line-strong); border-left: 0; }
.project-modal-content h2{ margin-top: 14px; }
.project-modal-content > p:last-child{ line-height: 1.7; white-space: pre-line; }
.project-modal-close{
  position: absolute; top: 12px; right: 12px; z-index: 1; width: 38px; height: 38px;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--blue-deep);
  cursor: pointer; font-size: 1.4rem; line-height: 1;
}
.project-modal-close:hover{ background: var(--blue-tint); }
@media (max-width: 700px){
  .project-modal{ padding: 14px; }
  .project-modal-grid{ max-height: min(720px, 90vh); grid-template-columns: 1fr; overflow-y: auto; }
  .project-modal-media{ width: 100%; min-height: 0; height: 220px; aspect-ratio: auto; }
  .project-modal-content{ max-height: none; overflow: visible; padding: 28px 24px 24px; border-left: 1px solid var(--line-strong); border-top: 0; }
}

.project-actions{ margin-top: auto; display: flex; gap: 10px; padding-top: 10px; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid{
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px){ .gallery-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px){ .gallery-grid{ grid-template-columns: repeat(2, 1fr); } }
.gallery-item{
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--bg-raised);
  cursor: pointer;
}
.gallery-item img{ width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img{ transform: scale(1.04); }
.gallery-item .cap{
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(18,53,66,0.85), transparent);
  color: var(--white); font-size: 0.78rem; padding: 20px 10px 8px;
  opacity: 0; transition: opacity 0.2s ease;
}
.gallery-item:hover .cap, .gallery-item:focus-within .cap{ opacity: 1; }
.gallery-item button.remove{
  position: absolute; top: 6px; right: 6px; z-index: 2;
}

/* Lightbox */
.lightbox{
  position: fixed; inset: 0; background: rgba(18,53,66,0.92);
  display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 200;
  padding: 40px;
}
.lightbox.open{ display: flex; }
.lightbox img{ max-height: 78vh; max-width: 86vw; border-radius: 10px 10px 0 0; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox .lb-cap{ position: static; width: min(86vw, 900px); margin: 0; padding: 13px 18px; border: 0; background: rgba(19,43,69,0.96); border-radius: 0 0 10px 10px; text-align: center; color: var(--white); font-size: 0.9rem; font-weight: 600; }
.lightbox .lb-close{
  position: absolute; top: 20px; right: 26px; background: none; border: 1px solid var(--white);
  color: var(--white); width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem;
}
.lightbox .lb-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid var(--white); color: var(--white);
  width: 46px; height: 46px; cursor: pointer; font-size: 1.2rem;
}
.lb-prev{ left: 20px; } .lb-next{ right: 20px; }

/* ==========================================================================
   Admin / manage mode
   ========================================================================== */
.manage-bar{
  background: var(--blue-tint); border: 1px dashed var(--blue);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 2.2em;
}
.manage-bar p{ margin: 0; font-size: 0.9rem; color: var(--blue-deep); max-width: 50ch; }
.manage-bar .actions{ display: flex; gap: 10px; flex-wrap: wrap; }

.admin-panel{
  display: none;
  border: 1px solid var(--line-strong); background: var(--white);
  padding: 24px; margin-bottom: 2.4em;
}
.admin-panel.open{ display: block; }
.auth-only[hidden], [hidden]{ display: none !important; }
.admin-panel h3{ margin-bottom: 1em; }
.auth-note{ margin-bottom: 1.2em; }
.auth-tabs{ display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab.active{ background: var(--blue); border-color: var(--blue); color: var(--white); }
.auth-form{ max-width: 460px; }
.admin-heading-row{ display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-heading-row h3{ margin-bottom: 0; }

.field{ margin-bottom: 16px; }
.field label{ display: block; font-size: 0.85rem; font-family: var(--font-display); margin-bottom: 6px; color: var(--blue-deep); }
.field input[type="text"], .field input[type="number"], .field textarea, .field select{
  width: 100%; border: 1px solid var(--line-strong); background: var(--bg);
  padding: 0.7em 0.8em; font-family: var(--font-body); font-size: 0.95rem; border-radius: var(--radius);
}
.field textarea{ min-height: 100px; resize: vertical; }
.field input[type="file"]{ font-size: 0.88rem; }
.field-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px){ .field-row{ grid-template-columns: 1fr; } }

.img-preview{
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px;
}
.img-preview img{
  width: 76px; height: 76px; object-fit: cover; border: 1px solid var(--line-strong);
}

.admin-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.admin-list li{
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); padding: 10px 14px; font-size: 0.9rem;
}
.admin-list .item-info{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-list img{ width: 46px; height: 46px; object-fit: cover; flex-shrink: 0; }
.admin-list .item-title{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge-note{
  font-size: 0.78rem; color: var(--ink-soft); border-left: 3px solid var(--ochre);
  padding: 8px 12px; background: var(--bg-raised); margin-top: 14px;
}

.empty-state{
  border: 1px dashed var(--line-strong); padding: 40px 24px; text-align: center; color: var(--ink-soft);
}

/* ==========================================================================
   Contact / Enquiry forms
   ========================================================================== */
.form-card{
  border: 1px solid var(--line-strong); background: var(--white); padding: 30px;
  max-width: 620px;
}
.form-status{
  margin-top: 14px; font-size: 0.9rem; padding: 10px 14px; border-left: 3px solid var(--blue);
  background: var(--blue-tint); color: var(--blue-deep); display: none;
}
.form-status.show{ display: block; }

.info-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.info-list li{ display: flex; gap: 14px; }
.info-list .ico{ width: 24px; flex-shrink: 0; color: var(--brick); }
.info-list strong{ display: block; font-family: var(--font-display); font-weight: 500; color: var(--blue-deep); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--blue-deep); color: rgba(251,250,246,0.8);
  padding: 50px 0 26px;
}
.site-footer h4{ color: var(--white); font-size: 1rem; }
.footer-grid{
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 30px;
}
@media (max-width: 700px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-grid a{ text-decoration: none; color: rgba(251,250,246,0.78); }
.footer-grid a:hover{ color: var(--white); }
.footer-grid ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom{
  border-top: 1px solid rgba(251,250,246,0.15); padding-top: 18px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 0.82rem; color: rgba(251,250,246,0.55);
}

/* Page intro banner (non-home pages) */
.page-intro{
  background: var(--blue-deep); color: var(--white); padding: 54px 0;
}
.page-intro h1{ color: var(--white); margin-bottom: 0.3em; }
.page-intro p{ color: rgba(251,250,246,0.78); }

/* ========================================================================== 
   Modern site refresh
   ========================================================================== */
:root{
  --bg: #f4f1eb;
  --bg-raised: #e8e5dd;
  --ink: #172129;
  --ink-soft: #5e686b;
  --line: #d8d5cd;
  --line-strong: #b8b9b2;
  --blue: #1d5360;
  --blue-deep: #102f3b;
  --blue-tint: #e1eceb;
  --brick: #d0643b;
  --brick-deep: #a9472a;
  --ochre: #b58a45;
  --white: #fffdf9;
  --radius: 8px;
  --shadow-soft: 0 18px 50px rgba(16,47,59,0.08);
  --shadow-lift: 0 14px 34px rgba(16,47,59,0.14);
}

body{
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}
h1, h2, h3, h4{ color: var(--blue-deep); letter-spacing: -0.3px; }
h1{ font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.98; }
h2{ font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.04; }
h3{ font-size: 1.3rem; }
p{ color: var(--ink-soft); }

.container{ max-width: 1240px; }
section{ padding: clamp(64px, 9vw, 120px) 0; }
.section-alt{ background: #e9e8e2; }
.section-head{ margin-bottom: 2.5em; }
.eyebrow{ color: var(--brick); font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }

.site-header{
  background: rgba(244,241,235,0.92);
  border-bottom: 1px solid rgba(184,185,178,0.65);
  backdrop-filter: blur(14px);
}
.site-header .container{ min-height: 84px; }
.brand-mark{ font-size: 1.65rem; letter-spacing: -0.5px; }
.main-nav ul{ gap: clamp(16px, 2.5vw, 34px); }
.main-nav a{ font-family: var(--font-body); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.main-nav a:hover, .main-nav a[aria-current="page"]{ border-bottom-color: var(--brick); color: var(--brick-deep); }

.btn{
  border: 1px solid var(--blue-deep);
  border-radius: 999px;
  padding: 0.82em 1.45em;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,47,59,0.16); }
.btn-primary{ background: var(--brick); border-color: var(--brick); }
.btn-primary:hover{ background: var(--brick-deep); border-color: var(--brick-deep); }
.btn-small{ padding: 0.6em 1em; font-size: 0.78rem; }
.btn-ghost{ border-color: rgba(255,253,249,0.7); }

.hero{
  background:
    linear-gradient(90deg, rgba(16,47,59,0.97) 0%, rgba(16,47,59,0.88) 48%, rgba(16,47,59,0.62) 100%),
    url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1800&q=80") center / cover;
}
.hero-grid{ opacity: 0.42; }
.hero .container{ min-height: 660px; padding-top: 100px; padding-bottom: 100px; }
.hero h1{ max-width: 10ch; }
.hero .lede{ max-width: 56ch; font-size: 1.1rem; }
.hero-actions{ margin-top: 2.2em; }
.callout{ border: 1px solid rgba(255,253,249,0.2); border-left: 3px solid var(--brick); border-radius: 6px; padding: 20px 22px; background: rgba(255,253,249,0.08); backdrop-filter: blur(8px); }
.callout .num{ font-size: 2.2rem; }

.page-intro{ padding: 84px 0 76px; background: var(--blue-deep); }
.page-intro h1{ max-width: 12ch; }
.page-intro .lede{ max-width: 56ch; font-size: 1.1rem; }
.dim-divider{ margin-bottom: 2.8em; color: var(--brick-deep); font-weight: 700; letter-spacing: 1.2px; }
.dim-divider::before, .dim-divider::after{ background: var(--line-strong); }

.grid{ gap: 22px; }
.plate, .project-card, .form-card, .admin-panel, .manage-bar{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.plate{ background: rgba(255,253,249,0.76); padding: 30px 28px; }
.plate::before, .plate::after{ display: none; }
.plate-icon{ color: var(--brick) !important; }
.plate:hover, .project-card:hover{ box-shadow: var(--shadow-lift); transform: translateY(-4px); }
.plate, .project-card{ transition: transform 0.25s ease, box-shadow 0.25s ease; }

.project-card{ overflow: hidden; border-color: var(--line); }
.project-media{ border-bottom: 0; cursor: pointer; }
.project-media:focus-visible{ outline: 3px solid var(--brick); outline-offset: -3px; }
.project-media img, .gallery-item img{ transition: transform 0.45s ease; }
.project-card:hover .project-media img, .gallery-item:hover img{ transform: scale(1.05); }
.project-body{ padding: 24px; }
.tag{ border-radius: 999px; padding: 0.32em 0.8em; font-family: var(--font-body); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.project-meta{ color: var(--ink-soft); }
.read-more-btn{ color: var(--brick-deep); font-weight: 700; }

.gallery-grid{ gap: 18px; }
.gallery-item{ border: 0; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.gallery-item .cap{ padding: 32px 14px 12px; opacity: 1; }
.lightbox{ background: rgba(16,47,59,0.95); }

.manage-bar{ background: var(--blue-tint); border-style: solid; padding: 20px 22px; }
.admin-panel{ background: var(--white); padding: 30px; }
.field input[type="text"], .field input[type="number"], .field textarea, .field select{
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); padding: 0.85em 0.95em;
}
.field input:focus, .field textarea:focus, .field select:focus{ outline: 2px solid var(--brick); outline-offset: 1px; border-color: var(--brick); }
.empty-state{ border-radius: var(--radius); background: rgba(255,253,249,0.55); }

.form-card{ background: var(--white); padding: 34px; }
.info-list{ gap: 22px; }
.info-list li{ padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.info-list .ico{ color: var(--brick); }

.site-footer{ background: var(--blue-deep); padding: 68px 0 28px; }
.footer-grid{ gap: 48px; }
.site-footer p{ color: rgba(255,253,249,0.68); }
.footer-grid a:hover{ color: var(--brick); }

.project-modal{ background: rgba(16,47,59,0.78); backdrop-filter: blur(8px); }
.project-modal-panel{ border-radius: var(--radius); box-shadow: 0 26px 80px rgba(0,0,0,0.25); }
.project-modal-media{ border-color: var(--line); }
.project-modal-content{ border-color: var(--line); }
.project-modal-close{ border-radius: 50%; border-color: var(--line-strong); }

@media (max-width: 760px){
  .site-header .container{ min-height: 72px; }
  .main-nav{ background: var(--white); }
  .hero .container{ min-height: 620px; padding-top: 76px; padding-bottom: 76px; }
}
@media (max-width: 700px){
  .container[style*="grid-template-columns"]{ grid-template-columns: 1fr !important; }
  .project-modal-panel{ border-radius: 8px; }
}

/* Reference-inspired visual treatment. The page structure remains unchanged. */
:root{
  --bg: #f7f8fa;
  --bg-raised: #eef1f5;
  --ink: #263342;
  --ink-soft: #687586;
  --line: #e2e7ed;
  --line-strong: #d0d8e2;
  --blue: #1769d2;
  --blue-deep: #132b45;
  --blue-tint: #edf4ff;
  --brick: #f07b32;
  --brick-deep: #d55f1c;
  --ochre: #8c55d9;
  --white: #ffffff;
  --radius: 12px;
  --shadow-soft: 0 3px 14px rgba(31,55,82,0.08);
  --shadow-lift: 0 10px 26px rgba(31,55,82,0.14);
}

body{ background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55; }
h1, h2, h3, h4{ color: var(--blue-deep); letter-spacing: 0; }
h1{ font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; }
h2{ font-size: clamp(1.55rem, 2.7vw, 2.2rem); line-height: 1.12; }
h3{ font-size: 1.05rem; }
p{ color: var(--ink-soft); }
.container{ max-width: 1180px; }
section{ padding: clamp(42px, 6vw, 72px) 0; }

.site-header{
  background: var(--blue-deep);
  border-bottom: 0;
  backdrop-filter: none;
}
.site-header .container{ min-height: 58px; }
.brand{ color: var(--white); }
.brand-mark{ font-family: var(--font-body); font-size: 1rem; font-weight: 800; letter-spacing: 0.1px; }
.main-nav ul{ gap: 24px; }
.main-nav a{ color: rgba(255,255,255,0.82); font-family: var(--font-body); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.2px; text-transform: uppercase; }
.main-nav a:hover, .main-nav a[aria-current="page"]{ color: var(--white); border-bottom-color: #61a5ff; }
.nav-toggle{ border-color: rgba(255,255,255,0.65); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{ background: var(--white); }

.btn{ border-radius: 999px; padding: 0.7em 1.35em; font-family: var(--font-body); font-size: 0.82rem; font-weight: 700; }
.btn-primary{ background: var(--blue); border-color: var(--blue); }
.btn-primary:hover{ background: #0f57b3; border-color: #0f57b3; }
.btn:hover{ transform: translateY(-1px); box-shadow: 0 5px 14px rgba(23,105,210,0.2); }
.btn-ghost{ border-color: rgba(255,255,255,0.75); color: var(--white); }

.hero{
  background:
    linear-gradient(90deg, rgba(19,43,69,0.86), rgba(19,43,69,0.44)),
    url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1800&q=80") center / cover;
}
.hero-grid{ display: none; }
.hero .container{ min-height: 470px; padding-top: 72px; padding-bottom: 72px; }
.hero h1{ max-width: 13ch; color: var(--white); }
.hero .lede{ color: rgba(255,255,255,0.88); font-size: 1rem; }
.hero-actions{ margin-top: 1.5em; }
.callout{ border: 1px solid rgba(255,255,255,0.3); border-left: 0; border-radius: 10px; background: rgba(255,255,255,0.12); padding: 14px 18px; }
.callout .num{ font-size: 1.75rem; }

.page-intro{
  padding: 48px 0 42px;
  background:
    linear-gradient(90deg, rgba(19,43,69,0.9), rgba(19,43,69,0.5)),
    url("https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&w=1800&q=80") center / cover;
}
.page-intro h1{ max-width: 18ch; }
.page-intro .lede{ font-size: 1rem; }
.eyebrow{ color: #8ec1ff; font-size: 0.7rem; letter-spacing: 1px; }
.dim-divider{ margin-bottom: 2em; color: var(--blue); font-size: 0.72rem; letter-spacing: 1px; }
.dim-divider::before, .dim-divider::after{ background: var(--line-strong); }

.grid{ gap: 18px; }
.plate, .project-card, .form-card, .admin-panel, .manage-bar{ border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.plate{ padding: 24px; background: var(--white); }
.plate:hover, .project-card:hover{ box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.plate-icon{ color: var(--blue) !important; }
.project-card{ overflow: hidden; background: var(--white); }
.project-media{ border-bottom: 0; }
.project-body{ padding: 16px 18px 20px; }
.tag{ border: 0; border-radius: 999px; padding: 0.35em 0.8em; background: var(--blue-tint); color: var(--blue); font-family: var(--font-body); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; }
.tag-ongoing{ background: #fff1e8; color: var(--brick-deep); }
.tag-future{ background: #f1eaff; color: var(--ochre); }
.project-meta{ font-size: 0.78rem; }
.read-more-btn{ color: var(--blue); }

.gallery-grid{ gap: 16px; }
.gallery-grid{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px){ .gallery-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .gallery-grid{ grid-template-columns: 1fr; } }
.gallery-item{ border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-soft); }
.gallery-item .cap{ background: linear-gradient(0deg, rgba(19,43,69,0.85), transparent); font-size: 0.75rem; }
.lightbox{ background: rgba(19,43,69,0.94); }
.lightbox .lb-cap{ position: static; }

.manage-bar{ background: var(--blue-tint); border: 1px solid #cfe0fa; padding: 16px 18px; }
.admin-panel{ background: var(--white); padding: 24px; }
.field input[type="text"], .field input[type="number"], .field textarea, .field select{ border: 1px solid var(--line-strong); border-radius: 7px; background: var(--white); }
.empty-state{ border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--white); }
.form-card{ background: var(--white); padding: 28px; }
.info-list li{ border-bottom: 1px solid var(--line); }

.site-footer{ background: var(--blue-deep); padding: 48px 0 24px; }
.footer-grid{ gap: 32px; }

.project-modal{ background: rgba(19,43,69,0.72); }
.project-modal-panel{ border-radius: var(--radius); }
.project-modal-close{ border-radius: 50%; }

@media (max-width: 760px){
  .site-header .container{ min-height: 58px; }
  .main-nav{ background: var(--blue-deep); border-bottom: 1px solid rgba(255,255,255,0.16); }
  .main-nav a{ color: rgba(255,255,255,0.88); border-bottom-color: rgba(255,255,255,0.14); }
  .hero .container{ min-height: 540px; padding-top: 58px; padding-bottom: 58px; }
}

.brand-logo{
  display: block;
  width: 142px;
  height: auto;
  background: var(--white);
}
.brand{ flex-shrink: 0; }
@media (max-width: 760px){
  .brand-logo{ width: 118px; }
}

/* Projects management dashboard */
@media (min-width: 761px){
  body:has(#gallery-grid) .manage-bar{
    position: fixed;
    top: 58px;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: 224px;
    margin: 0;
    padding: 24px 14px;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    border: 0;
    border-radius: 0;
    background: #152b3f;
    box-shadow: 5px 0 20px rgba(15,35,54,0.12);
  }
  body:has(#gallery-grid) .manage-bar .actions{
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  body:has(#gallery-grid) .manage-bar .actions .btn{
    justify-content: flex-start;
    width: 100%;
    border: 0;
    border-radius: 6px;
    color: rgba(255,255,255,0.78);
    background: transparent;
    box-shadow: none;
    transform: none;
    text-align: left;
  }
  body:has(#gallery-grid) .manage-bar .actions .btn:first-child,
  body:has(#gallery-grid) .manage-bar .actions .btn:hover{
    color: var(--white);
    background: #1769d2;
  }
  body:has(#gallery-grid) section > .container{
    width: auto;
    max-width: none;
    margin-left: 248px;
    margin-right: 24px;
  }
  body:has(#project-list) .manage-bar{
    position: fixed;
    top: 58px;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: 224px;
    margin: 0;
    padding: 24px 14px;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    border: 0;
    border-radius: 0;
    background: #152b3f;
    box-shadow: 5px 0 20px rgba(15,35,54,0.12);
  }
  body:has(#project-list) .manage-bar p{
    max-width: none;
    margin: 0;
    padding: 8px 10px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.72);
    font-size: 0.75rem;
    line-height: 1.45;
  }
  body:has(#project-list) .manage-bar p strong{
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-size: 0.95rem;
  }
  body:has(#project-list) .manage-bar .actions{
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  body:has(#project-list) .manage-bar .actions .btn{
    justify-content: flex-start;
    width: 100%;
    border: 0;
    border-radius: 6px;
    color: rgba(255,255,255,0.78);
    background: transparent;
    box-shadow: none;
    transform: none;
    text-align: left;
  }
  body:has(#project-list) .manage-bar .actions .btn:first-child,
  body:has(#project-list) .manage-bar .actions .btn:hover{
    color: var(--white);
    background: #1769d2;
  }
  body:has(#project-list) section > .container{
    width: auto;
    max-width: none;
    margin-left: 248px;
    margin-right: 24px;
  }
}

@media (max-width: 760px){
  body:has(#gallery-grid) .manage-bar{
    position: static;
    display: block;
    margin-bottom: 22px;
  }
  body:has(#gallery-grid) .manage-bar .actions{
    margin-top: 14px;
  }
  body:has(#project-list) .manage-bar{
    position: static;
    display: block;
    margin-bottom: 22px;
  }
  body:has(#project-list) .manage-bar .actions{
    margin-top: 14px;
  }
}
