:root {
  --ink: #171817;
  --muted: #62655f;
  --line: #d8d2c4;
  --paper: #f4efe4;
  --panel: #fffaf0;
  --moss: #2f6047;
  --moss-dark: #173c2c;
  --gold: #d39c3f;
  --clay: #9c4f34;
  --sky: #d8e8ee;
  --shadow: 0 20px 60px rgba(23, 24, 23, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(244, 239, 228, 0.9);
  border-bottom: 1px solid rgba(23, 24, 23, 0.12);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.input-row,
.portal-topline,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--moss);
  border-radius: 8px;
  letter-spacing: 0;
}

.nav-links {
  gap: 26px;
  color: var(--muted);
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 8vh 5vw;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 17, 20, 0.94) 0%, rgba(8, 17, 20, 0.72) 36%, rgba(8, 17, 20, 0.18) 76%),
    image-set(
      url("/assets/commission-background.webp") type("image/webp"),
      url("/assets/commission-background.png") type("image/png")
    ) center center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18vh;
  background: linear-gradient(0deg, var(--paper), rgba(244, 239, 228, 0));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  font-size: 1.2rem;
}

.hero-text {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.18rem;
  line-height: 1.7;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button,
.icon-button,
.text-button,
.map-card {
  cursor: pointer;
}

.button,
.icon-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
}

.button.primary {
  color: #fff;
  background: var(--clay);
}

.button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.button.full {
  width: 100%;
  margin-top: 10px;
}

.section {
  padding: 92px 5vw;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 36px;
}

.process-grid,
.map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.process-grid article,
.portal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.process-grid article {
  padding: 28px;
}

.process-grid span {
  color: var(--clay);
  font-weight: 900;
}

.process-grid p,
.map-card small,
.portal-info p,
.muted,
.status,
.requests {
  color: var(--muted);
  line-height: 1.65;
}

.maps-section {
  background: var(--sky);
}

.map-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.map-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.82);
  border: 1px solid rgba(23, 24, 23, 0.14);
  border-radius: 8px;
}

.map-card:hover,
.map-card.selected {
  border-color: var(--moss);
  box-shadow: 0 16px 40px rgba(47, 96, 71, 0.16);
}

.map-card span {
  color: var(--moss);
  font-weight: 900;
  text-transform: uppercase;
}

.map-card strong {
  display: block;
  font-size: 1.25rem;
}

.portal-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
  gap: 42px;
  align-items: start;
}

.portal-info {
  position: sticky;
  top: 96px;
}

.portal-panel {
  padding: 28px;
}

.portal-state {
  display: grid;
  gap: 12px;
}

.hidden {
  display: none;
}

label {
  font-size: 0.9rem;
  font-weight: 900;
}

.input-row {
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(47, 96, 71, 0.16);
}

.icon-button {
  min-width: 92px;
  padding: 0 16px;
  color: #fff;
  background: var(--moss);
}

.text-button {
  padding: 0;
  color: var(--clay);
  background: none;
  border: 0;
  font-weight: 900;
}

.portal-topline {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

#request-form {
  display: grid;
  gap: 12px;
}

.requests h3 {
  margin: 24px 0 10px;
  color: var(--ink);
}

.request-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.request-item strong {
  display: block;
  color: var(--ink);
}

.status {
  min-height: 24px;
  margin: 18px 0 0;
  font-weight: 800;
}

.site-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 28px 5vw;
  color: rgba(255, 255, 255, 0.8);
  background: var(--moss-dark);
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .hero {
    min-height: 760px;
    align-items: flex-end;
    background:
      linear-gradient(0deg, rgba(8, 17, 20, 0.94) 0%, rgba(8, 17, 20, 0.66) 52%, rgba(8, 17, 20, 0.16) 100%),
      image-set(
        url("/assets/commission-background.webp") type("image/webp"),
        url("/assets/commission-background.png") type("image/png")
      ) center / cover no-repeat;
  }

  .process-grid,
  .map-grid,
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-info {
    position: static;
  }
}

@media (max-width: 560px) {
  .site-header,
  .section,
  .hero,
  .site-footer {
    padding-left: 22px;
    padding-right: 22px;
  }

  h1 {
    font-size: 3.1rem;
  }

  .portal-panel {
    padding: 20px;
  }

  .input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .icon-button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
