@font-face {
  font-family: "n8n Baumer Uniwidth";
  src: url("/assets/n8n-baumer.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "n8n Baumer Mono";
  src: url("/assets/n8n-baumer-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg-primary: #191919;
  --bg-secondary: #242424;
  --bg-tertiary: #464646;
  --accent: #FF91AC;
  --accent-text: #FF91AC;
  --ink: #FAFAFA;
  --ink-soft: rgba(250, 250, 250, .7);
  --stroke: #676767;
  --map-bg: #242424;
  --map-dot: #464646;
  --map-key-bg: rgba(25, 25, 25, .88);
  --deboss-top: #191919;
  --deboss-bottom: rgba(250, 250, 250, .1);
  --code-bg: #191919;
  --interactive-hover: #676767;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #FAFAFA;
    --bg-secondary: #F1F1F1;
    --bg-tertiary: #EAEAEA;
    --accent-text: #87003C;
    --ink: #191919;
    --ink-soft: rgba(25, 25, 25, .68);
    --stroke: #BFBFBF;
    --map-bg: #F1F1F1;
    --map-dot: #D6D6D6;
    --map-key-bg: rgba(250, 250, 250, .9);
    --deboss-top: #EAEAEA;
    --deboss-bottom: #FFFFFF;
    --code-bg: #FAFAFA;
    --interactive-hover: #D6D6D6;
  }
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
@media (prefers-color-scheme: light) { html { color-scheme: light; } }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--ink);
  font-family: "n8n Baumer Uniwidth", Arial, sans-serif;
  font-feature-settings: "liga" 1;
}
button, code, pre { font: inherit; }
a { color: inherit; }

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--bg-tertiary);
}
.site-header a { display: flex; }
.site-header img { width: 104px; height: auto; }
.tracker-label, .eyebrow, .data-label, .status-pill, .map-key, .progress-block, .code-header, footer {
  font-family: "n8n Baumer Mono", monospace;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tracker-label {
  padding: 8px 16px;
  border-radius: 400px;
  background: var(--accent);
  color: #191919;
  font-size: 10px;
  line-height: 14px;
}

main { padding: 0 32px; }
.intro {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 240px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 64px;
  align-items: end;
  padding: 48px 0;
}
.eyebrow { margin: 0 0 16px; color: var(--accent-text); font-size: 14px; line-height: 18px; }
h1, h2, p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
h1 { margin: 0; font-size: clamp(40px, 5vw, 80px); line-height: 1; font-weight: 550; letter-spacing: -.01em; }
.intro-copy { max-width: 480px; margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 22px; }

.tracker {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 16px;
}
.map-wrap { position: relative; min-width: 0; overflow: hidden; border-radius: 16px; }
#world-map { display: block; width: 100%; height: 100%; min-height: 480px; }
.land-image-light { display: none; }
@media (prefers-color-scheme: light) {
  .land-image-dark { display: none; }
  .land-image-light { display: block; }
}
.route-line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 7; stroke-linecap: round; opacity: .55; }
.stop-dot { fill: var(--bg-primary); stroke: var(--accent); stroke-width: 1.5; }
.stop-dot.visited { fill: var(--accent); }
#santa-marker { transition: transform 1s linear; }
.map-key {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 400px;
  background: var(--map-key-bg);
  font-size: 10px;
  line-height: 14px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,145,172,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255,145,172,0); } 100% { box-shadow: 0 0 0 0 rgba(255,145,172,0); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } #santa-marker { transition: none; } }

.status-panel {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: 16px;
  background: var(--bg-secondary);
  box-shadow: inset 8px 8px 12px var(--deboss-top), inset -8px -8px 12px var(--deboss-bottom);
}
.status-heading { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font: 10px/14px "n8n Baumer Mono", monospace; }
.status-pill { padding: 8px 12px; border-radius: 400px; background: var(--accent); color: #191919; }
.location-block { margin: auto 0 40px; }
.data-label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 10px; line-height: 14px; }
.location-block h2 { margin: 0; font-size: 40px; line-height: 42px; font-weight: 550; letter-spacing: -.01em; }
.location-block p { margin: 8px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 20px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--bg-tertiary); border-bottom: 1px solid var(--bg-tertiary); }
.stats strong { display: block; overflow: hidden; font-size: 20px; line-height: 24px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.progress-block { margin-top: 24px; font-size: 10px; line-height: 14px; color: var(--ink-soft); }
.progress-block > div:first-child { display: flex; justify-content: space-between; }
.progress-track { height: 8px; margin-top: 12px; overflow: hidden; border-radius: 400px; background: var(--bg-tertiary); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 1s linear; }
.progress-block p { margin: 12px 0 0; }

.api-section {
  max-width: 1440px;
  margin: 120px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.api-section h2 { max-width: 560px; margin: 0; font-size: 48px; line-height: 48px; font-weight: 550; letter-spacing: -.01em; }
.api-section > div > p:last-child { max-width: 560px; margin: 24px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 20px; }
.code-card { min-width: 0; overflow: hidden; border-radius: 16px; background: var(--bg-secondary); box-shadow: inset 8px 8px 12px var(--deboss-top), inset -8px -8px 12px var(--deboss-bottom); }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; font-size: 10px; border-bottom: 1px solid var(--bg-tertiary); }
.code-header > span { padding: 4px 8px; border-radius: 400px; background: var(--accent); color: #191919; }
.code-header button { padding: 8px 12px; border: 0; border-radius: 400px; background: var(--bg-tertiary); color: var(--ink); font: inherit; cursor: pointer; }
.code-header button:hover, .code-header button:focus-visible { background: var(--interactive-hover); outline: 2px solid var(--accent); }
#api-url { display: block; overflow: auto; padding: 24px; color: var(--accent-text); font-family: "n8n Baumer Mono", monospace; white-space: nowrap; }
pre { min-height: 240px; max-height: 320px; margin: 0; overflow: auto; padding: 24px; background: var(--code-bg); color: var(--ink-soft); font: 14px/18px "n8n Baumer Mono", monospace; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 32px; border-top: 1px solid var(--bg-tertiary); color: var(--ink-soft); font-size: 10px; line-height: 14px; }
footer p { margin: 0; }

@media (max-width: 900px) {
  .intro, .tracker, .api-section { grid-template-columns: 1fr; }
  .intro { gap: 24px; align-items: start; }
  .tracker { gap: 16px; }
  .status-panel { min-height: 400px; }
  .api-section { gap: 48px; margin: 80px auto; }
}
@media (max-width: 600px) {
  .site-header { height: 72px; padding: 0 16px; }
  .site-header img { width: 88px; }
  main { padding: 0 16px; }
  .intro { min-height: 0; padding: 40px 0; }
  h1 { font-size: 48px; line-height: 48px; }
  #world-map { min-height: 320px; }
  .status-panel { min-height: 400px; padding: 24px; }
  .location-block { margin-bottom: 32px; }
  .location-block h2 { font-size: 32px; line-height: 36px; }
  .api-section h2 { font-size: 40px; line-height: 42px; }
  footer { flex-direction: column; padding: 24px 16px; }
}
