/* AZ Construction — site styles (classic navy)
   Change the brand colours here and every page follows.
   --navy is taken from the A-Z Construction sign. */
:root {
  --navy: #23256b;
  --navy-deep: #171a4a;
  --navy-night: #0f1236;
  --ink: #141833;
  --blue: #2f4aa8;
  --sky: #b6c6f0;
  --steel: #59617a;
  --line: #dde2ee;
  --paper: #f4f6fb;
  --white: #ffffff;
  --radius: 4px;
  --max: 1180px;
  --header-h: 104px;
  --shadow: 0 14px 34px rgba(20, 24, 51, 0.10);
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--navy-deep);
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 92px 0; }
.section--tight { padding: 56px 0; }
.section--dark { background: var(--navy-deep); color: #dfe4f3; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--white { background: var(--white); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 30px; height: 2px; background: currentColor; }
.section--dark .eyebrow, .hero .eyebrow, .login-side .eyebrow { color: var(--sky); }
.lead { font-size: 1.15rem; color: var(--steel); max-width: 680px; }
.section--dark .lead { color: #b9c2de; }
.section-head { margin-bottom: 46px; }
.section-head--center { text-align: center; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
/* primary = white on navy backgrounds */
.btn--primary { background: var(--white); color: var(--navy); }
.btn--primary:hover { background: var(--sky); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.6); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
/* dark = navy on light backgrounds */
.btn--dark { background: var(--navy); color: var(--white); }
.btn--dark:hover { background: var(--blue); }
.btn--lg { padding: 17px 32px; font-size: 0.98rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 3px solid var(--white);
  box-shadow: 0 2px 14px rgba(15, 18, 54, 0.25);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--white); }
.az-logo { display: block; height: 84px; width: auto; flex: 0 0 auto; }
.logo-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.3;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}
.logo-text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
}
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: #dfe4f3;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); border-bottom-color: var(--white); }
.nav-links .btn { padding: 11px 18px; border-bottom: 0; color: var(--navy); font-size: 0.82rem; }
.nav-links .btn:hover { color: var(--navy); }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 30px; height: 30px; }

@media (max-width: 1040px) { .logo-text { display: none; } }
@media (max-width: 860px) {
  :root { --header-h: 84px; }
  .az-logo { height: 66px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    padding: 8px 20px 20px;
    display: none;
    border-bottom: 3px solid var(--white);
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .nav-links .btn { margin-top: 14px; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(100deg, rgba(23, 26, 74, 0.96) 0%, rgba(35, 37, 107, 0.86) 50%, rgba(35, 37, 107, 0.55) 100%),
    var(--hero-image, none) center / cover no-repeat,
    var(--navy);
  padding: 120px 0 104px;
  overflow: hidden;
}
.hero h1 { color: var(--white); }
.hero h1 span { color: var(--sky); font-style: italic; font-weight: 400; }
.hero .lead { color: #d3daef; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero--page { padding: 88px 0 72px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 72px;
  padding-top: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.stat strong { display: block; font-family: var(--serif); font-size: 2.1rem; color: var(--white); }
.stat span { color: var(--sky); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.process-step {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.process-step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--blue);
  display: block;
  margin-bottom: 12px;
}
.process-step p { color: var(--steel); margin: 0; font-size: 0.98rem; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } }

/* ---------- Two-column feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--top { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: "";
  flex: 0 0 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.section--dark .checklist li::before, .login-side .checklist li::before {
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323256b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

/* ---------- Photo / placeholder blocks ---------- */
.photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--tint, var(--navy));
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-ph { text-align: center; font-size: 0.85rem; font-weight: 600; }
.photo-ph svg { width: 46px; height: 46px; margin: 0 auto 8px; opacity: 0.8; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--framed { box-shadow: 18px 18px 0 var(--navy); }
.section--dark .photo--framed { box-shadow: 18px 18px 0 rgba(255, 255, 255, 0.14); }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--navy-deep);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.filter-btn .count { opacity: 0.6; margin-left: 6px; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 960px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card .photo { border-radius: 0; aspect-ratio: 16 / 11; }
.project-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; border-top: 3px solid var(--navy); }
.project-body h3 { margin-bottom: 4px; }
.project-meta { color: var(--blue); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.project-body p { color: var(--steel); font-size: 0.96rem; margin: 0; }
.tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  z-index: 1;
}
.tag--commercial { background: var(--navy-deep); }
.empty-state { text-align: center; color: var(--steel); padding: 40px 0; }

/* Project detail dialog */
.project-dialog {
  border: 0;
  border-radius: 6px;
  padding: 0;
  width: min(840px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.project-dialog::backdrop { background: rgba(15, 18, 54, 0.78); }
.project-dialog .photo { border-radius: 0; aspect-ratio: 16 / 9; }
.dialog-body { padding: 28px 30px 32px; }
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 18, 54, 0.7);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}
/* Photo viewer: whole photo on navy, arrows each side, counter bottom-right */
.viewer { position: relative; background: var(--navy-night); }
.project-dialog .viewer .photo { background: var(--navy-night); aspect-ratio: 4 / 3; max-height: 68vh; width: 100%; }
.project-dialog .viewer .photo img { object-fit: contain; }
.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(15, 18, 54, 0.6);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 0 0 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.viewer-arrow:hover { background: var(--navy); }
.viewer-arrow--prev { left: 14px; }
.viewer-arrow--next { right: 14px; }
.viewer-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 18, 54, 0.75);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
@media (max-width: 560px) {
  .viewer-arrow { width: 40px; height: 40px; font-size: 1.7rem; }
  .viewer-arrow--prev { left: 8px; }
  .viewer-arrow--next { right: 8px; }
}
.thumbs { display: flex; gap: 10px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 6px; }
.thumbs img { flex: 0 0 auto; width: 96px; height: 72px; object-fit: cover; border-radius: 3px; cursor: pointer; border: 3px solid transparent; opacity: 0.7; transition: opacity 0.2s, border-color 0.2s; }
.thumbs img:hover { opacity: 1; }
.thumbs img.active { border-color: var(--navy); opacity: 1; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--blue); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards (about page) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; }
.card p { color: var(--steel); margin: 0; }
.icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.timeline li:last-child { border-bottom: 0; }
.timeline .num { font-family: var(--serif); font-size: 1.8rem; color: var(--sky); line-height: 1; }
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: #b9c2de; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 52px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  outline: 2px solid var(--white);
  outline-offset: -10px;
}
.cta-band h2 { margin: 0 0 6px; color: var(--white); }
.cta-band p { margin: 0; color: #d3daef; }
.cta-band .btn--dark { background: var(--white); color: var(--navy); }
.cta-band .btn--dark:hover { background: var(--sky); }
@media (max-width: 600px) { .cta-band { padding: 36px 26px; } }

/* ---------- Login page ---------- */
.login-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1.05fr 1fr; }
.login-side {
  background: var(--navy-deep);
  color: #dfe4f3;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-side h1 { color: var(--white); font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.login-side .checklist li { color: #d3daef; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 60px 24px; background: var(--paper); }
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-logo { width: 190px; margin: 0 auto 24px; }
.login-logo .az-logo { width: 100%; height: auto; }
.login-card h2 { font-size: 1.6rem; }
.login-card p { color: var(--steel); }
.login-card .btn { width: 100%; justify-content: center; margin-top: 10px; }
.login-card .btn--primary { background: var(--navy); color: var(--white); }
.login-card .btn--primary:hover { background: var(--blue); }
.login-note { font-size: 0.9rem; color: var(--steel); margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.login-note a { color: var(--blue); font-weight: 700; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 56px 24px; order: 2; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-night); color: #aab3d1; padding: 64px 0 28px; font-size: 0.96rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.logo--footer .az-logo { height: 110px; }
.site-footer h4 { color: var(--white); font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; color: #aab3d1; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.86rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
