:root {
  --green: #0e260c;
  --cream: #f5f2ec;
  --ink: #131811;
}

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

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- header ---- */
.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px 28px;
}

.wordmark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.05em; /* the -50 tracking */
  color: var(--green);
  white-space: nowrap;
}

/* the finder sentence: i'm looking for [a photographer ▾] up north */
.finder {
  margin: 0 auto;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--green);
  white-space: nowrap;
}

.finder-select {
  position: relative;
  display: inline-block;
}

#who {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--green);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--green);
  border-radius: 0;
  padding: 0 18px 2px 2px;
  cursor: pointer;
}

#who:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.finder-arrow {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-55%);
  pointer-events: none;
  font-size: 13px;
}

/* invisible twin used to size the select to its chosen option */
.finder-sizer {
  position: absolute;
  visibility: hidden;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ---- map ---- */
.map-wrap {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 4px 20px 20px;
}

#map { width: min(560px, 100%); }

#map svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.land {
  fill: var(--green);
  stroke: none;
}

.pin { cursor: pointer; } /* fallback; the X cursor at the end of this file wins on desktop */

.pin circle.head {
  stroke: var(--cream);
  stroke-width: 2;
}

.pin .tip {
  fill: var(--cream);
  opacity: 0.9;
}

.pin .glyph {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pin:hover, .pin:focus-visible { outline: none; }
.pin:hover circle.head, .pin:focus-visible circle.head {
  stroke-width: 3;
}

.pin .badge circle {
  fill: var(--cream);
  stroke: var(--green);
  stroke-width: 1.5;
}

.pin .badge path {
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
}

.pin[hidden] { display: none; }

.empty-note {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #fff;
  background: rgba(14, 38, 12, 0.92);
  padding: 14px 22px;
  border-radius: 999px;
  white-space: nowrap;
}

.empty-note a { color: #fff; font-weight: 700; }

/* ---- footer ---- */
.site-footer {
  padding: 18px 28px 26px;
  font-size: 13px;
  color: var(--green);
  opacity: 0.85;
  line-height: 1.6;
  text-align: center;
}

.site-footer a { color: inherit; font-weight: 700; }

/* ---- licence card ---- */
.card-backdrop[hidden] { display: none; }

.card-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 38, 12, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.licence {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--green);
  color: #fff;
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-shadow: 0 20px 60px rgba(14, 38, 12, 0.45);
}

.licence-strip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.65;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.licence-body {
  display: flex;
  gap: 18px;
}

.licence-photo {
  flex: none;
  width: 104px;
  height: 130px; /* driving licence photo ratio */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--green);
}

.licence-fields {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.licence-fields dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.55;
}

.licence-fields dd {
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

#licName { font-size: 18px; font-weight: 700; }

.licence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.licence-links a {
  font-size: 12px;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.15s;
}

.licence-links a:hover { background: rgba(255, 255, 255, 0.24); }

.licence-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 12px;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
}

.licence-close:hover { color: #fff; }

/* ---- small screens ---- */
@media (max-width: 640px) {
  .site-header { padding: 16px 18px; gap: 12px; }
  .wordmark { font-size: 21px; }
  .finder { margin: 0; font-size: 16px; }
  .empty-note { font-size: 13px; padding: 11px 16px; }
  .licence-body { gap: 14px; }
  .licence-photo { width: 88px; height: 110px; font-size: 28px; }
}

/* ---- X marks the spot ---- */
/* Green X cursor everywhere, inverted and bigger on anything clickable.
   Last in the file on purpose - it must win the cascade. Mouse/trackpad
   only; touch devices never see a cursor. */
@media (pointer: fine) {
  html, body {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22"><path d="M4 4l14 14M18 4L4 18" stroke="%23f5f2ec" stroke-width="6.5" stroke-linecap="round"/><path d="M4 4l14 14M18 4L4 18" stroke="%230e260c" stroke-width="3" stroke-linecap="round"/></svg>') 11 11, crosshair;
  }
  a, button, select, #who, .pin, .licence-links a, .licence-close {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26"><path d="M5 5l16 16M21 5L5 21" stroke="%230e260c" stroke-width="7.5" stroke-linecap="round"/><path d="M5 5l16 16M21 5L5 21" stroke="%23f5f2ec" stroke-width="3.5" stroke-linecap="round"/></svg>') 13 13, pointer;
  }
}
