:root {
  color-scheme: light;
  --petrol: #16333a;
  --cyanotype: #245b73;
  --chalk: #f2efe7;
  --falu: #a83c32;
  --birch: #e4c15e;
  --lavender: #b8b2c9;
  --ink: #10242a;
  --muted: #6d7f87;
  --line: rgba(242, 239, 231, 0.2);
  --dark-line: rgba(22, 51, 58, 0.16);
  --surface: rgba(242, 239, 231, 0.92);
  --paper: #f7f3ea;
  --active-accent: #a83c32;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(22, 51, 58, 0.05), rgba(36, 91, 115, 0.08)),
    var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 18% 12%, rgba(184, 178, 201, 0.34), transparent 24rem),
    radial-gradient(circle at 85% 20%, rgba(228, 193, 94, 0.18), transparent 20rem),
    linear-gradient(135deg, rgba(22, 51, 58, 0.1), transparent 44%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

img {
  max-width: 100%;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 14px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid rgba(242, 239, 231, 0.14);
  background: rgba(22, 51, 58, 0.9);
  color: var(--chalk);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 2px solid var(--birch);
  color: var(--birch);
  font-weight: 950;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.02rem;
}

.brand small {
  color: rgba(242, 239, 231, 0.68);
  font-size: 0.78rem;
  font-weight: 750;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-nav a,
.map-toolbar button,
.form-footer button {
  min-height: 42px;
  border: 1px solid rgba(242, 239, 231, 0.22);
  background: rgba(242, 239, 231, 0.08);
  color: currentColor;
  padding: 10px 14px;
  font-weight: 850;
}

.top-nav a:hover,
.map-toolbar button:hover,
.map-toolbar .is-active {
  border-color: var(--birch);
  color: var(--birch);
  background: rgba(228, 193, 94, 0.1);
}

main {
  display: grid;
}

.atlas-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, 0.84fr);
  min-height: calc(100vh - 74px);
  background:
    linear-gradient(90deg, rgba(22, 51, 58, 0.94), rgba(22, 51, 58, 0.78) 50%, rgba(36, 91, 115, 0.62)),
    repeating-linear-gradient(90deg, rgba(242, 239, 231, 0.05) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(242, 239, 231, 0.04) 0 1px, transparent 1px 76px);
  color: var(--chalk);
}

.atlas-stage,
.story-panel {
  min-width: 0;
}

.atlas-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: clamp(16px, 3vw, 36px);
  border-right: 1px solid rgba(242, 239, 231, 0.14);
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.map-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(242, 239, 231, 0.16);
  background:
    radial-gradient(circle at 50% 42%, rgba(184, 178, 201, 0.2), transparent 26rem),
    radial-gradient(circle at 50% 48%, rgba(36, 91, 115, 0.45), transparent 32rem),
    rgba(16, 36, 42, 0.62);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.28);
}

.map-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(105deg, transparent 0 42%, rgba(242, 239, 231, 0.08) 48%, transparent 54%),
    repeating-linear-gradient(0deg, rgba(242, 239, 231, 0.045) 0 1px, transparent 1px 7px);
  mix-blend-mode: screen;
  opacity: 0.8;
  pointer-events: none;
}

.sweden-map {
  width: min(56vw, 460px);
  max-width: calc(100% - 34px);
  height: auto;
  transition: transform 260ms ease;
}

.map-stage[data-zoom="city"] .sweden-map {
  transform: scale(1.2) translateY(-4%);
}

.map-stage[data-zoom="area"] .sweden-map {
  transform: scale(1.52) translate(-5%, -11%);
}

.land {
  fill: rgba(242, 239, 231, 0.88);
  stroke: rgba(228, 193, 94, 0.94);
  stroke-width: 4;
  filter: url("#mapGlow");
}

.coast {
  fill: none;
  stroke: rgba(36, 91, 115, 0.6);
  stroke-width: 3;
}

.rail-line {
  fill: none;
  stroke: rgba(168, 60, 50, 0.65);
  stroke-dasharray: 8 10;
  stroke-width: 3;
}

.rail-line.secondary {
  stroke: rgba(184, 178, 201, 0.65);
}

.map-marker {
  cursor: pointer;
  outline: none;
}

.map-marker circle {
  fill: var(--petrol);
  stroke: var(--birch);
  stroke-width: 5;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}

.map-marker text {
  fill: var(--chalk);
  font-size: 17px;
  font-weight: 950;
  text-anchor: middle;
  pointer-events: none;
}

.map-marker.is-selected circle {
  fill: var(--active-accent);
  stroke: var(--chalk);
}

.map-marker:focus-visible circle {
  stroke-width: 8;
}

.scanline {
  position: absolute;
  inset-inline: 0;
  top: 16%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(228, 193, 94, 0.8), transparent);
  animation: scan 8s ease-in-out infinite alternate;
  opacity: 0.9;
}

.zoom-note {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 36px));
  border: 1px solid rgba(242, 239, 231, 0.18);
  background: rgba(22, 51, 58, 0.82);
  padding: 12px 14px;
  color: rgba(242, 239, 231, 0.82);
  font-size: 0.94rem;
  font-weight: 760;
}

.story-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(24px, 5vw, 58px);
}

.eyebrow {
  margin: 0;
  color: var(--birch);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

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

h1 {
  max-width: 10ch;
  margin-bottom: 0;
  font-size: 6.8rem;
  line-height: 0.9;
  letter-spacing: 0;
}

.story-panel > p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(242, 239, 231, 0.78);
  font-size: 1.22rem;
  line-height: 1.58;
}

.spotlight {
  display: grid;
  grid-template-columns: minmax(160px, 0.88fr) minmax(170px, 1fr);
  align-items: stretch;
  margin: 0;
  border: 1px solid rgba(242, 239, 231, 0.18);
  background: rgba(242, 239, 231, 0.08);
}

.spotlight img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  filter: sepia(0.16) saturate(0.9) contrast(1.08);
}

.spotlight figcaption {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
}

.spotlight strong {
  color: var(--chalk);
  font-size: 1.15rem;
}

.spotlight span {
  color: rgba(242, 239, 231, 0.64);
  font-size: 0.9rem;
  font-weight: 760;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.meta-grid div {
  min-width: 0;
  border: 1px solid rgba(242, 239, 231, 0.18);
  background: rgba(242, 239, 231, 0.08);
  padding: 14px;
}

.meta-grid dt {
  color: rgba(242, 239, 231, 0.62);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-grid dd {
  margin: 6px 0 0;
  color: var(--chalk);
  font-size: 1.35rem;
  font-weight: 950;
}

.drift-strip {
  overflow: hidden;
  border-block: 1px solid var(--dark-line);
  background: var(--chalk);
}

.drift-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 18px;
  animation: drift 42s linear infinite;
}

.drift-strip:hover .drift-track {
  animation-play-state: paused;
}

.drift-track article {
  display: grid;
  grid-template-columns: 92px 180px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--dark-line);
  background: #fff;
  padding: 10px;
}

.drift-track img {
  width: 92px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.drift-track span {
  color: var(--petrol);
  font-weight: 900;
}

.flow-band,
.upload-band,
.review-band {
  padding: clamp(42px, 7vw, 90px) clamp(16px, 4vw, 56px);
}

.section-heading {
  max-width: 980px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: 4.2rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  grid-auto-rows: minmax(220px, auto);
  gap: 18px;
}

.photo-card,
.signal-card,
.compare-card,
.quote-card,
.upload-form,
.review-grid article {
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 70px rgba(22, 51, 58, 0.08);
}

.photo-card {
  display: grid;
  overflow: hidden;
}

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

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
}

.photo-card div {
  padding: 18px;
}

.photo-card p {
  margin-bottom: 6px;
  color: var(--petrol);
  font-size: 1.15rem;
  font-weight: 950;
}

.photo-card span {
  color: var(--muted);
  font-weight: 760;
}

.signal-card,
.quote-card {
  display: grid;
  align-content: end;
  padding: 24px;
}

.signal-number {
  color: var(--falu);
  font-size: 5.2rem;
  font-weight: 950;
  line-height: 0.86;
}

.signal-card h3 {
  margin: 18px 0 10px;
  color: var(--petrol);
  font-size: 1.4rem;
}

.signal-card p,
.quote-card span,
.review-grid p {
  color: var(--muted);
  line-height: 1.58;
}

.compare-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-row: span 2;
  overflow: hidden;
}

.compare-before,
.compare-after {
  min-height: 320px;
}

.compare-before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-after {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(90deg, rgba(22, 51, 58, 0.08) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(0deg, rgba(22, 51, 58, 0.08) 0 1px, transparent 1px 18px),
    var(--lavender);
  color: rgba(22, 51, 58, 0.62);
  font-weight: 950;
}

.compare-card p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: var(--petrol);
  font-weight: 850;
  line-height: 1.45;
}

.quote-card {
  background: var(--petrol);
  color: var(--chalk);
}

.quote-card p {
  margin-bottom: 16px;
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 950;
}

.quote-card span {
  color: rgba(242, 239, 231, 0.62);
  font-weight: 760;
}

.upload-band {
  background:
    linear-gradient(135deg, rgba(36, 91, 115, 0.09), rgba(184, 178, 201, 0.16)),
    var(--chalk);
}

.upload-form {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  padding: clamp(18px, 3vw, 30px);
}

.dropzone-row {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 14px;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border: 1px dashed rgba(36, 91, 115, 0.42);
  color: var(--cyanotype);
  font-weight: 950;
  cursor: pointer;
}

.dropzone.primary {
  min-height: 210px;
  background:
    linear-gradient(120deg, rgba(36, 91, 115, 0.14), transparent),
    rgba(255, 255, 255, 0.74);
}

.dropzone.secondary {
  background:
    linear-gradient(120deg, rgba(228, 193, 94, 0.22), transparent),
    rgba(255, 255, 255, 0.68);
  color: #735f20;
}

.dropzone::after {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(22, 51, 58, 0.08);
  content: "";
  pointer-events: none;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

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

.upload-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #34454c;
  font-size: 0.9rem;
  font-weight: 850;
}

.upload-form input:not([type="checkbox"]),
.upload-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.upload-form input:focus,
.upload-form textarea:focus {
  border-color: var(--cyanotype);
  box-shadow: 0 0 0 3px rgba(36, 91, 115, 0.12);
}

.upload-form textarea {
  resize: vertical;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.check-row {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
}

.form-footer button {
  border-color: var(--falu);
  background: var(--falu);
  color: white;
}

.review-band {
  background: var(--petrol);
  color: var(--chalk);
}

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

.review-grid article {
  display: grid;
  align-content: start;
  min-height: 240px;
  padding: 24px;
  background: rgba(242, 239, 231, 0.08);
  border-color: rgba(242, 239, 231, 0.18);
  box-shadow: none;
}

.review-grid span {
  display: inline-flex;
  color: var(--birch);
  margin-bottom: 28px;
  font-size: 0.9rem;
  font-weight: 950;
}

.review-grid h3 {
  margin-bottom: 10px;
}

.review-grid p {
  margin-bottom: 0;
  color: rgba(242, 239, 231, 0.68);
}

@keyframes scan {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(430px);
  }
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1080px) {
  .atlas-hero,
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .atlas-hero {
    min-height: auto;
  }

  h1 {
    font-size: 5rem;
  }

  .story-panel > p:not(.eyebrow) {
    font-size: 1.12rem;
  }

  .section-heading h2 {
    font-size: 3.2rem;
  }

  .atlas-stage {
    border-right: 0;
    border-bottom: 1px solid rgba(242, 239, 231, 0.14);
  }

  .map-stage {
    min-height: 560px;
  }

  .sweden-map {
    width: min(78vw, 460px);
  }

  .signal-number {
    font-size: 4.1rem;
  }

  .quote-card p {
    font-size: 1.75rem;
  }

  .compare-card,
  .photo-card.large {
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .dropzone-row,
  .form-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .spotlight {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: auto;
    padding: 10px 12px 12px;
    position: sticky;
  }

  .brand-mark {
    width: 36px;
  }

  .brand strong {
    font-size: 0.96rem;
  }

  .brand small {
    font-size: 0.72rem;
  }

  .top-nav {
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
  }

  .top-nav a {
    flex: 1 1 auto;
    min-height: 38px;
    padding: 9px 10px;
    text-align: center;
    font-size: 0.88rem;
  }

  .atlas-hero {
    display: flex;
    flex-direction: column;
  }

  .story-panel {
    order: -1;
    gap: 16px;
    padding: 24px 16px 20px;
  }

  h1 {
    max-width: 9ch;
    font-size: 3.35rem;
  }

  .story-panel > p:not(.eyebrow) {
    font-size: 1rem;
    line-height: 1.5;
  }

  .spotlight {
    grid-template-columns: 116px 1fr;
  }

  .spotlight img {
    min-height: 132px;
  }

  .spotlight figcaption {
    padding: 14px;
  }

  .spotlight strong {
    font-size: 1rem;
  }

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

  .meta-grid div {
    padding: 10px;
  }

  .meta-grid dt {
    font-size: 0.66rem;
  }

  .meta-grid dd {
    font-size: 1rem;
  }

  .atlas-stage {
    padding: 12px;
  }

  .map-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }

  .map-toolbar button {
    min-height: 38px;
    padding: 8px 6px;
    font-size: 0.86rem;
  }

  .map-stage {
    min-height: 390px;
  }

  .sweden-map {
    width: min(86vw, 300px);
  }

  .map-stage[data-zoom="city"] .sweden-map {
    transform: scale(1.15) translateY(-3%);
  }

  .map-stage[data-zoom="area"] .sweden-map {
    transform: scale(1.32) translate(-3%, -7%);
  }

  .zoom-note {
    position: static;
    align-self: end;
    justify-self: stretch;
    margin: 10px;
    padding: 10px;
    font-size: 0.84rem;
  }

  .drift-track {
    gap: 10px;
    padding: 12px;
    animation-duration: 64s;
  }

  .drift-track article {
    grid-template-columns: 76px 132px;
    gap: 10px;
    padding: 8px;
  }

  .drift-track img {
    width: 76px;
  }

  .drift-track span {
    font-size: 0.86rem;
  }

  .flow-band,
  .upload-band,
  .review-band {
    padding: 36px 12px;
  }

  .section-heading {
    margin-bottom: 18px;
  }

  .section-heading h2 {
    font-size: 2.15rem;
    line-height: 1.02;
  }

  .bento-grid {
    gap: 12px;
  }

  .photo-card img {
    min-height: 210px;
  }

  .photo-card div,
  .signal-card,
  .quote-card,
  .compare-card p {
    padding: 16px;
  }

  .signal-number {
    font-size: 3.2rem;
  }

  .quote-card p {
    font-size: 1.42rem;
  }

  .compare-card {
    grid-template-columns: 1fr;
  }

  .compare-before,
  .compare-after {
    min-height: 210px;
  }

  .upload-form {
    gap: 14px;
    padding: 14px;
  }

  .dropzone.primary,
  .dropzone {
    min-height: 132px;
  }

  .dropzone.secondary {
    min-height: 104px;
  }

  .upload-form input:not([type="checkbox"]),
  .upload-form textarea {
    min-height: 46px;
    padding: 12px 11px;
  }

  .form-footer {
    align-items: stretch;
  }

  .form-footer button {
    width: 100%;
    min-height: 48px;
  }

  .review-grid {
    gap: 12px;
  }

  .review-grid article {
    min-height: auto;
    padding: 18px;
  }

  .review-grid span {
    margin-bottom: 14px;
  }
}

@media (max-width: 390px) {
  .top-nav a {
    flex-basis: calc(50% - 6px);
  }

  h1 {
    font-size: 2.9rem;
  }

  .spotlight {
    grid-template-columns: 1fr;
  }

  .spotlight img {
    min-height: 180px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    min-height: 360px;
  }

  .sweden-map {
    width: min(88vw, 260px);
  }

  .section-heading h2 {
    font-size: 1.9rem;
  }
}
