:root {
  --charcoal: #1C1B18;
  --charcoal-dark: #12110F;
  --canvas: #EFE9DA;
  --canvas-card: #F7F3E9;
  --rust: #C1502E;
  --rust-hover: #A8431F;
  --pine: #31402C;
  --stone: #6B6459;
  --stone-light: #C9C2B0;
  --flag: #D9A441;
  --whatsapp: #25D366;
  --whatsapp-hover: #1EBE5B;
  --line: rgba(239, 233, 218, 0.18);
  --line-dark: rgba(28, 27, 24, 0.14);
}

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

html {
  scroll-behavior: smooth;
  max-width: 100vw;
  overflow-x: hidden;
  font-size: 15px; /* Compact base scale */
}

body {
  background: var(--canvas);
  color: var(--charcoal);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 100vw;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, .display {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  word-break: break-word;
  overflow-wrap: break-word;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  word-break: break-word;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* ---------- NAVIGATION ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5vw;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

nav.solid {
  background: rgba(28, 27, 24, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 5vw;
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand img {
  height: 36px;
  width: auto;
  transition: height 0.3s ease;
}

nav.solid .nav-brand img {
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--canvas);
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--flag);
}

.nav-links a.nav-phone {
  color: var(--flag);
  font-weight: 500;
  opacity: 1;
  border: 1px solid rgba(217, 164, 65, 0.4);
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 0.68rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-links a.nav-phone:hover {
  background: rgba(217, 164, 65, 0.15);
  border-color: var(--flag);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--canvas);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ---------- TOP BANNER ---------- */
.top-banner {
  position: relative;
  background: linear-gradient(115deg, #0E2A33 0%, #163526 55%, #1C2B1A 100%);
  padding: 55px 5vw 16px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.top-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(217, 164, 65, 0.15), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(193, 80, 46, 0.12), transparent 45%);
  pointer-events: none;
}

.top-banner .brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.top-banner .brand-badge img {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.35));
}

.top-banner .tagline {
  position: relative;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  color: #FFFF;
  margin-top: 240px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(193, 80, 46, 0.2), transparent 55%),
    linear-gradient(180deg, #12110F 0%, #23211C 55%, var(--charcoal) 100%);
  overflow: hidden;
}

.contour-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.28;
  pointer-events: none;
}

.peaks {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 26px 5vw 36px;
}

.eyebrow-mono {
  color: var(--flag);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.eyebrow-mono::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--flag);
}

.hero h1 {
  color: var(--canvas);
  font-size: clamp(1.7rem, 3.8vw, 3rem);
  line-height: 1.06;
  font-weight: 700;
  max-width: 18ch;
}

.hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--canvas);
}

.hero-sub {
  color: var(--stone-light);
  font-size: clamp(0.82rem, 1.1vw, 0.94rem);
  max-width: 50ch;
  margin: 14px 0 22px;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--rust);
  color: var(--canvas);
  padding: 9px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  font-weight: 500;
  white-space: nowrap;
}

.btn:hover {
  background: var(--rust-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(193, 80, 46, 0.3);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--canvas);
}

.btn-ghost:hover {
  background: rgba(239, 233, 218, 0.08);
  border-color: var(--canvas);
  box-shadow: none;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #FFFFFF;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* Stats Readout (Compact scale) */
.readout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(18, 17, 15, 0.75);
  backdrop-filter: blur(4px);
  width: 100%;
}

.readout div {
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.readout div:last-child {
  border-right: none;
}

.readout .num {
  color: var(--flag);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

.readout .lbl {
  color: #9C9587;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'JetBrains Mono', monospace;
  display: block;
  line-height: 1.3;
}

/* ---------- SUMMARY CALLOUT ---------- */
.summary {
  background: var(--canvas);
  padding: 42px 5vw 32px;
  text-align: center;
}

.summary .callout {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.3;
  max-width: 32ch;
  margin: 0 auto 10px;
  color: var(--charcoal);
  text-transform: none;
  letter-spacing: 0;
}

.summary .callout em {
  font-style: normal;
  color: var(--rust);
}

.summary p.sub {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--stone);
  font-size: 0.86rem;
  line-height: 1.6;
}

/* ---------- SECTION SHELL ---------- */
section {
  padding: 48px 5vw;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.section-head .tag {
  color: var(--rust);
  font-size: 0.68rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.section-head .tag::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--rust);
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  max-width: 16ch;
  line-height: 1.1;
}

.section-head p {
  max-width: 40ch;
  color: var(--stone);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ---------- PERMIT CARDS (Circuits & Packages) ---------- */
.expeditions {
  background: var(--canvas);
}

.permit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}

.permit {
  position: relative;
  background: var(--canvas-card);
  border: 1px solid var(--line-dark);
  border-top: 2.5px solid var(--pine);
  border-radius: 3px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.permit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(28, 27, 24, 0.08);
}

.permit .route-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  color: var(--stone);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(28, 27, 24, 0.16);
  padding-bottom: 8px;
}

.permit .route-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.permit h3 {
  font-size: 1.15rem;
  margin-bottom: 3px;
  color: var(--charcoal);
  line-height: 1.2;
}

.permit .region {
  color: var(--rust);
  font-size: 0.68rem;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.permit-stats {
  display: flex;
  gap: 12px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
  padding: 6px 0;
  border-top: 1px solid rgba(28, 27, 24, 0.08);
  border-bottom: 1px solid rgba(28, 27, 24, 0.08);
}

.permit-stats div {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--stone);
}

.permit-stats strong {
  display: block;
  color: var(--charcoal);
  font-size: 0.86rem;
}

.permit p.desc {
  font-size: 0.8rem;
  color: var(--stone);
  line-height: 1.45;
  margin-bottom: 12px;
  flex-grow: 1;
}

.permit .stamp {
  border: 1px solid var(--pine);
  color: var(--pine);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.52rem;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-weight: 500;
}

.permit-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--charcoal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 1px;
  align-self: flex-start;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.2s ease;
}

.permit-link:hover {
  color: var(--rust);
  border-color: var(--rust);
  gap: 9px;
}

/* ---------- ABOUT SECTION ---------- */
.about {
  background: var(--charcoal);
  color: var(--canvas);
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}

.about h2 {
  color: var(--canvas);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.1;
  margin-bottom: 14px;
}

.about p {
  color: #C9C2B0;
  line-height: 1.6;
  font-size: 0.86rem;
  margin-bottom: 12px;
  max-width: 50ch;
}

.founder-line {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--flag);
  letter-spacing: 0.03em;
}

.about-figures {
  display: flex;
  flex-direction: column;
}

.fig {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.fig:first-child {
  padding-top: 0;
}

.fig .num {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  color: var(--rust);
  font-weight: 600;
  line-height: 1;
}

.fig .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: #9C9587;
  text-align: right;
  max-width: 24ch;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

/* ---------- GALLERY / FIELD NOTES ---------- */
.gallery {
  background: var(--canvas);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: calc(15vw - 3.33px) calc(25vw - 1.39px) calc(15vw - 3.33px);
  gap: 10px;
  width: 100%;
}

.gallery .section-head {
  align-items: start;
}

.gallery .section-head > p {
  max-width: 330px;
  justify-self: end;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  height: 100%;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--charcoal-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.20) 60%, transparent);
  pointer-events: none;
}

.tile-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.tile:hover .tile-media,
.tile:focus-visible .tile-media {
  transform: scale(1.04);
}

.tile .tile-label {
  position: relative;
  z-index: 2;
  color: var(--canvas);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile .tile-label .name {
  font-family: 'Oswald', sans-serif;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.tile .tile-label .coord {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--flag);
  opacity: 0.95;
  line-height: 1.15;
}

.tile .tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(28, 27, 24, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line);
  color: var(--canvas);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.52rem;
  padding: 2px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tile-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tile:hover .tile-art {
  opacity: 0.75;
  transform: scale(1.02);
}

/* Editorial order: three cards, two-card feature row, three cards. */
.tile.d { grid-column: span 2; }

/* Keep the wide palace card as an undistorted landscape image. */
.tile.d .tile-media {
  object-fit: cover;
  object-position: center 42%;
}

/* ---------- CONTACT / FOOTER ---------- */
footer {
  background: #161510;
  color: var(--canvas);
  padding: 50px 5vw 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

footer h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--canvas);
  max-width: 14ch;
  line-height: 1.1;
  margin-bottom: 12px;
}

footer p.lead {
  color: #9C9587;
  max-width: 44ch;
  line-height: 1.5;
  margin-bottom: 16px;
  font-size: 0.84rem;
}

.contact-direct {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coords {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: #8C8477;
  line-height: 1.5;
  word-break: break-word;
}

.coords a {
  color: var(--flag);
}

.coords a:hover {
  text-decoration: underline;
}

/* Contact Form */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.form-highlight {
  animation: formPulse 1.2s ease-in-out;
}

@keyframes formPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.015); box-shadow: 0 0 20px rgba(217, 164, 65, 0.25); }
  100% { transform: scale(1); }
}

form input, form select, form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--canvas);
  padding: 8px 4px;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.86rem;
  width: 100%;
  border-radius: 0;
  transition: border-color 0.25s ease;
}

form select option {
  background: #1C1B18;
  color: var(--canvas);
}

form input::placeholder, form textarea::placeholder {
  color: #6B6459;
}

form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--flag);
}

form textarea {
  resize: vertical;
  min-height: 65px;
}

.hp-field {
  display: none !important;
  visibility: hidden !important;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

#formStatus {
  min-height: 1.2em;
  font-size: 0.74rem;
  line-height: 1.4;
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.foot-bottom .logo img {
  height: 26px;
  width: auto;
}

.foot-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.foot-links a, .foot-links button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: #9C9587;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.foot-links a:hover, .foot-links button:hover {
  color: var(--flag);
}

/* ---------- MODAL DIALOGS ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 17, 15, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--charcoal);
  border: 1px solid var(--line);
  color: var(--canvas);
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  padding: clamp(16px, 3.5vw, 24px);
  border-radius: 4px;
  position: relative;
  transform: translateY(14px);
  transition: transform 0.25s ease;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.modal-image {
  width: calc(100% + clamp(32px, 7vw, 48px));
  height: clamp(170px, 32vw, 250px);
  object-fit: cover;
  margin: calc(clamp(16px, 3.5vw, 24px) * -1) calc(clamp(16px, 3.5vw, 24px) * -1) 18px;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--stone-light);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 3px 6px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--flag);
}

.modal-card h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  color: var(--canvas);
  padding-right: 24px;
}

.modal-card .modal-meta {
  color: var(--flag);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.modal-card p {
  color: #C9C2B0;
  font-size: 0.84rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* Focus Visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 2px;
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
/* Tablets & Laptops <= 1024px */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, calc(22.5vw - 2.5px));
  }
  .tile.d {
    grid-column: span 1;
  }
}

/* Medium Tablets & Mobile <= 860px */
@media (max-width: 860px) {
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .readout {
    grid-template-columns: repeat(2, 1fr);
  }
  .readout div:nth-child(2) {
    border-right: none;
  }
  .readout div:nth-child(1), .readout div:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, calc(22.5vw - 2.5px));
  }
  .tile.d {
    grid-column: span 1;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 240px;
    background: var(--charcoal);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 28px;
    gap: 18px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.5);
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-toggle {
    display: block;
    z-index: 110;
  }
  section {
    padding: 42px 5vw;
  }
  .hero-inner {
    padding: 22px 5vw 30px;
  }
}

/* Mobile Screens <= 640px */
@media (max-width: 640px) {
  .top-banner {
    padding: 50px 5vw 14px;
  }
  .readout div {
    padding: 10px 12px;
  }
  .permit-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, clamp(200px, 55vw, 240px));
  }
  .tile, .tile.d {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .section-head {
    margin-bottom: 22px;
    gap: 12px;
  }
  .section-head h2 {
    font-size: clamp(1.3rem, 5.5vw, 1.7rem);
  }
  footer {
    padding: 42px 5vw 20px;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

/* Extra Small Mobile <= 400px */
@media (max-width: 400px) {
  nav {
    padding: 8px 4vw;
  }
  .nav-brand img {
    height: 24px;
  }
  .hero h1 {
    font-size: clamp(1.5rem, 8vw, 2.1rem);
  }
  .btn {
    padding: 8px 16px;
    font-size: 0.7rem;
  }
  .permit {
    padding: 14px 12px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
