:root {
  --ink: #1f2630;
  --muted: #5e6773;
  --brand: #1f4f80;
  --accent: #f29131;
  --line: #d7ccbe;
  --bg: #f2ece5;
  --panel: #fffaf4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(242, 145, 49, 0.2), transparent 44%),
    radial-gradient(circle at 88% 9%, rgba(31, 79, 128, 0.2), transparent 40%),
    linear-gradient(140deg, #f8f4ef 0%, #f0e6dc 55%, #eee2d5 100%);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(255, 248, 239, 0.9);
  border-bottom: 1px solid rgba(31, 38, 48, 0.09);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.brand strong { display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: 0.85rem; }

.topbar-cta {
  padding: 10px 16px;
  min-width: 146px;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(31, 79, 128, 0.26);
  background: rgba(255, 255, 255, 0.8);
  color: #1f4f80;
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "\25BE";
  font-size: 0.82rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-dropdown summary.menu-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

.nav-dropdown summary.menu-toggle::after {
  content: none;
}

.nav-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 228px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 249, 242, 0.98);
  border: 1px solid rgba(31, 79, 128, 0.16);
  box-shadow: 0 16px 32px rgba(21, 34, 52, 0.16);
  backdrop-filter: blur(8px);
  z-index: 40;
}

.nav-menu a {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #213449;
}

.nav-menu a:hover {
  background: rgba(31, 79, 128, 0.1);
  color: #173b61;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(120deg, var(--brand), #2f659d);
  color: #fff;
}

.btn.ghost {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(255, 255, 255, 0.72);
}

.btn.accent {
  background: linear-gradient(120deg, var(--accent), #df8023);
  color: #fff;
}

.hero {
  padding: 40px 0 22px;
}

.hero h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1;
  margin: 0 0 8px;
}

.hero p {
  margin: 0;
  color: #445162;
  max-width: 75ch;
}

.section {
  padding: 16px 0 20px;
  scroll-margin-top: 88px;
}

.section-head {
  margin: 0 0 10px;
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.section-sub {
  margin: 0 0 12px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(24, 30, 42, 0.08);
  padding: 14px;
  scroll-margin-top: 88px;
}

.service:target,
.section:target {
  border-color: rgba(31, 79, 128, 0.38);
  box-shadow: 0 0 0 4px rgba(31, 79, 128, 0.08), 0 14px 30px rgba(24, 30, 42, 0.12);
}

.service h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.service p {
  margin: 0;
  color: #455163;
  font-size: 0.93rem;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.group-actions {
  margin-top: 18px;
}

.actions .btn {
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.contact {
  padding: 16px 0 56px;
}

.lists {
  padding: 0 0 56px;
}

.site-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.directory-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(247, 240, 233, 0.9));
  box-shadow: 0 10px 24px rgba(31, 38, 48, 0.08);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.directory-item summary {
  list-style: none;
  cursor: default;
  margin: 0;
  font-size: 1rem;
  color: #1d4570;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.directory-item summary::-webkit-details-marker {
  display: none;
}

.directory-panel {
  display: grid;
  gap: 10px;
}

.directory-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.directory-card li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #243140;
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.35;
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.directory-card li a:hover {
  color: #1f4f80;
  border-color: rgba(31, 79, 128, 0.34);
}

.directory-card p {
  margin: 0;
  color: #4f5c6b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.contact-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf2;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.contact-box h2 {
  margin: 0;
  font-size: 1.2rem;
}

.contact-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 248, 240, 0.84);
  padding: 16px 0;
  color: #5a6573;
  font-size: 0.92rem;
}

.footer-row {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: center;
}

.footer-logo {
  width: 210px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.56);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 16px;
}

.modal.active {
  display: flex;
}

.modal-card {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #3c3e43;
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 50px rgba(3, 6, 12, 0.45);
  padding: 16px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.modal-head h3 {
  margin: 0;
  font-size: 2rem;
  font-family: "DM Serif Display", serif;
  line-height: 1;
}

.close-btn {
  border: 0;
  background: transparent;
  color: #f5f7fa;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

.modal-sub {
  margin: 0 0 10px;
  color: #e8edf3;
  font-size: 0.95rem;
}

.modal-label {
  font-weight: 700;
  display: block;
  margin: 0 0 5px;
  font-size: 0.96rem;
}

.modal-input,
.modal-textarea,
.modal-date {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 2px;
  padding: 10px 12px;
  font: inherit;
  color: #111723;
  background: #eef0f3;
  margin-bottom: 10px;
}

.modal-date {
  cursor: pointer;
}

.checks {
  background: #efefef;
  border: 1px solid #d5d5d5;
  border-radius: 2px;
  padding: 12px;
  color: #1f2430;
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.checks-group {
  display: grid;
  gap: 8px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  padding: 8px;
  background: #f7f8fa;
}

.checks-group-title {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4e5866;
  font-weight: 800;
  border-bottom: 1px solid #d8dde5;
  padding-bottom: 3px;
}

.checks-group.electrical {
  border: 1px solid #b5c7df;
  background: linear-gradient(180deg, #eaf2fb, #f4f8fd);
  box-shadow: inset 0 0 0 1px rgba(30, 75, 122, 0.08);
}

.checks-group.electrical .checks-group-title {
  color: #1f4f80;
  border-bottom-color: #bdd0e6;
  font-size: 0.88rem;
}

.checks-group.electrical .checks-grid {
  font-weight: 600;
  color: #213449;
}

.checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.accordion-group {
  overflow: hidden;
}

.accordion-toggle {
  width: 100%;
  border: 1px solid #d8dde5;
  border-radius: 10px;
  background: #ffffff;
  color: #4e5866;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 6px;
  text-align: left;
}

.accordion-toggle::after {
  content: "▸";
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.accordion-group[data-accordion-open="true"] .accordion-toggle::after {
  transform: rotate(90deg);
}

.accordion-panel[hidden] {
  display: none;
}

.checks-group.electrical.accordion-group .accordion-toggle {
  border-color: #bdd0e6;
  color: #1f4f80;
  background: linear-gradient(180deg, #eaf2fb, #f4f8fd);
}

.service-option-card {
  display: block;
  border: 1px solid #dde2ea;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

.service-option-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.service-option-main input {
  margin-top: 4px;
  flex-shrink: 0;
}

.service-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.service-option-copy strong {
  font-size: 0.9rem;
  line-height: 1.25;
  color: #273241;
}

.service-option-desc {
  color: #4b5663;
  font-size: 0.82rem;
  line-height: 1.35;
}

.electrical-scope-note {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #4b5663;
  line-height: 1.35;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .site-directory {
    grid-template-columns: 1fr;
  }
  .topbar-inner {
    align-items: center;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 0.96rem;
  }

  .brand small {
    font-size: 0.8rem;
    line-height: 1.26;
    max-width: 20ch;
  }

  .topbar-cta {
    min-width: 124px;
    padding: 8px 13px;
    font-size: 0.92rem;
  }

  .topbar-actions {
    gap: 8px;
  }

  .nav-dropdown summary {
    padding: 8px 11px;
    font-size: 0.9rem;
  }

  .nav-dropdown summary.menu-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 1.15rem;
  }

  .nav-menu {
    min-width: 205px;
    right: -4px;
  }

  .footer-logo {
    width: 172px;
  }

  .group-actions {
    margin-top: 14px;
  }

  .group-actions .btn {
    flex: 1 1 100%;
  }

  .checks-grid {
    grid-template-columns: 1fr;
  }

  .directory-card {
    padding: 14px;
  }

  .directory-item {
    gap: 0;
  }

  .directory-item summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .directory-item summary::after {
    content: "▾";
    font-size: 0.96rem;
    transition: transform 0.2s ease;
  }

  .directory-item .directory-panel {
    max-height: 700px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.22s ease;
  }

  .directory-item:not([open]) .directory-panel {
    max-height: 0;
    opacity: 0;
  }

  .directory-item:not([open]) summary::after {
    transform: rotate(-90deg);
  }
}
