:root {
  color-scheme: light;
  --ink: #10201f;
  --muted: #5e6d69;
  --line: #d9e3df;
  --paper: #f6f8f5;
  --white: #ffffff;
  --field: #eaf2eb;
  --canopy: #276749;
  --canopy-dark: #173f35;
  --sky: #3b7ea1;
  --amber: #d79b42;
  --shadow: 0 20px 60px rgba(16, 32, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.auth-locked .site-shell,
body.auth-locked .photo-viewer {
  display: none;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(16, 32, 31, 0.82), rgba(23, 63, 53, 0.54)),
    url("assets/photos/mapbackground.png") center / cover;
}

.gate-panel {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.gate-panel h1,
.hero-content h1,
.section-heading h2,
.closing-band h2 {
  margin: 0;
  letter-spacing: 0;
}

.gate-panel h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.98;
}

.gate-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--canopy);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
}

button,
.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--canopy);
  color: var(--white);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--white);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: #a33321;
  font-weight: 700;
}

.site-shell {
  min-height: 100vh;
}

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(90deg, rgba(16, 32, 31, 0.88), rgba(16, 32, 31, 0.28)),
    url("assets/photos/mapbackground.png") center / cover;
  color: var(--white);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: 42px;
  max-width: min(210px, 50vw);
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 750;
}

.nav-links a {
  text-decoration: none;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 0 104px;
}

.hero-content .eyebrow {
  color: #bfe7c9;
}

.hero-content h1 {
  max-width: 980px;
  font-size: clamp(2.55rem, 8vw, 6.6rem);
  line-height: 0.96;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.metrics-band {
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.metrics-band article {
  min-height: 118px;
  padding: 22px;
  background: var(--white);
  border-right: 1px solid var(--line);
}

.metrics-band article:last-child {
  border-right: 0;
}

.metrics-band strong {
  display: block;
  color: var(--canopy-dark);
  font-size: 2rem;
}

.metrics-band span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 0;
}

.section-heading {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.closing-band h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.section-heading p,
.closing-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.briefing-grid,
.walkthrough-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.resource-card,
.video-card,
.image-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.resource-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(16, 32, 31, 0.12);
}

.resource-card span,
.image-card span {
  width: max-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--field);
  color: var(--canopy-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.resource-card h3,
.image-card h3,
.video-card h3 {
  margin: 0;
  font-size: 1.28rem;
}

.resource-card p,
.image-card p,
.video-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

.image-card {
  display: grid;
}

.image-card.large {
  grid-row: span 2;
}

.image-card img {
  width: 100%;
  height: 270px;
  object-fit: cover;
}

.image-card.large img {
  height: 520px;
}

.north-up-photo {
  transform: rotate(var(--photo-rotation, 0deg)) scale(1.24);
  transform-origin: center;
}

.image-card div {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.walkthrough-section {
  padding-bottom: 24px;
}

.map-section {
  padding-top: 88px;
}

.map-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(16, 32, 31, 0.1);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.map-toolbar div {
  display: grid;
  gap: 4px;
}

.map-toolbar strong {
  font-size: 1rem;
}

.map-toolbar span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.map-toolbar button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.map-toolbar button:disabled {
  cursor: default;
  opacity: 0.76;
}

.map-toolbar button[aria-pressed="true"] {
  background: var(--amber);
  color: var(--ink);
}

.engagement-map {
  width: 100%;
  height: min(72vh, 720px);
  min-height: 520px;
  background: #cad7d0;
}

.photo-marker {
  display: grid;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 6px 16px rgba(16, 32, 31, 0.42);
}

.photo-marker span {
  width: 8px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--canopy-dark);
}

.map-popup {
  display: grid;
  gap: 8px;
  width: 230px;
}

.map-popup-image {
  width: 100%;
  height: 132px;
  overflow: hidden;
  border-radius: 6px;
  background: #dce8e2;
}

.map-popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-popup strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.map-popup span {
  color: var(--muted);
  font-size: 0.8rem;
}

.map-popup a {
  color: var(--canopy);
  font-weight: 850;
  text-decoration: none;
}

.leaflet-popup-content {
  margin: 12px;
}

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

.video-card {
  position: relative;
  min-width: 0;
}

.video-card img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  object-position: top center;
  background: #dce8e2;
}

.video-card h3,
.video-card p {
  padding-inline: 18px;
}

.video-card h3 {
  padding-top: 18px;
}

.video-card p {
  padding-bottom: 22px;
  padding-top: 8px;
}

.play-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(16, 32, 31, 0.86);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 900;
}

.closing-band {
  width: min(1180px, calc(100% - 32px));
  margin: 72px auto 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border-radius: 8px;
  background: var(--canopy-dark);
  color: var(--white);
}

.closing-band p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.photo-viewer-page {
  background: #08110f;
  color: var(--white);
}

.photo-viewer {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.photo-viewer-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: rgba(8, 17, 15, 0.92);
}

.photo-viewer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-viewer-frame {
  min-height: 0;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050908;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.photo-viewer-frame:active {
  cursor: grabbing;
}

.photo-viewer-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.photo-viewer-caption {
  margin: 0;
  padding: 12px 18px 18px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 640px) {
  .photo-viewer-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-viewer-actions {
    width: 100%;
  }

  .photo-viewer-actions button,
  .photo-viewer-actions .secondary-button {
    flex: 1;
  }
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    padding: 18px 0;
  }

  .nav-links {
    display: none;
  }

  .metrics-band,
  .briefing-grid,
  .showcase-grid,
  .walkthrough-grid {
    grid-template-columns: 1fr 1fr;
  }

  .image-card.large {
    grid-column: 1 / -1;
  }

  .closing-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .password-row,
  .metrics-band,
  .briefing-grid,
  .showcase-grid,
  .walkthrough-grid {
    grid-template-columns: 1fr;
  }

  .gate-panel {
    padding: 24px;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-content {
    padding-bottom: 92px;
  }

  .metrics-band {
    margin-top: -36px;
  }

  .metrics-band article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics-band article:last-child {
    border-bottom: 0;
  }

  .image-card.large img,
  .image-card img {
    height: 280px;
  }

  .video-card img {
    height: 420px;
  }

  .engagement-map {
    height: 70vh;
    min-height: 430px;
  }

  .map-toolbar button {
    width: 100%;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
