/* Space Commons BI, shared by every page of the intro site (same spec as the app):
   mark assets/sc-mark.svg only, 22px in bars; wordmark Manrope 800, -0.03em, word gap .22em, Space in ink, Commons in accent;
   Manrope for headings and heading numbers, Pretendard for Korean body text, IBM Plex Mono for data; square corners. */
:root {
  /* palette: night background, ink and mute text, accent; the rest are steps between night and ink */
  --night: #070A16;
  --paper: #0C1022;   /* alternate section background, one step above night */
  --deep: #0D1124;
  --rule: #222842;    /* thin dividers */
  --line2: #3A4266;   /* stronger dividers, outlines */
  --mute: #8D93B3;
  --soft: #B6BBD2;    /* secondary text */
  --ink: #E9ECF6;
  --text: var(--ink);
  --accent: #4C8DF6;
  --veil: rgb(7 10 22 / .55);   /* night over photographs */
  /* type */
  --f-head: Manrope, 'Pretendard Variable', Pretendard, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;  /* Manrope for Latin and numbers, Pretendard for Hangul */
  --f-body: 'Pretendard Variable', Pretendard, 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif; /* Hangul never falls to Gulim while the subset font loads */
  --f-mono: 'IBM Plex Mono', 'Pretendard Variable', Pretendard, monospace;
  --f-mark: Manrope, sans-serif;  /* the wordmark never falls back to Pretendard */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font: 17px/1.75 var(--f-body); word-break: keep-all; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.mono { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 800; letter-spacing: -.035em; margin: 0; }
h1, h2, h3 { text-wrap: balance; }   /* no lone word on a title's last line (phones) */
p, li, dd, figcaption { text-wrap: pretty; }
h1 span, h2 span.hl { color: var(--accent); }  /* the one highlighted line in a big title */
p { margin: 0; }
h2.sec { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.2; max-width: 16em; }
.intro { margin-top: 18px; color: var(--soft); max-width: 38em; }
.kicker { display: flex; gap: 14px; align-items: baseline; color: var(--mute); margin-bottom: 26px; }
.kicker .mono { color: var(--accent); }
.paper { background: var(--paper); }

/* wordmark: "Space Commons" */
.wordmark { font-family: var(--f-mark); font-weight: 800; letter-spacing: -.03em; word-spacing: .22em; color: var(--ink); white-space: nowrap; }
.wordmark b { font-weight: 800; color: var(--accent); }

/* header */
header { position: absolute; inset: 0 0 auto; z-index: 5; }
header .wrap { display: flex; align-items: center; height: 72px; gap: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; line-height: 1; }
/* the mark is 26px in the site header (the owner's choice), with even air above and below; its left edge stays on the page's text edge */
.logo img { width: 26px; height: 26px; margin: 0 2px 0 0; flex: none; }
.logo .wordmark { display: block; padding-top: 1px; } /* Manrope sits a hair high in its box; this centres the words on the mark */
footer .logo { font-size: 17px; }
footer .logo img { width: 20px; height: 20px; }
header nav { margin-left: auto; display: flex; gap: 26px; font-size: 15px; align-items: center; }
/* every link keeps the same underline space, so the current page's text sits on the same line as the others */
header nav a:not(.btn) { text-decoration: none; color: var(--soft); padding: 4px 0 2px; border-bottom: 2px solid transparent; line-height: 1.4; }
header nav a:not(.btn):hover { color: var(--ink); }
.menu-toggle { display: none; }
header nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
header nav .btn { padding: 7px 14px; font-size: 14px; }   /* the bar's app link stays small: each page has its own big call to action */

/* buttons: square, accent fill or outline */
.btn { display: inline-block; white-space: nowrap; background: var(--accent); color: var(--ink) !important; text-decoration: none; padding: 11px 20px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; border: 1px solid var(--line2); }
.btn.ghost:hover { filter: none; border-color: var(--ink); }

/* badge */
.badge { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 7px 14px 7px 8px; background: rgb(233 236 246 / .08); border: 1px solid rgb(233 236 246 / .22); text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink); backdrop-filter: blur(4px); }
.badge img { height: 22px; width: auto; }

/* ruled definition rows */
.facts { margin-top: 30px; border-top: 1px solid var(--line2); }
.facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.facts dt { color: var(--mute); } .facts dd { margin: 0; }

/* horizon tabs */
.tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--line2); }
.tabs button { background: transparent; border: 0; border-right: 1px solid var(--line2); padding: 9px 16px; font: 500 15px/1 var(--f-body); color: var(--ink); cursor: pointer; }
.tabs button:last-child { border-right: 0; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--ink); }
/* twilight over the ridge: night at the top, warming toward the accent at the horizon */
.pano { margin-top: 18px; position: relative; height: 300px; background: linear-gradient(180deg, var(--night) 0%, var(--paper) 45%, color-mix(in srgb, var(--accent) 45%, var(--paper)) 100%); overflow: hidden; }
.pano .land { position: absolute; inset: auto 0 0 0; height: 55%; background: 0 50.6% / 2600px 1600% repeat-x; filter: brightness(.6); transition: opacity .35s; }
.pano .tag { position: absolute; left: 16px; top: 14px; color: var(--ink); }

/* live dot */
.live { display: inline-block; width: 7px; height: 7px; background: var(--accent); margin-right: 8px; vertical-align: 2px; animation: blink 2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* iframe try box */
.try { margin-top: 64px; position: relative; aspect-ratio: 16 / 8; overflow: hidden; background: var(--night) url(../textures/eso_milkyway_2k.jpg) center / cover; }
.try iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.try .cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--veil); color: var(--ink); text-align: center; padding: 20px; }
.try .cover p { color: var(--soft); font-size: 15px; }

/* next-page link */
.next { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line2); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.next a { text-decoration: none; font-family: var(--f-head); font-weight: 800; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.03em; }
.next a::after { content: ' →'; color: var(--accent); }
.next span { color: var(--mute); font-size: 15px; }

footer { padding: 70px 0 60px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; color: var(--mute); font-size: 15px; }
footer a { text-decoration: none; } footer a:hover { color: var(--ink); }
footer nav { display: flex; gap: 22px; }
footer .credit { max-width: 1200px; margin: 14px auto 0; padding: 0 40px; font-size: 12px; color: var(--mute); line-height: 1.6; } /* same grid as .wrap, so it starts on the logo's edge */
footer .credit a { color: inherit; }

@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  /* phones: a larger logo and a menu button; the pages and the app button open as a panel under the bar */
  header .wrap { position: relative; height: 64px; }
  .logo { font-size: 22px; gap: 12px; }
  .logo img { width: 34px; height: 34px; }
  .menu-toggle { display: grid; place-content: center; gap: 5px; margin-left: auto; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid var(--line2); border-radius: 0; cursor: pointer; }
  .menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  header.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  header.open .menu-toggle span:nth-child(2) { opacity: 0; }
  header.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  header nav { display: none; position: absolute; left: 0; right: 0; top: 64px; margin: 0; padding: 8px 16px 18px; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--deep); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--line2); font-size: 17px; }
  header.open nav { display: flex; }
  header nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  header nav a[aria-current] { border-bottom-color: var(--rule); color: var(--accent); }
  header nav .btn { margin-top: 0; padding: 14px 0; background: none; border: 0; color: var(--accent) !important; font-size: 17px; font-weight: 600; text-align: left; }
  header nav .btn::after { content: ' →'; }
  .tabs button { flex: 1 1 33%; border-bottom: 1px solid var(--line2); padding: 10px 6px; font-size: 14px; }
  .pano { height: 200px; }
  .try { aspect-ratio: 3 / 4; }
  footer .credit { padding: 0 16px; }
}
