/* ==========================================================================
   District Building Services: stylesheet (shared by every page)
   Colors live in :root below. Change them here to re-brand the whole site.
   ========================================================================== */

:root {
  --navy: #0b2559;
  --navy-2: #12408a;
  --blue: #1368c4;
  --blue-dark: #0e529c;
  --sky: #3ba5f0;
  --sky-hover: #66b9f4;
  --focus: #0b2559;
  --ink: #1f2933;
  --muted: #5b6573;
  --line: #e2e6ec;
  --soft: #f4f6f9;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(11, 37, 89, 0.12);
  --max: 1120px;
  --header-h: 72px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
}

h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
}

.skip-link:focus {
  left: 16px;
}

section {
  padding: 56px 0;
}

.section-soft {
  background: var(--soft);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.section-head {
  max-width: 680px;
  margin-bottom: 36px;
}

.lead {
  max-width: 58ch;
  font-size: 1.2rem;
  color: var(--muted);
}

.prose {
  max-width: 720px;
}

.prose p {
  font-size: 1.125rem;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-accent {
  background: var(--sky);
  color: var(--navy);
}

.btn-accent:hover {
  background: var(--sky-hover);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.btn-ghost:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--navy);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 44px;
  flex: none;
}

/* The logo already carries the DBS name, so the written name only appears on wide screens. */
.brand-text {
  display: none;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
}

.site-nav {
  position: static;
}

.nav-links {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 8px 16px 16px;
  list-style: none;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nav-links.is-open {
  display: flex;
}

.nav-links a {
  display: block;
  padding: 12px 10px;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--soft);
}

.nav-links a[aria-current="page"] {
  color: var(--blue);
}

.nav-cta {
  display: none;
}

/* ---------- Home page hero ---------- */

.hero {
  padding: 64px 0 72px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

/* Large logo beside the introduction; hidden on small screens to keep the page short. */
.hero-visual {
  display: none;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.hero h1 {
  max-width: 18ch;
  color: var(--white);
}

.hero .eyebrow {
  color: var(--sky);
}

.hero .lead {
  color: #d5ddeb;
}

/* ---------- Inner page header ---------- */

.page-hero {
  padding: 56px 0 48px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 22ch;
  font-size: clamp(2rem, 4.6vw, 3rem);
}

.page-hero .lead {
  margin-bottom: 0;
}

/* ---------- Cards and grids ---------- */

.grid {
  display: grid;
  gap: 20px;
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h2,
.steps h2 {
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: #e6f1fc;
  color: var(--blue);
}

.icon svg {
  width: 26px;
  height: 26px;
}

/* Compact service tiles (home page) */

.tiles {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tile .icon {
  width: 44px;
  height: 44px;
  margin: 0;
}

.more {
  margin: 28px 0 0;
  font-weight: 600;
}

/* Call-to-action row at the bottom of inner pages */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-row p {
  max-width: 48ch;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--navy);
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--navy);
  color: var(--white);
}

.contact h2 {
  color: var(--white);
}

.contact p {
  color: #d5ddeb;
}

.hero :focus-visible,
.contact :focus-visible {
  outline-color: var(--sky);
}

.contact-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.contact-details {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.contact-details div {
  display: grid;
  gap: 4px;
}

.contact-details dt {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
}

.contact-details dd {
  margin: 0;
  color: var(--white);
}

.contact-details a {
  color: var(--white);
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-top: 48px;
  background: var(--soft);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
  margin-bottom: 14px;
}

.footer-inner strong {
  font-size: 1.05rem;
  color: var(--navy);
}

.footer-inner p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.copy {
  margin-top: 36px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  .grid-3,
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  section {
    padding: 72px 0;
  }

  .hero {
    padding: 96px 0 104px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
  }

  .hero-visual {
    display: block;
  }

  .page-hero {
    padding: 72px 0 56px;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .grid-3,
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .nav-links a {
    padding: 4px 0;
    background: none;
    color: var(--ink);
    font-weight: 500;
  }

  .nav-links a:hover {
    background: none;
    color: var(--blue);
  }

  .nav-links a[aria-current="page"] {
    color: var(--blue);
    font-weight: 600;
  }

  .nav-cta {
    display: inline-flex;
    min-height: 44px;
    margin-left: 8px;
  }
}

@media (min-width: 1200px) {
  .brand-text {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
