/* Mons website. Colours from the app's Theme.kt: Mons-Dunkel (default) and Mons-Hell (light system setting). */
:root {
  color-scheme: dark;
  --page: #0f1d23;
  --sky-top: #132732;
  --sky-bottom: #1d3440;
  --text: #edf4f1;
  --secondary: #b1c6c7;
  --hint: #7f9699;
  --accent: #e0b36b;
  --accent-text: #e0b36b;
  --accent-soft: rgba(224, 179, 107, 0.14);
  --surface: #23363e;
  --outline: #4a636a;
  --ridge-far: #2c434b;
  --ridge-mid: #1b2b31;
  --ridge-near: #0f1d23;
  --ridge-edge: #607c83;
  --label: #edf4f1;
  --label-bar: #1d3038;
  --label-bar-soft: #607c83;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans", "PingFang TC",
    "Noto Sans JP", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --page: #f4f7f8;
    --sky-top: #eef4f6;
    --sky-bottom: #d9e6ea;
    --text: #1d3038;
    --secondary: #4f666d;
    --hint: #55696f;
    --accent: #b07018;
    --accent-text: #8a5a0c;
    --accent-soft: rgba(176, 112, 24, 0.12);
    --surface: #ffffff;
    --outline: #c4d2d6;
    --ridge-far: #b9cbd2;
    --ridge-mid: #dbe6ea;
    --ridge-near: #f4f7f8;
    --ridge-edge: #8ea4ab;
    --label: #ffffff;
    --label-bar: #1d3038;
    --label-bar-soft: #8ea4ab;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Header ------------------------------------------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px
    max(16px, env(safe-area-inset-left));
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}

.mark {
  display: block;
  width: 36px;
  height: 36px;
  flex: none;
}

.mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px var(--outline);
}

.languages {
  position: relative;
}

.languages summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--outline);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
}

.languages summary::-webkit-details-marker {
  display: none;
}

.languages summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.languages ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.languages li a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}

.languages li a:hover {
  background: var(--accent-soft);
}

.languages li a[aria-current] {
  color: var(--accent-text);
  font-weight: 600;
}

/* --- Coming soon -------------------------------------------------------------------------------------------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home main,
.root main,
.not-found-page main {
  background: linear-gradient(180deg, var(--page) 0%, var(--sky-top) 30%, var(--sky-bottom) 100%);
}

.hero {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 6vh, 80px) 16px 16px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 4px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead {
  margin: 0 auto 16px;
  max-width: 36em;
  color: var(--secondary);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  text-wrap: pretty;
}

.platforms {
  margin: 0 0 8px;
  font-weight: 600;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.panorama {
  display: block;
  width: 100%;
  height: clamp(210px, 34vw, 460px);
  margin-top: auto;
}

.ridge-far {
  fill: var(--ridge-far);
}

.ridge-mid {
  fill: var(--ridge-mid);
  stroke: var(--ridge-edge);
  stroke-width: 1;
  stroke-opacity: 0.45;
}

.ridge-near {
  fill: var(--ridge-near);
  stroke: var(--ridge-edge);
  stroke-width: 1;
  stroke-opacity: 0.35;
}

.skyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linejoin: round;
}

.label line {
  stroke: var(--accent);
  stroke-width: 3;
}

.label circle {
  fill: var(--accent);
  stroke: var(--page);
  stroke-width: 2;
}

.label rect {
  fill: var(--label);
}

.label .bar {
  fill: var(--label-bar);
}

.label .bar-soft {
  fill: var(--label-bar-soft);
}

/* --- Legal pages -------------------------------------------------------------------------------------------- */

.legal {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  overflow-wrap: anywhere;
}

.legal h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
}

.legal h2 {
  margin: 2em 0 0.6em;
  font-size: 1.3rem;
  line-height: 1.3;
}

.legal h3 {
  margin: 1.5em 0 0.4em;
  font-size: 1.05rem;
  line-height: 1.35;
}

.legal p,
.legal li {
  color: var(--text);
}

.legal p {
  margin: 0 0 0.9em;
}

.legal ul {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.legal .clause {
  color: var(--hint);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.legal .address strong {
  color: var(--secondary);
}

.legal .back {
  margin-top: 2.5em;
}

/* --- Footer ------------------------------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--outline);
  padding: 20px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  color: var(--hint);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--secondary);
}

.site-footer a[aria-current] {
  color: var(--accent-text);
}

.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .languages ul {
    animation: drop 140ms ease-out;
  }

  @keyframes drop {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
  }
}

a[href^="mailto:"] {
  white-space: nowrap;
}
