/* ===============================
   DESIGN SYSTEM
================================ */
:root {
  --bg-main: #f7f8f9;
  --bg-alt: #ffffff;
  --border: #d6d9dd;

  --text-main: #1f2933;
  --text-muted: #4b5563;

  --primary: #243447;
  --primary-soft: #2f445e;

  --radius: 6px;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-main);
}

/* ===============================
   LAYOUT
================================ */
.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

/* ===============================
   HEADER
================================ */
.site-header {
  background: #f4ebdc;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
}

/* ===============================
   LOGO
================================ */
.logo {
  display: flex;
  align-items: center;
  line-height: 1;
}

.logo img {
  height: 34px;       /* key change */
  width: auto;
  display: block;
}




/* ===============================
   NAV (DESKTOP)
================================ */

/* ===============================
   NAV LINK RESET (IMPORTANT)
================================ */
.nav-list a,
.nav-list a:visited,
.nav-list a:hover,
.nav-list a:active,
.nav-list a:focus {
  color: var(--text-main);
  text-decoration: none;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  position: relative;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  border-radius: 3px; /* very subtle */
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-list a:hover {
    background-color: rgba(0, 0, 0, 0.06);
  }
}

.nav-toggle {
  display: none;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  font-size: 1.3rem;
  color: var(--primary);
  cursor: pointer;
}

/* ===============================
   HERO
================================ */

/* Eyebrow */
.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.75rem;
}


.hero {
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.15);
  background: linear-gradient(
    180deg,
    #1f2f45 0%,
    #243447 100%
  );
  color: #ffffff;
  padding: 5rem 0 5rem;
}

/* Title */
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: #ffffff;
}

/* Subtitle */
.hero .lead {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 680px;
  color: rgba(255,255,255,0.85);
}


.hero .container {
  max-width: 1000px;
}

.hero h1 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: #ffffff;
}

.hero .lead {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.6;
  max-width: 720px;
  color: rgba(255,255,255,0.75);
}


/* ===============================
   SECTIONS
================================ */

/* ===============================
   STRUCTURE SECTION – IMAGE LAYOUT
================================ */

/* ===============================
   STRUCTURE IMAGE – RESPONSIVE
================================ */

.structure-image-wrapper {
  width: 100%;
  overflow-x: auto;          /* allows full diagram access */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.structure-image-wrapper img {
  display: block;
  max-width: 100%;
  height: auto;
  min-width: 720px;          /* prevents unreadable shrink */
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}


/* Image container */
.structure-image img {
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  background: #ffffff;
}


#about {
  padding-top: 1.75rem;
}

.section .container {
  max-width: 920px;
}

.section p {
  max-width: 760px;
  margin-bottom: 1.25rem;
}

.section ul {
  margin-top: 0.75rem;
  padding-left: 1.1rem;
}

.section li {
  margin-bottom: 0.5rem;
}

.section.alt {
  background: #fbfbfc;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.section h2 {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.section h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: rgba(36, 52, 71, 0.25);
  margin-top: 0.5rem;
}

.section {
  padding: 3rem 0;
}

.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ===============================
   LAWS DATABASE – DOWNLOAD LIST
================================ */

.laws-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  max-width: 720px;
}

.laws-list li {
  margin-bottom: 0.75rem;
}

.laws-list a {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.laws-list a:hover {
  background: #f5f7fa;
  border-color: rgba(36, 52, 71, 0.3);
}

/* Title */
.law-title {
  font-weight: 500;
  color: var(--text-main);
}

/* Meta */
.law-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}


/* ===============================
   MOBILE MENU (FIXED, FULL WIDTH)
================================ */
@media (max-width: 767px) {

  .nav-toggle {
    display: inline-block;
  }

  .nav-list {
    position: fixed;
    top: 72px; /* header height */
    left: 0;
    right: 0;

    flex-direction: column;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);

    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;

    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  .nav-list.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-list li {
    border-bottom: 1px solid var(--border);
  }

  .nav-list a {
    padding: 1.1rem 1.5rem;
    font-size: 1rem;
    display: block;
  }

  .nav-list a:hover {
    background: #f1f3f5;
  }
}

/* ===============================
   CONTACT FORM – FINAL LAYOUT FIX
================================ */

#contact form {
  max-width: 760px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.05);
}

/* Sections */
.form-section {
  margin-bottom: 1.75rem;
}

/* Identity grid */
.form-identity .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem 1.25rem;
}

/* Inputs */
#contact input,
#contact textarea {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border-radius: 5px;
  border: 1px solid #cfd6de;
  background: #ffffff;
}

/* Focus */
#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 52, 71, 0.12);
}

/* Subject full width */
.form-section > input {
  max-width: 420px;
}

/* Message */
#contact textarea {
  min-height: 150px;
  resize: vertical;
}

/* Consent */
.form-consent {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Actions */
.form-actions {
  margin-top: 2rem;
}

button[type="submit"] {
  background: linear-gradient(180deg, #2f3f55, #243447);
  color: #ffffff;
  border: 1px solid #1e2a3a;
  padding: 0.75rem 2.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: 
    background 0.25s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

button[type="submit"]:hover {
  background: linear-gradient(180deg, #354a63, #2a3b52);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.contact-footer {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-footer strong {
  color: var(--text-main);
  font-weight: 600;
}

.contact-email a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-email a:hover {
  text-decoration: underline;
}

.site-footer {
  background: linear-gradient(180deg, #2f3f55, #243447);
  color: #e5e7eb;
  font-size: 0.85rem;
  padding: 0.9rem 0;
}

.site-footer .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  text-align: center;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
}

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

/* Mobile */
@media (max-width: 767px) {
  .form-identity .form-grid {
    grid-template-columns: 1fr;
  }

  .form-section > input {
    max-width: 100%;
  }

  button[type="submit"] {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .structure-image-wrapper::after {
    content: "← swipe to view full diagram →";
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
  }
}