/* ============================================================
   CDBSE — CD International Building Services Engineers
   Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
img { max-width: 100%; display: block; }
a { text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── CSS VARIABLES ── */
:root {
  --navy:       #0B1F3A;
  --navy-mid:   #112847;
  --navy-dark:  #060F1C;
  --blue:       #1A5FA8;
  --blue-light: #2E7DD4;
  --ice:        #E8F1FB;
  --ice-mid:    #C8DDEF;
  --gold:       #C8A96E;
  --gold-light: #DFC08A;
  --white:      #FAFBFD;
  --gray:       #8A96A8;
  --gray-light: #F2F5F9;
  --text:       #1A2535;
  --border:     rgba(200,169,110,0.2);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --max-w: 1280px;
  --pad-x: 80px;
  --pad-section: 120px;

  --transition: 0.3s ease;
  --shadow-gold: 0 12px 40px rgba(200,169,110,0.25);
  --shadow-blue: 0 12px 40px rgba(26,95,168,0.2);
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; }

.section-tag {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.section-tag-line { width: 32px; height: 1px; background: var(--gold); flex-shrink: 0; }
.section-tag-text {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase;
}

.section-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700; color: var(--navy);
}
.section-title.light { color: var(--white); }

/* ── LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
section { position: relative; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 16px 32px; transition: all 0.25s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow-gold); }

.btn-primary-dark { background: var(--navy); color: var(--white); }
.btn-primary-dark:hover { background: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-blue); }

.btn-outline {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--blue);
  border-bottom: 1px solid var(--blue); padding-bottom: 2px;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--navy); border-color: var(--navy); }
.btn-ghost.light { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.3); }
.btn-ghost.light:hover { color: var(--white); border-color: var(--white); }

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 100px; display: flex; align-items: center;
  background: rgba(11,31,58,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.navbar.scrolled { background: rgba(6,15,28,0.99); box-shadow: 0 4px 30px rgba(0,0,0,0.3); }

.nav-inner {
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-mark {
  width: 38px; height: 38px; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 18px;
  color: var(--navy); letter-spacing: -1px; flex-shrink: 0;
}
.nav-logo-text { font-size: 13px; font-weight: 500; color: var(--white); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3; }
.nav-logo-sub { font-size: 10px; font-weight: 300; color: var(--ice-mid); letter-spacing: 0.12em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 12px; font-weight: 400; color: rgba(255,255,255,0.65);
  letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.nav-cta {
  background: var(--gold); color: var(--navy) !important;
  font-weight: 600 !important; padding: 10px 22px;
  font-size: 12px !important;
}
.nav-cta:hover { background: var(--gold-light) !important; color: var(--navy) !important; }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-hamburger span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: all 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none; position: fixed; top: 72px; left: 0; right: 0;
  background: var(--navy-dark); border-top: 1px solid var(--border);
  padding: 32px var(--pad-x); z-index: 999;
  flex-direction: column; gap: 24px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 16px; font-weight: 400; color: rgba(255,255,255,0.7); letter-spacing: 0.06em; text-transform: uppercase; }
.nav-mobile a:hover { color: var(--gold); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 180px var(--pad-x) 100px;
  background: var(--navy);
  position: relative; overflow: hidden;
}
.page-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(200,169,110,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,169,110,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}
.page-hero-inner { position: relative; z-index: 1; max-width: var(--max-w); margin: 0 auto; }
.page-hero h1 { font-size: clamp(42px, 6vw, 72px); color: var(--white); margin-bottom: 20px; }
.page-hero p { font-size: 18px; font-weight: 300; color: rgba(232,241,251,0.7); max-width: 600px; line-height: 1.7; }

/* ── FOOTER ── */
footer {
  background: var(--navy-dark);
  border-top: 1px solid var(--border);
  padding: 80px var(--pad-x) 40px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px; margin-bottom: 60px;
}
.footer-brand-desc {
  font-size: 14px; font-weight: 300;
  color: rgba(232,241,251,0.35); line-height: 1.7;
  margin: 20px 0 28px;
}
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px; border: 1px solid rgba(200,169,110,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(232,241,251,0.4); font-size: 13px; font-weight: 600;
  text-decoration: none; transition: all 0.2s; font-family: var(--font-mono);
}
.social-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(200,169,110,0.08); }
.footer-col-title {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; font-weight: 300; color: rgba(232,241,251,0.4); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.06);
  gap: 20px; flex-wrap: wrap;
}
.footer-copy { font-size: 12px; font-weight: 300; color: rgba(232,241,251,0.25); }
.footer-reg { font-family: var(--font-mono); font-size: 10px; color: rgba(232,241,251,0.2); letter-spacing: 0.08em; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── CARDS ── */
.card-hover {
  transition: transform 0.3s, box-shadow 0.3s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(11,31,58,0.12); }

/* ── FORMS ── */
.form-input {
  width: 100%; padding: 16px 20px;
  background: var(--white); border: 1px solid rgba(26,95,168,0.15);
  border-bottom: 2px solid rgba(26,95,168,0.25);
  font-family: var(--font-body); font-size: 14px; font-weight: 300;
  color: var(--text); outline: none; transition: border-color 0.2s;
  appearance: none;
}
.form-input:focus { border-color: var(--blue); border-bottom-color: var(--blue); }
.form-input::placeholder { color: var(--gray); }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A96A8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px;
}
textarea.form-input { resize: none; }
.form-label { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); margin-bottom: 8px; display: block; }
.form-group { display: flex; flex-direction: column; }

/* ── PROJECT CARDS ── */
.project-card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--navy-mid);
}
.project-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card:hover .project-card-img { transform: scale(1.06); }
.project-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,31,58,0.95) 0%, rgba(11,31,58,0.3) 60%, transparent 100%);
  opacity: 0.75; transition: opacity 0.3s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
}
.project-card:hover .project-card-overlay { opacity: 1; }
.project-sector {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 8px;
}
.project-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--white); line-height: 1.2; margin-bottom: 6px; }
.project-location { font-size: 13px; font-weight: 300; color: rgba(232,241,251,0.55); }

/* ── BG PATTERNS ── */
.bg-grid-gold {
  background-image:
    linear-gradient(rgba(200,169,110,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,169,110,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── OFFICE CARDS ── */
.office-card {
  padding: 48px 44px; background: rgba(255,255,255,0.03);
  border-top: 3px solid transparent; transition: all 0.3s;
}
.office-card:hover { background: rgba(255,255,255,0.06); border-top-color: var(--gold); }
.office-city { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.office-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 24px; }
.office-address { font-size: 14px; font-weight: 300; color: rgba(232,241,251,0.45); line-height: 1.7; margin-bottom: 16px; }
.office-phone { font-size: 14px; font-weight: 400; color: rgba(232,241,251,0.65); transition: color 0.2s; }
.office-phone:hover { color: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  :root { --pad-x: 48px; --pad-section: 80px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  :root { --pad-x: 24px; --pad-section: 60px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .page-hero { padding: 160px 24px 80px; }
}
