/* Shared parts of the Valley and Globe pages: logo, server address, downloads, install steps, hero switch. */
@font-face {
  font-family: Archivo;
  src: url(/font/archivo-latin-wdth-normal.woff2) format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --card: #151a22;
  --line: #2a323d;
  --text: #eef1f4;
  --muted: #9aa4b0;
  --grass: #7ccf4a;
  --sky: #5fb8ef;
  --gold: #f2c14e;
  font-family: Archivo, system-ui, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--sky); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Logo: both words share one pixel scale (JAWNCRAFT is 288 px wide, FOREVER 224). */
.logo { --w: min(92vw, 820px); margin: 0; display: grid; justify-items: center; gap: calc(var(--w) * .02); }
.logo img { image-rendering: pixelated; height: auto; filter: drop-shadow(0 .6rem 1.2rem #0009); }
.logo .l1 { width: var(--w); }
.logo .l2 { width: calc(var(--w) * 224 / 288); }

/* Server address */
.address {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .35rem .35rem .35rem 1.1rem;
  background: #0b0e13cc; border: 2px solid #ffffff26; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.address code {
  font: 700 clamp(1.05rem, 2.6vw, 1.35rem)/1 ui-monospace, Consolas, monospace;
  letter-spacing: .02em;
}
.copy { position: relative; display: inline-flex; }
.copy-button {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  border: 0; border-radius: 999px; background: #ffffff1a; color: var(--text); cursor: pointer;
}
.copy-button:hover { background: #ffffff33; }
.copy-button svg { width: 1.15rem; height: 1.15rem; grid-area: 1/1; }
.copy-button .done, .copy-button[data-copied] .idle { display: none; }
.copy-button[data-copied] .done { display: block; color: var(--grass); }
.tip {
  position: absolute; inset-block-end: calc(100% + .4rem); inset-inline-start: 50%; translate: -50% 0;
  padding: .2rem .55rem; border-radius: 6px; background: #000; font-size: .8rem; white-space: nowrap; pointer-events: none;
}
.tip:empty { display: none; }

/* Download buttons */
.downloads { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.dl {
  display: inline-flex; align-items: center; gap: .7rem;
  min-width: 15rem; padding: .85rem 1.3rem;
  border-radius: 12px; border: 2px solid #0006; box-shadow: inset 0 -4px #0004, 0 .4rem 1.2rem #0006;
  color: #0b0e13; text-decoration: none; font-weight: 800; font-stretch: 85%;
  font-size: 1.1rem; line-height: 1.15;
}
.dl svg { width: 1.5rem; height: 1.5rem; flex: none; }
.dl small { display: block; font-weight: 600; font-size: .8rem; opacity: .75; }
.dl.fabric { background: var(--grass); }
.dl.jearth { background: var(--sky); }
.dl[href]:hover { filter: brightness(1.08); }
.dl.is-soon { opacity: .62; filter: saturate(.7); box-shadow: inset 0 -4px #0004; cursor: not-allowed; }

/* Install steps, below the hero */
.install { width: min(1060px, 100% - 2.5rem); margin: 0 auto; padding: 4rem 0 5rem; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.install h2 { grid-column: 1 / -1; margin: 0; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem 1.4rem; }
.card h3 { margin: 0 0 .8rem; font-size: 1.25rem; font-stretch: 85%; }
.card.fabric h3 { color: var(--grass); }
.card.jearth h3 { color: var(--sky); }
.card ol { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: .65rem; }
.card li::marker { font-weight: 800; color: var(--muted); }
.card p { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }
.hook { display: flex; align-items: center; gap: .4rem; margin-top: .45rem; }
.hook code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  padding: .45rem .65rem; border-radius: 8px; background: #0b0e13; border: 1px solid var(--line);
  font: .9rem ui-monospace, Consolas, monospace;
}
.inline-btn { display: inline-flex; align-items: center; gap: .35rem; margin-top: .55rem; font-size: .85rem; color: var(--muted); }
.inline-btn svg { width: 1rem; height: 1rem; }
.inline-btn.is-soon { text-decoration: none; cursor: not-allowed; opacity: .7; }
.note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .9rem; text-align: center; }
.card, .card li { min-width: 0; }

/* Hero switch (Valley / Globe), top right. Each hero is its own page, so each loads only its own
   heavy files; the swap is a cross-document view transition where supported, a plain page load elsewhere. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
::view-transition-group(root) { animation-duration: .45s; }
.hero-switch {
  position: absolute; z-index: 5; inset-block-start: max(1rem, env(safe-area-inset-top)); inset-inline-end: max(1rem, env(safe-area-inset-right));
  display: flex; padding: .25rem; gap: .25rem; border-radius: 999px;
  background: #0b0e13b3; backdrop-filter: blur(10px); box-shadow: 0 0 0 1px #ffffff1f, 0 .5rem 1.5rem #0006;
  view-transition-name: hero-switch; cursor: auto;
}
.hero-switch a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px;
  font: 700 .85rem/1 Archivo, system-ui, sans-serif; color: var(--muted); text-decoration: none;
  transition: color .15s, background-color .15s;
}
.hero-switch a:hover { color: var(--text); background: #ffffff14; }
.hero-switch a[aria-current] { color: #0b0e13; background: var(--gold); }
.hero-switch svg { width: 1rem; height: 1rem; flex: none; }
