/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ---------- theme ---------- */
body {
  background: #ffffff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body:has(#theme:checked) { background: #0b0b0b; }

.page {
  --bg:     #ffffff;
  --fg:     #0b0b0b;
  --muted:  #8a8a8a;
  --accent: #0aa2ff;
  --line:   rgba(0, 0, 0, .12);
  --disc-shadow:       0 24px 44px -20px rgba(0, 0, 0, .30);
  --disc-shadow-hover: 0 34px 58px -22px rgba(0, 0, 0, .38);
  --skyline-opacity: .09;

  position: relative;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  transition: background-color .28s ease, color .28s ease;
}

#theme:checked ~ .page {
  --bg:    #0b0b0b;
  --fg:    #f2f2f2;
  --muted: #8a8a8a;
  --line:  rgba(255, 255, 255, .14);
  --disc-shadow:       0 0 48px rgba(10, 162, 255, .13);
  --disc-shadow-hover: 0 0 68px rgba(10, 162, 255, .22);
  --skyline-opacity: .15;
}

/* ---------- theme switch (CSS only, no JavaScript) ---------- */
#theme {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 22px 24px 0;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  background: none;
  transition: color .2s ease, border-color .2s ease;
}
.switch:hover { color: var(--fg); border-color: var(--fg); }

#theme:focus-visible ~ .page .switch {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.switch svg { width: 15px; height: 15px; display: block; }
.switch .moon { display: block; }
.switch .sun  { display: none; }
#theme:checked ~ .page .switch .moon { display: none; }
#theme:checked ~ .page .switch .sun  { display: block; }

.switch .label-dark  { display: inline; }
.switch .label-light { display: none; }
#theme:checked ~ .page .switch .label-dark  { display: none; }
#theme:checked ~ .page .switch .label-light { display: inline; }

/* ---------- main ---------- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.links {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(40px, 12vw, 140px);
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(150px, 26vw, 230px);
}

.link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-decoration: none;
  color: inherit;
}

.disc {
  width: clamp(150px, 26vw, 230px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--disc-shadow);
  transition: transform .3s cubic-bezier(.2, .7, .3, 1),
              box-shadow .3s ease;
}
.disc img { width: 100%; height: 100%; display: block; }

.link:hover .disc,
.link:focus-visible .disc {
  transform: translateY(-6px);
  box-shadow: var(--disc-shadow-hover);
}
.link:active .disc { transform: translateY(-2px); }

.link:focus-visible { outline: none; }
.link:focus-visible .disc {
  box-shadow: 0 0 0 3px var(--accent), var(--disc-shadow);
}

.name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s ease;
}
.link:hover .name,
.link:focus-visible .name { color: var(--fg); }

/* ---------- note under the store circle ---------- */
.note {
  margin: 14px 0 0;
  max-width: 230px;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}
.note a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.note a:hover,
.note a:focus-visible { border-bottom-color: var(--accent); }
.note a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Tallinn silhouette (Oleviste church & Old Town), kept faint ---------- */
.skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  pointer-events: none;
  opacity: var(--skyline-opacity);
  transition: opacity .28s ease;
}
.skyline img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: center bottom;
}

.footer {
  position: relative;
  padding: 0 24px 26px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 560px) {
  .links { flex-direction: column; align-items: center; gap: 54px; }
  main { padding: 32px 24px 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .page, .disc, .name, .switch, .note a { transition: none; }
  .link:hover .disc, .link:focus-visible .disc, .link:active .disc { transform: none; }
}
