/* Xtalsoft's shared look: graphite, cream ink, one sans, and a light of coloured gel behind
   each app's own window. docs/site-aesthetic.md has the account of it. */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/instrument-sans-latin-400.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/instrument-sans-latin-500.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/instrument-sans-latin-600.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/instrument-sans-latin-700.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --ground: #0b0b0e;
  --surface: #15171a;
  --line: rgba(242, 234, 217, 0.1);
  --line-2: rgba(242, 234, 217, 0.2);
  --ink: #f2ead9;
  --ink-2: #b9b3a6;
  --ink-3: #8f8a80;
  --gel: #f7c243;
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Film grain over everything, faint. */
body::after { content: ""; position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: 0.45; background-image: url(/grain.png); }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gel); outline-offset: 3px; border-radius: 6px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; color: var(--ink); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #000; font-weight: 600; }
.skip:focus { top: 12px; }

/* The bar at the head of a page. It lies over the first stage. */
.nav { position: absolute; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 60px; padding: 0 var(--gutter); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; transition: color 0.2s ease; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav-links { display: flex; gap: clamp(18px, 3vw, 34px); }
.wordmark { gap: 9px; font-size: 18px; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.wordmark img { width: 24px; height: 24px; }

/* Type. A product's name is large, heavy and tight; everything else is plain. */
.title { font-size: clamp(56px, 8.6vw, 124px); font-weight: 700; line-height: 0.94; letter-spacing: -0.055em; text-wrap: balance; }
.title--m { font-size: clamp(38px, 5vw, 72px); line-height: 0.98; letter-spacing: -0.05em; }
.head { font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
.lead { font-size: clamp(19px, 1.55vw, 23px); line-height: 1.42; letter-spacing: -0.012em; color: var(--ink-2); text-wrap: pretty; }
.caption { font-size: 13px; line-height: 1.45; color: var(--ink-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: 999px; background: var(--ink); color: #000; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; transition: background 0.2s ease, transform 0.2s ease; }
.btn:hover { background: #fff; transform: translateY(-1px); }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; font-weight: 500; }
.link::after { content: ""; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 0.2s ease; }
.link:hover::after { transform: translateX(4px) rotate(45deg); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; }

/* A stage holds one light and whatever stands in front of it. */
.stage { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 0 var(--gutter); text-align: center; }
.stage > * { position: relative; z-index: 1; }
.icon { width: 76px; height: 76px; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.7)); }

/* A light is clear until its first frame is drawn, then it comes up slowly. */
.light { position: absolute; z-index: 0; display: block; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; }
.light[data-light-state="on"] { opacity: 1; }

/* The projection: the app's window, with its light behind it. The light is a square, wider than
   the window and centred on it, and it fades into the ground above and below. */
.projection { position: relative; width: 100%; max-width: 820px; }
.projection .light {
  left: 50%; top: 50%; width: 138%; aspect-ratio: 1; transform: translate(-50%, -50%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, rgba(0, 0, 0, 0.3) 16%, #000 27%, #000 69%, transparent 86%);
  mask-image: linear-gradient(to bottom, transparent 4%, rgba(0, 0, 0, 0.3) 16%, #000 27%, #000 69%, transparent 86%);
}
.window { position: relative; z-index: 1; display: block; overflow: hidden; border-radius: 14px; background: #17181b; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 50px 120px -24px rgba(0, 0, 0, 0.85), 0 0 160px -50px var(--gel); }
.window img { width: 100%; }

/* The foot of a page. */
.foot { position: relative; padding: 48px var(--gutter) 44px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px; max-width: var(--measure); margin: 0 auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 30px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; transition: color 0.2s ease; }
.foot a:hover { color: var(--ink); }
.legal { max-width: var(--measure); margin: 18px auto 0; font-size: 12px; color: var(--ink-3); }

/* The homepage. */
.home-hero { padding-top: 128px; padding-bottom: 150px; }
.home-hero .title { margin-top: 22px; }
.home-hero .lead { max-width: 600px; margin-top: 22px; color: var(--ink); }
.home-hero .actions { margin-top: 28px; }
.home-hero .caption { margin-top: 16px; color: var(--ink-2); }
.home-hero .projection { max-width: 760px; margin-top: clamp(72px, 9vw, 120px); }
.house { padding-bottom: 120px; }
.crystal { width: 100%; max-width: 600px; aspect-ratio: 1; margin-top: -20px; }
.crystal .light { inset: 0; width: 100%; height: 100%; }
.house .title { margin-top: 12px; }
.house .lead { max-width: 520px; margin-top: 20px; }
.position { max-width: 640px; margin-top: 10px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; }

/* The page that an old address leaves behind. */
.moved { min-height: 100vh; justify-content: center; gap: 18px; padding-top: 96px; padding-bottom: 96px; }

@media (max-width: 560px) {
  .nav-links { gap: 18px; }
  .home-hero { padding-top: 104px; padding-bottom: 96px; }
  .house { padding-bottom: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .light, .btn, .link::after { transition: none; }
}
