/* HAMRA — modern layout (home + optional reuse on inner pages) */
:root {
  --color-bg: #f4efe6;
  --color-bg-card: #fff;
  --color-ink: #1a2332;
  --color-muted: #5c6573;
  --color-olive: #3d4a24;
  --color-olive-light: #4c5b2a;
  --color-blue: #203972;
  --color-blue-hover: #2d4f8f;
  --color-sand: #e7d2b6;
  --color-cream: #f5f0e6;
  --font-sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(26, 35, 50, 0.08);
  --max-width: 1100px;
  --focus-ring: 2px solid var(--color-blue);
  --focus-offset: 2px;
  --prose-max-width: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--color-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-blue-hover);
}

a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.site-header a:focus-visible,
.site-brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--color-sand);
  outline-offset: 3px;
}

.link-chips a:focus-visible {
  outline-color: var(--color-blue);
  outline-offset: 2px;
}

.nav-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-blue);
  color: #fff;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

.skip-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.site-header {
  position: relative;
  overflow-x: hidden;
  color: #fff;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.07) 0%,
      transparent 42%
    ),
    linear-gradient(145deg, #556b3a 0%, var(--color-olive-light) 38%, var(--color-olive) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(32, 57, 114, 0.12),
    0 12px 40px rgba(26, 35, 50, 0.18);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem 1.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1.15rem 1.35rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.site-brand:hover .site-brand__title,
.site-brand--split:hover .site-brand__title {
  color: var(--color-cream);
}

.site-brand:hover .site-brand__logo-wrap,
.site-brand--split:hover .site-brand__logo-wrap {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.site-brand__logo-wrap {
  flex-shrink: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.site-brand img {
  display: block;
  width: 148px;
  max-height: 82px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(61, 74, 36, 0.35);
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.site-brand__title {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--color-cream);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: color 0.2s ease;
}

.site-brand__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.28rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

a.site-brand__tag {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.site-brand__tag:hover {
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

a.site-brand__tag[aria-current="page"] {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
  cursor: default;
}

a.site-brand__tag[aria-current="page"]:hover {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.site-brand__home {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  border-radius: 14px;
}

.site-brand__title-link {
  text-decoration: none;
  color: inherit;
  align-self: flex-start;
}

.site-brand--split {
  cursor: default;
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  justify-content: flex-end;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    width: 100%;
    display: none;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    display: block;
    padding: 0.6rem 0.75rem;
  }
}

.hero {
  display: flex;
  flex-direction: column;
  background: var(--color-olive);
}

.hero__photo {
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
}

.hero__photo img {
  width: 100%;
  max-height: min(52vh, 560px);
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1.75rem;
  width: 100%;
  background: linear-gradient(
    180deg,
    #3d4a24 0%,
    #2d361b 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.hero p {
  margin: 0;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}

.layout-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.35rem 1.25rem 2.5rem;
}

.lead-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(32, 57, 114, 0.08);
}

.lead-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--color-blue);
}

.lead-card p:last-child {
  margin-bottom: 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.figure-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(32, 57, 114, 0.08);
}

.figure-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.figure-card figcaption {
  padding: 1rem 1.1rem 1.15rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.figure-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-ink);
}

.links-panel {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(32, 57, 114, 0.08);
}

.links-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--color-blue);
}

.link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-chips a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  background: var(--color-sand);
  color: var(--color-blue);
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid rgba(32, 57, 114, 0.12);
}

.link-chips a:hover {
  background: #fff;
  border-color: var(--color-blue);
}

.map-section {
  margin-top: 0.5rem;
}

.map-section h2 {
  font-size: 1.15rem;
  color: var(--color-blue);
  margin-bottom: 0.75rem;
}

.map-section .map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(32, 57, 114, 0.1);
  background: #fff;
}

.map-section img {
  width: 100%;
  display: block;
}

.join-panel {
  margin-bottom: 2rem;
}

.join-panel__inner {
  background: linear-gradient(
    145deg,
    rgba(61, 74, 36, 0.07) 0%,
    rgba(255, 255, 255, 0.92) 42%,
    rgba(32, 57, 114, 0.06) 100%
  );
  border: 1px solid rgba(61, 74, 36, 0.14);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.join-panel h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--color-olive);
  font-weight: 700;
}

.join-panel__inner > p {
  margin: 0 0 0.85rem;
  color: var(--color-ink);
  max-width: 40rem;
  line-height: 1.58;
}

.join-panel__inner > p:last-child {
  margin-bottom: 0;
}

.join-panel__actions {
  margin-top: 1.1rem;
}

.join-panel .join-panel__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.58rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: #fff;
  background: var(--color-blue);
  border-radius: 999px;
  border: 1px solid rgba(32, 57, 114, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.join-panel .join-panel__cta:hover {
  background: var(--color-blue-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(32, 57, 114, 0.22);
}

.join-panel .join-panel__cta:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.site-footer {
  background: var(--color-blue);
  color: rgba(255, 255, 255, 0.88);
  padding: 2rem 1.25rem;
  margin-top: 1rem;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
}

.site-footer a {
  color: var(--color-sand);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-copy {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.95);
}

.credits {
  font-size: 0.75rem;
  line-height: 1.55;
  opacity: 0.85;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  margin-top: 0;
}

.credits a {
  color: #fff;
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

.site-footer a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
}

.page-hero {
  background: linear-gradient(165deg, var(--color-olive-light) 0%, var(--color-olive) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0.7rem;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3.5vw, 1.95rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}

.page-content {
  max-width: 100%;
}

.page-content > p,
.page-content > ol,
.page-content > ul,
.page-content > blockquote,
.page-content > h2,
.page-content > .note-muted {
  max-width: var(--prose-max-width);
}

.page-content > .contact-form {
  max-width: var(--prose-max-width);
}

.page-content h2 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.1rem;
  color: var(--color-blue);
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  margin: 0 0 1rem;
  text-align: left;
}

.page-content p:last-child {
  margin-bottom: 0;
}

.page-content ol,
.page-content ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--color-sand);
  background: rgba(231, 210, 182, 0.35);
  font-style: normal;
}

.page-content blockquote p:last-child {
  margin-bottom: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.5rem 0 1rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(32, 57, 114, 0.12);
  vertical-align: top;
}

.data-table th {
  background: rgba(32, 57, 114, 0.07);
  font-weight: 700;
  color: var(--color-blue);
}

.data-table tbody tr:hover td {
  background: rgba(231, 210, 182, 0.2);
}

.data-table .num {
  width: 3rem;
  white-space: nowrap;
}

.data-table .doc {
  text-align: center;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(32, 57, 114, 0.1);
  border-radius: var(--radius);
  background: rgba(32, 57, 114, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.page-content > .table-scroll {
  max-width: none;
}

.downloads-panel {
  position: relative;
}

.page-content > .downloads-intro {
  max-width: var(--prose-max-width);
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.downloads-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.downloads-tabs__tab {
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid rgba(32, 57, 114, 0.22);
  background: var(--color-sand);
  color: var(--color-blue);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.downloads-tabs__tab:hover {
  background: #fff;
  border-color: var(--color-blue);
}

.downloads-tabs__tab[aria-selected="true"],
.downloads-tabs__tab.is-active {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
}

.downloads-tabs__tab:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.downloads-tabs__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.downloads-panel .data-table tbody tr.downloads-row--highlight td {
  background: rgba(231, 210, 182, 0.45);
  box-shadow: inset 0 0 0 2px var(--color-blue);
}

.downloads-panel .data-table tbody tr.downloads-row--highlight:hover td {
  background: rgba(231, 210, 182, 0.55);
}

.downloads-panel .data-table tbody tr[id] {
  scroll-margin-top: 1rem;
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
}

.content-table th,
.content-table td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(32, 57, 114, 0.1);
  vertical-align: top;
}

.content-table th {
  font-weight: 700;
  color: var(--color-blue);
  border-bottom-width: 2px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.map-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form {
  margin-top: 1rem;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

@media (max-width: 520px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

.contact-form label {
  font-weight: 600;
  font-size: 0.92rem;
  padding-top: 0.35rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  max-width: 28rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(32, 57, 114, 0.25);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form input[type="text"]:focus-visible,
.contact-form input[type="email"]:focus-visible,
.contact-form input[type="tel"]:focus-visible,
.contact-form textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(32, 57, 114, 0.12);
}

.contact-form textarea {
  min-height: 7rem;
  resize: vertical;
}

.contact-form .req {
  color: #a33;
  font-weight: 700;
}

.contact-form .form-actions {
  margin-top: 1.25rem;
}

.contact-form button[type="submit"] {
  padding: 0.65rem 1.45rem;
  min-height: 2.75rem;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 8px;
  border: none;
  background: var(--color-blue);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.contact-form button[type="submit"]:hover {
  background: var(--color-blue-hover);
}

.contact-form button[type="submit"]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  box-shadow: 0 0 0 3px rgba(32, 57, 114, 0.12);
}

.local-bridge-photo {
  margin-top: 1rem;
}

.local-bridge-photo__img {
  display: block;
  width: 100%;
  max-height: 320px;
  border-radius: 8px;
  object-fit: cover;
}

.note-muted {
  font-size: 0.9rem;
  color: var(--color-muted);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-brand__logo-wrap,
  .site-brand__title,
  .site-nav a,
  .nav-toggle,
  .link-chips a,
  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form input[type="tel"],
  .contact-form textarea,
  .contact-form button[type="submit"],
  .downloads-tabs__tab,
  .join-panel .join-panel__cta {
    transition: none;
  }

  .site-brand:hover .site-brand__logo-wrap,
  .site-brand--split:hover .site-brand__logo-wrap {
    transform: none;
  }

  .skip-link {
    transition: none;
  }
}
