/* "How Atlas Compass is built" in the store's map design (store/prototype/map-sample.html): parchment with a map's
   graticule, ink and brass, Cinzel and Vollkorn; every section a region of the map, the diagrams on pinned sheets, the
   numbers on a map's scale, the cartouche at the foot. */
:root {
  --parchment: #e3d5ac;
  --deep: #d3bd85;
  --surface: #f2e8cc;
  --surface-deep: #e8dbb4;
  --ink: #2e2417;
  --ink-faded: #6e5d3e;
  --brass: #8c6a2f;
  --brass-strong: #6f521f;
  --on-brass: #fbf5e4;
  --display: "Cinzel", Georgia, serif;
  --body: "Vollkorn", Georgia, serif;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --line-soft: color-mix(in srgb, var(--ink) 7%, transparent);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.6;
  background-color: var(--parchment);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--surface) 70%, transparent), transparent 70%);
  background-size:
    96px 96px,
    96px 96px,
    100% 100%;
  overflow-x: hidden;
}
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--brass);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.02em;
}
code {
  padding: 0.05em 0.35em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--brass) 12%, transparent);
  font-size: 0.9em;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* -- the top bar -- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--parchment) 86%, transparent);
  backdrop-filter: blur(8px);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.top-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.top-links a:not(.btn) {
  position: relative;
  color: var(--ink-faded);
  font-size: 0.95rem;
  text-decoration: none;
}
.top-links a:not(.btn):hover {
  color: var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--brass);
  border-radius: 99px;
  background: var(--brass);
  color: var(--surface);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
.btn:hover {
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brass) 35%, transparent);
}
.btn-small {
  padding: 7px 16px;
  font-size: 0.8rem;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--brass) 12%, transparent);
}

/* -- the hero -- */
.hero {
  padding-top: 64px;
  text-align: center;
}
.edition {
  display: inline-block;
  padding: 4px 16px;
  border: 1px solid var(--brass);
  border-radius: 99px;
  color: var(--brass);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 820px;
  margin: 18px auto 12px;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: 0.03em;
}
.lead {
  max-width: 720px;
  margin: 0 auto;
  color: var(--ink-faded);
  font-size: 1.15rem;
}
.lead strong {
  color: var(--ink);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.hero-actions.left {
  justify-content: flex-start;
}
.note {
  margin: 12px 0 0;
  color: var(--ink-faded);
  font-size: 0.88rem;
  font-style: italic;
}
.hero-shot {
  max-width: 920px;
  margin: 40px auto 0;
}
.hero-shot video {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 3px;
  background: var(--deep);
}

/* -- a sheet laid on the table, pinned at its corners (the diagrams, the reel) -- */
.sheet {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow:
    0 1px 0 var(--line),
    0 24px 50px -18px color-mix(in srgb, var(--ink) 40%, transparent);
}
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  top: -7px;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9d9b0, var(--brass) 70%);
  box-shadow: 0 2px 3px color-mix(in srgb, var(--ink) 40%, transparent);
}
.sheet::before {
  left: 22px;
}
.sheet::after {
  right: 22px;
}

/* -- the numbers, on a map's scale -- */
.numbers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 900px;
  margin-top: 56px;
}
.numbers div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px 12px;
  border-bottom: 6px solid var(--ink);
  text-align: center;
}
.numbers div:nth-child(even) {
  border-bottom-color: transparent;
  box-shadow: inset 0 -6px 0 -4px var(--ink);
}
.numbers div + div {
  border-left: 1px solid var(--ink);
}
.numbers strong {
  color: var(--brass);
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.1;
}
.numbers span {
  margin-top: 4px;
  color: var(--ink-faded);
  font-size: 0.84rem;
  line-height: 1.3;
}

/* -- the sections: each a region of the map -- */
.section {
  padding-top: 88px;
  scroll-margin-top: 70px;
}
.region-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brass);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.region-label::after {
  content: "";
  width: 120px;
  border-top: 1px solid var(--brass);
  opacity: 0.6;
}
.section h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: 0.03em;
}
.section-lead {
  max-width: 760px;
  margin: 0;
  color: var(--ink-faded);
  font-size: 1.1rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.card h3 {
  margin: 0 0 0.45em;
  font-size: 1.02rem;
}
.card h3::before,
.deep-item h3::before {
  content: "✦ ";
  color: var(--brass);
  font-size: 0.8em;
}
.card p {
  margin: 0;
  color: var(--ink-faded);
  font-size: 0.98rem;
}

/* -- the diagrams -- */
.diagram {
  margin: 28px 0 0;
  padding: 18px;
  overflow-x: auto;
}
.diagram svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}
.node rect {
  fill: var(--surface-deep);
  stroke: color-mix(in srgb, var(--ink) 22%, transparent);
  stroke-width: 1.5;
}
.node-accent rect {
  fill: var(--brass);
  stroke: var(--brass-strong);
}
.node text {
  fill: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  text-anchor: middle;
}
.node text.sub {
  fill: var(--ink-faded);
  font-family: var(--body);
  font-weight: 400;
  font-size: 12.5px;
}
.node-accent text,
.node-accent text.sub {
  fill: var(--on-brass);
}
.edges path {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.8;
}
.edges path.dashed {
  stroke-dasharray: 5 4;
}
.arrow-head {
  fill: var(--brass);
}
.zone {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 25%, transparent);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.zone-mine {
  fill: color-mix(in srgb, var(--brass) 7%, transparent);
  stroke: var(--brass);
  stroke-dasharray: none;
}
.zone-label {
  fill: var(--brass-strong);
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.06em;
}
.edge-label {
  fill: var(--ink-faded);
  font-family: var(--body);
  font-size: 12px;
  text-anchor: middle;
}

/* -- what makes it trustworthy: a map's legend of fortifications -- */
.deep {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.deep-item {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 10px;
  background: var(--surface);
}
.deep-item h3 {
  margin: 0 0 0.5em;
  font-size: 1.02rem;
}
.deep-item p {
  margin: 0;
  font-size: 0.98rem;
}

/* -- the design decisions: a logbook, an entry per decision -- */
.decisions {
  max-width: 880px;
  margin-top: 20px;
  padding: 10px 26px;
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  background: var(--surface);
}
.decisions details {
  border-bottom: 1px dashed var(--line);
}
.decisions details:last-child {
  border-bottom: 0;
}
.decisions summary {
  padding: 14px 4px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  list-style: none;
  cursor: pointer;
}
.decisions summary::-webkit-details-marker {
  display: none;
}
.decisions summary::before {
  content: "✦";
  display: inline-block;
  margin-right: 10px;
  color: var(--brass);
  transition: transform 0.2s;
}
.decisions details[open] summary::before {
  transform: rotate(45deg);
}
.decisions summary:hover {
  color: var(--brass-strong);
}
.decisions details p {
  margin: 0 0 14px 26px;
  color: var(--ink-faded);
}

/* -- the stack: the cargo, as tags -- */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.stack li {
  padding: 0.3em 0.95em;
  border: 1px solid var(--brass);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
}

/* -- made by -- */
.contact p {
  font-size: 1.1rem;
}

/* -- the foot: the cartouche -- */
.foot {
  padding: 72px 16px 56px;
  text-align: center;
}
.cartouche {
  max-width: 520px;
  margin: 0 auto 18px;
  padding: 18px 26px;
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  border-radius: 40px / 18px;
  background: var(--surface);
}
.cartouche .display {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.cartouche small {
  color: var(--ink-faded);
  font-style: italic;
}
.foot p {
  margin: 0;
  color: var(--ink-faded);
  font-size: 0.88rem;
}

/* -- the language menu -- */
.lang-menu {
  position: relative;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35em 0.75em 0.35em 0.6em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lang-toggle svg {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-toggle:hover,
.lang-menu.open .lang-toggle {
  border-color: var(--brass);
  background: var(--surface);
}
.lang-caret {
  transition: transform 0.2s;
}
.lang-menu.open .lang-caret {
  transform: rotate(180deg);
}
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--ink) 40%, transparent);
}
.lang-list[hidden] {
  display: none;
}
.lang-list button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0.5em 0.7em;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.lang-list button small {
  color: var(--ink-faded);
  font-size: 0.75rem;
}
.lang-list button:hover,
.lang-list button:focus-visible {
  background: var(--deep);
  outline: none;
}
.lang-list button[aria-checked="true"] {
  color: var(--brass);
  font-weight: 600;
}

@media (max-width: 860px) {
  .cards,
  .deep {
    grid-template-columns: 1fr;
  }
  .numbers {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 18px;
  }
}
@media (max-width: 600px) {
  .top-links a:not(.btn) {
    display: none;
  }
  .numbers {
    grid-template-columns: repeat(2, 1fr);
  }
  .decisions {
    padding: 6px 14px;
  }
  .section {
    padding-top: 64px;
  }
}
