/*
  ConstructCity website stylesheet
  Purpose:
  - define the brand colours and spacing tokens
  - control the layout of each section
  - manage responsive behaviour for mobile screens
  - support dark mode and interactive UI states
*/

:root {
  --navy: #102a43;
  --navy-deep: #071b2e;
  --slate: #52606d;
  --gold: #f4b41a;
  --cream: #f5f7f8;
  --white: #ffffff;
  --line: #d9e2ec;
  --max: 1180px;
}

/* Reset and global layout */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--navy);
  background: var(--cream);
  font-family: Inter, Arial, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* Top announcement bar */
.notice {
  padding: 9px 24px;
  color: #d8e2ec;
  background: var(--navy-deep);
  font-size: 13px;
}
.notice .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.notice strong { color: var(--gold); font-weight: 700; }

/* Header and navigation */
header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(217, 226, 236, 0.9);
  backdrop-filter: blur(12px);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease, background 0.35s ease;
}
header.is-scrolled {
  box-shadow: 0 10px 28px rgba(7, 27, 46, 0.14);
  animation: headerDrop 0.5s cubic-bezier(.22,1,.36,1);
}
.nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.8px;
}
.brand-logo {
  display: block;
  width: 150px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}
nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #334e68;
  font-size: 14px;
  font-weight: 700;
}
nav a:hover { color: #b77900; }
nav a:last-child { display: none; }

/* Buttons and action links */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 13px 20px;
  border-radius: 5px;
  color: var(--navy);
  background: var(--gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.button:hover {
  background: #ffca3a;
  transform: translateY(-2px);
}
.button.dark {
  color: var(--white);
  background: var(--navy);
}
.button.dark:hover { background: #1b4264; }

/* Mobile navigation toggle */
.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  padding: 10px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero section */
.hero {
  min-height: 610px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: linear-gradient(90deg, rgba(7, 27, 46, 0.96) 0%, rgba(7, 27, 46, 0.78) 46%, rgba(7, 27, 46, 0.22) 100%),
    url("https://images.unsplash.com/photo-1504307651254-35680f356dfd?auto=format&fit=crop&w=2000&q=85") center/cover;
}
.hero-content { max-width: 710px; padding: 92px 0; }
.eyebrow {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 700px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 0.99;
  letter-spacing: -4px;
}
h2 {
  margin-bottom: 20px;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.03;
  letter-spacing: -2.5px;
}
.hero p {
  max-width: 580px;
  margin-bottom: 32px;
  color: #fff;
  font-size: 18px;
  line-height: 1.75;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Stats and trust details */
.metrics {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric {
  padding: 27px 24px;
  border-right: 1px solid var(--line);
}
.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric strong {
  display: block;
  margin-bottom: 3px;
  font-size: 30px;
  letter-spacing: -1px;
}
.metric span {
  color: var(--slate);
  font-size: 13px;
}

/* Common section styling */
section { padding: 96px 0; }
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 90px;
}
.lead {
  color: var(--slate);
  font-size: 17px;
}
.checks {
  display: grid;
  gap: 13px;
  margin: 27px 0 30px;
  padding: 0;
  list-style: none;
  font-weight: 750;
}
.checks li { display: flex; align-items: center; gap: 11px; }
.checks li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: var(--navy);
  background: #4ade80;
  font-size: 13px;
  border-radius: 50%;
}
.feature-images {
  min-height: 445px;
  display: grid;
  grid-template-columns: 1fr;
}
.feature-image {
  min-height: 0;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: var(--cream);
}
.before-after-image {
  aspect-ratio: 4 / 3;
  background-image: url("assets/beforeandafterimg.jpg");
}

/* Services cards */
.services { background: var(--white); }
.section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}
.section-intro h2 { margin-bottom: 0; }
.section-intro p {
  max-width: 410px;
  margin-bottom: 3px;
  color: var(--slate);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  padding: 30px;
  background: var(--cream);
  border-top: 3px solid var(--gold);
}
.card-number {
  color: #829ab1;
  font-size: 13px;
  font-weight: 900;
}
.card h3 {
  margin: 32px 0 10px;
  font-size: 21px;
}
.card p {
  margin-bottom: 0;
  color: var(--slate);
  font-size: 14px;
}

/* Project showcase */
.projects-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}
.project {
  min-height: 340px;
  display: flex;
  align-items: end;
  padding: 26px;
  color: var(--white);
  background-position: center;
  background-size: cover;
}
.projects-grid > .project:first-child {
  min-height: 480px;
  background-image: linear-gradient(0deg, rgba(7, 27, 46, 0.92), transparent 70%), url("assets/img1.png");
}
.project-stack { display: grid; gap: 20px; }
.project-stack .project:first-child {
  background-image: linear-gradient(0deg, rgba(7, 27, 46, 0.92), transparent 70%), url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=900&q=85");
}
.project-stack .project:nth-child(2) {
  background-image: linear-gradient(0deg, rgba(7, 27, 46, 0.92), transparent 70%), url("https://images.unsplash.com/photo-1558904541-efa843a96f01?auto=format&fit=crop&w=900&q=85");
}
.project h3 {
  margin-bottom: 4px;
  font-size: 24px;
}
.project p {
  margin: 0;
  color: #dce6ee;
  font-size: 13px;
}
/* Contact CTA */
.contact {
  color: var(--white);
  background: var(--gold);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 85px;
  align-items: center;
}
.contact h2 { max-width: 500px; }
.contact-copy p {
  max-width: 470px;
  color: #273d4c;
  font-size: 17px;
}
/* Footer and floating actions */
footer {
  padding: 30px 0;
  color: var(--navy);
  background: #fff;
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.footer-logo {
  display: block;
  width: 160px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
}
.map-frame {
  display: block;
  width: 100%;
  height: 260px;
  margin-bottom: 24px;
  border: 0;
  background: #d9e2ec;
}
.floating-actions {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.floating-action {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(7,27,46,0.2);
  font-weight: 900;
  transition: transform 0.2s;
}
.floating-action:hover { transform: translateY(-2px); }
.whatsapp {
  color: #fff;
  background: #25d366;
}
.whatsapp svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}
.back-top {
  color: var(--navy);
  background: var(--gold);
  font-size: 19px;
}

/* Theme toggle and scroll progress */
.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: var(--white);
  font-size: 21px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.theme-toggle:hover {
  transform: translateY(-2px);
  background: var(--gold);
}
.theme-toggle .moon,
.theme-toggle .sun {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.theme-toggle svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .sun { display: none; }
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 0;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, #f4b41a, #ffcf55);
  box-shadow: 0 0 12px rgba(244, 180, 26, 0.6);
  transform-origin: left center;
}

/* Dark mode */
body.dark-mode {
  --cream: #111c28;
  --white: #182635;
  --navy: #f4b41a;
  --slate: #f4b41a;
  --line: #34495c;
  color: var(--navy);
  background: var(--cream);
}
body.dark-mode header,
body.dark-mode footer { background: #182635; border-color: var(--line); }
body.dark-mode nav a,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode label,
body.dark-mode .metric { color: #f4b41a; }
body.dark-mode .card,
body.dark-mode form,
body.dark-mode .metrics { background: #182635; color: #f4b41a; }
body.dark-mode .brand-logo,
body.dark-mode .footer-logo { background: transparent; border-radius: 0; padding: 0; }
body.dark-mode .button,
body.dark-mode .button.dark { color: #102a43; background: #f4b41a; }
body.dark-mode input,
body.dark-mode textarea {
  color: #f4b41a;
  background: #223447;
  border-color: #486074;
}
body.dark-mode .theme-toggle { color: #f4b41a; background: #223447; border-color: #486074; }
body.dark-mode .theme-toggle .moon { display: none; }
body.dark-mode .theme-toggle .sun { display: grid; }
body.dark-mode .menu-toggle { color: #f4b41a; background: #182635; border-color: #34495c; }
body.dark-mode .checks li::before { color: #102a43; background: #4ade80; }
body.dark-mode .light-logo { display: none; }
body.dark-mode .dark-logo { display: block; }
.dark-logo { display: none; }
body.dark-mode .services { background: #101b27; }
body.dark-mode .services .section-intro p { color: #b9c8d6; }
body.dark-mode .services .card {
  background: linear-gradient(145deg, #1d3041, #172735);
  border: 1px solid #34495c;
  border-top: 3px solid #f4b41a;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(3,12,21,0.2);
}
body.dark-mode .services .card-number { color: #f4b41a; }
body.dark-mode .services .card h3 { color: #dbe7ef; }
body.dark-mode .services .card p { color: #b9c8d6; }
body.dark-mode .contact { color: #dbe7ef; background: #142535; }
body.dark-mode .contact .eyebrow { color: #f4b41a; }
body.dark-mode .contact h2 { color: #f4b41a; }
body.dark-mode .contact-copy p { color: #dbe7ef; }
body.dark-mode .back-top { color: #fff !important; }
body.dark-mode .hero p { color: #fff !important; }

/* Responsive adjustments */
@media (max-width: 760px) {
  .container { width: min(var(--max), calc(100% - 34px)); }
  .notice { display: none; }
  .nav { min-height: 68px; }
  .menu-toggle { display: block; z-index: 2; }
  .nav > .button { display: none; }
  nav {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 100px 28px 40px;
    background: var(--navy-deep);
    border: 0;
    box-shadow: none;
  }
  nav.is-open { display: flex; }
  nav a {
    width: min(360px, 100%);
    padding: 16px 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    font-size: 20px;
    text-align: center;
    text-transform: uppercase;
  }
  nav a:last-child {
    display: inline-flex;
    align-self: center;
    justify-content: center;
    color: var(--navy);
    background: var(--gold);
    border: 0;
  }
  body.dark-mode nav a:last-child {
    color: #102a43;
    background: var(--gold);
  }
  .hero { min-height: 580px; }
  .hero-content { padding: 70px 0; }
  h1 { letter-spacing: -2.5px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric, .metric:first-child { padding: 21px 16px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3), .metric:nth-child(4) { border-bottom: 0; }
  section { padding: 65px 0; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 35px; }
  .feature-images { min-height: 300px; }
  .feature-images { grid-template-columns: 1fr; }
  .feature-images .feature-image { min-height: 230px; }
  .section-intro { display: block; }
  .section-intro p { margin-top: 14px; }
  .cards, .projects-grid { grid-template-columns: 1fr; }
  .project:first-child { min-height: 350px; }
  .project-stack { min-height: 600px; }
  .footer-row { display: block; }
  footer span { display: block; margin-top: 8px; }
  body { font-size: 16px; }
  h1 { font-size: clamp(38px, 11vw, 54px); letter-spacing: -1px; }
  h2 { font-size: clamp(30px, 8vw, 42px); }
  nav a { font-size: 18px; }
  .theme-toggle { width: 44px; height: 44px; margin-left: auto; margin-right: 8px; }
}

@keyframes headerDrop {
  from { transform: translateY(-10px); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  header { transition: none; }
  header.is-scrolled { animation: none; }
  html { scroll-behavior: auto; }
}
