/* Shared styles: brand tokens, fonts, grain. Used by every page. */

@font-face {
  font-family: "Greysha Hand";
  src: url("../assets/fonts/Greysha-Regular.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Gravord";
  src: url("../assets/fonts/GravordDEMO.otf") format("opentype");
  font-display: swap;
}

:root {
  /* core (from the brand guidelines) */
  --void-black: #08090C;
  --flash-white: #F5F7FA;
  --chrome: #C4C9CF;
  --gunmetal: #5E666F;
  --cold-light: #9BB4D1;
  /* era 01: lightning's girl */
  --midnight: #111A25;
  --storm: #3F4F64;
  --voltage: #6D88A9;
  --flash-ice: #D0DFEF;
  --chrome-gradient: linear-gradient(160deg,
    #FFF 0%, #C9CED4 22%, #7C848D 42%, #EEF1F4 50%,
    #A9B0B8 62%, #5E666F 82%, #D5DADF 100%);
  /* the heart — the only warm colour on the site */
  --heart: #E8955A;

  --font-hand: "Greysha Hand", "Courier Prime", monospace;
  --font-display: "Gravord", Georgia, serif;
  --font-voice: "Courier Prime", "Courier New", monospace;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--void-black); color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(120% 70% at 50% 35%, var(--midnight) 0%, var(--void-black) 70%);
  background-color: var(--void-black);
  color: var(--flash-white);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible { outline: 2px solid var(--cold-light); outline-offset: 3px; }

/* Film grain over everything, subtle (brand: 3–6%) */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* Plain backup menu, small text at the bottom */
.backup-menu {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--gunmetal);
  text-align: center;
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
  line-height: 1.8;
}
.backup-menu a {
  color: var(--chrome);
  text-decoration: none;
  padding: 4px 2px;
}
.backup-menu a:hover,
.backup-menu a:focus-visible { color: var(--flash-white); text-decoration: underline; }
/* the homepage menu: bigger, in the typewriter voice, easy to tap on a phone */
body.home .backup-menu {
  font-family: var(--font-hand); font-weight: 400; font-size: 0; letter-spacing: 0; text-transform: uppercase; /* hides the · between links; each link sets its own size */
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 0;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #1d232b;
  background: linear-gradient(#0a0c10, #06070a);
}
body.home .backup-menu a { font-size: clamp(18px, 6.4vw, 25px); line-height: 1; padding: 10px clamp(3px, 1.5vw, 6px); color: var(--flash-ice); }
body.home .backup-menu a + a::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--gunmetal); vertical-align: middle; margin: 0 9px 0 -3px; transform: translateX(-3px); }
/* desktop: bigger, centred, with a bit more room between the words than before (round 48: not spread across the whole bar) */
@media (min-width: 700px) {
  body.home .backup-menu a { font-size: 30px; padding: 12px 36px; }
  body.home .backup-menu a + a::before { margin: 0 34px 0 -37px; transform: none; }   /* the small dot sits in the middle of each gap */
}

