/* Kings Collide site. Tokens follow docs/design-system.md ("Vault"); design: site/design/site.pen. */

@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-800i.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0d;
  --surface: #15151b;
  --line: #26252e;
  --ink: #f4f1ea;
  --ink-2: #c9c7cf;
  --mute: #8b8a93;
  --accent: #ffb224;
  --accent-hi: #ffd15c;
  --accent-lo: #ff9f0a;
  --on-accent: #1a1206;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gold: linear-gradient(155deg, #d9a02a 0%, #e8be5a 28%, #fff8e0 52%, #e9b43a 74%, #fff0b8 100%);
  --gutter: clamp(20px, 8.33vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
/* short pages: the footer sits at the bottom of the screen, never a band of empty page under it */
body.page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body.page > main { flex: 1 0 auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--on-accent); }

/* ---------- Wordmark: gold foil over a dark outline and a deeper gold edge (as in the app) ---------- */

.wordmark {
  margin: 0;
  font: italic 800 var(--wm-size, 176px)/0.86 var(--display);
  letter-spacing: 0;
  text-transform: uppercase;
}
.wordmark > span[data-text] {
  position: relative;
  display: block;
  color: #8e5e12;
  -webkit-text-stroke: 0.1em rgba(26, 18, 6, 0.8);
  paint-order: stroke fill;
  text-shadow: 0 0.035em 0 #8e5e12;
}
.wordmark > span[data-text]::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: var(--gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.tagline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--ink);
  font: 700 15px/1 var(--body);
  letter-spacing: 6px;
  text-transform: uppercase;
  white-space: nowrap;
}
.tagline::before, .tagline::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 178, 36, 0.55);
}
.gem {
  width: 6px; height: 6px; flex: none;
  background: var(--accent);
  transform: rotate(45deg);
}
/* letter spacing also trails the last letter; pull it back so the gems sit evenly */
.tagline .word { margin-right: -6px; }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 22px;
  border: 1px solid rgba(255, 178, 36, 0.4);
  border-radius: 999px;
  background: rgba(10, 10, 13, 0.6);
  color: var(--ink);
  font: 700 22px/1 var(--display);
  letter-spacing: 4px;
  text-transform: uppercase;
}
.soon::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

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

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 28px var(--gutter);
  font-size: 14px;
  line-height: 1.4;
}
.site-footer small { color: var(--mute); font-size: inherit; }
.footer-links { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer-links li + li::before { content: "·"; color: var(--mute); margin-right: 12px; }
.footer-links a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.page .site-footer { border-top: 1px solid var(--line); }

/* ---------- Home ----------
   Base: portrait screens (phones, upright tablets) - the tall picture on top and the lockup under it,
   as on the app's title screen. Wide screens (landscape, 768 px and up) override below. */

.home { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.hero-art { position: absolute; left: 0; right: 0; top: calc(-28 / 390 * 100vw); z-index: -2; }
.hero-art img { width: 100%; height: auto; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,13,.4) 0, rgba(10,10,13,0) 14vh);
}
.lockup {
  --wm-size: min(23.6vw, 140px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: calc(var(--wm-size) * 4.3);
  margin: 0 auto;
  padding: 0 20px 12px;
  /* the lockup sits where the picture's ground starts, but never pushes off a short screen */
  margin-top: max(40vw, min(115vw, calc(100vh - var(--wm-size) * 1.72 - 230px)));
  margin-top: max(40vw, min(115vw, calc(100svh - var(--wm-size) * 1.72 - 230px)));
}
.lockup::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  top: calc(var(--wm-size) * -1.05);
  height: 300vh;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,13,0) 0, rgba(10,10,13,.95) calc(var(--wm-size) * 2.6), var(--bg) calc(var(--wm-size) * 3.5));
}
.lockup .wordmark { text-align: center; }
.lockup .tagline { align-self: stretch; font-size: 12.5px; letter-spacing: 5px; }
.lockup .tagline .word { margin-right: -5px; }
.lockup .soon { font-size: 19px; }
.home .site-footer { flex-direction: column-reverse; padding: 36px 20px 28px; }
.home .site-footer small { font-size: 13px; }

@media (min-width: 768px) and (min-aspect-ratio: 5/4) {
  .hero-art { inset: 0; }
  .hero-art img { height: 100%; object-fit: cover; object-position: 50% 45%; }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(10,10,13,.92) 0%, rgba(10,10,13,.69) 32%, rgba(10,10,13,0) 66%),
      linear-gradient(180deg, rgba(10,10,13,0) 55%, rgba(10,10,13,.8) 86%, var(--bg) 100%);
  }
  .lockup {
    --wm-size: clamp(88px, min(12.2vw, 19.5vh), 200px);
    align-items: flex-start;
    gap: 28px;
    width: max-content;
    max-width: none;
    margin: auto 0;
    padding: 48px var(--gutter) 24px;
  }
  .lockup::before { content: none; }
  .lockup .wordmark { text-align: left; }
  .lockup .tagline { font-size: 15px; letter-spacing: 6px; }
  .lockup .tagline .word { margin-right: -6px; }
  .lockup .soon { font-size: 22px; }
  .home .site-footer { position: absolute; left: 0; right: 0; bottom: 0; flex-direction: row; padding: 24px var(--gutter); }
  .home .site-footer small { font-size: 14px; }
}

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

.page-head {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(10,10,13,.72) 0%, rgba(10,10,13,.85) 55%, var(--bg) 100%),
    url("/img/hero-wide-1024.jpg");
  background-image:
    linear-gradient(180deg, rgba(10,10,13,.72) 0%, rgba(10,10,13,.85) 55%, var(--bg) 100%),
    image-set(url("/img/hero-wide-1024.avif") type("image/avif"), url("/img/hero-wide-1024.webp") type("image/webp"), url("/img/hero-wide-1024.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: 50% 45%;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
}
.nav-mark {
  font: italic 800 30px/1 var(--display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  background: var(--gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1.5px 0 #8e5e12);
}
.nav-mark:hover { color: transparent; }
.nav ul { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }
.nav ul a {
  display: block;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.nav ul a:hover { color: var(--ink); }
.nav ul a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.head-title, .content {
  width: 100%;
  max-width: calc(720px + 40px);
  margin: 0 auto;
  padding: 0 20px;
}
.head-title { padding-bottom: 44px; }
.kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font: 700 12px/1.3 var(--body);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.head-title h1 {
  margin: 0;
  color: var(--ink);
  font: italic 800 84px/0.9 var(--display);
  text-transform: uppercase;
}

.content { padding-top: 16px; padding-bottom: 112px; }
.content .intro { margin: 0 0 44px; color: var(--ink); font-size: 19px; }
.content section + section { margin-top: 44px; }
.content h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--ink);
  font: 700 28px/1.2 var(--display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.content h2::before {
  content: "";
  width: 6px; height: 6px; flex: none;
  margin: 0 1.5px;
  background: var(--accent);
  transform: rotate(45deg);
}
.content p { margin: 0; }
.content p + p { margin-top: 14px; }
.items { display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 4px 0 0; list-style: none; }
.items li { padding-left: 21px; border-left: 2px solid var(--line); }
.items b { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 700; line-height: 1.5; }

.mail-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  margin: 0 0 44px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.mail-card .label {
  margin: 0 0 6px;
  color: var(--mute);
  font: 700 12px/1.3 var(--body);
  letter-spacing: 2px;
}
.mail-card .address {
  font: 700 30px/1.15 var(--display);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.mail-card .address:hover { text-decoration: underline; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo));
  color: var(--on-accent);
  font: 700 22px/1 var(--display);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { color: var(--on-accent); filter: brightness(1.06); }
.button svg { width: 20px; height: 20px; flex: none; }

@media (max-width: 767px) {
  .page-head { min-height: 250px; }
  .nav { padding: 20px; }
  .nav-mark { font-size: 22px; }
  .nav ul { gap: 18px; }
  .nav ul a { font-size: 14px; }
  .head-title { padding-bottom: 28px; }
  .kicker { margin-bottom: 10px; font-size: 11px; }
  .head-title h1 { font-size: 54px; }
  .content { padding-top: 8px; padding-bottom: 72px; font-size: 16px; }
  .content .intro { margin-bottom: 36px; font-size: 17px; }
  .content section + section { margin-top: 36px; }
  .content h2 { font-size: 24px; }
  .items { gap: 16px; }
  .items li { padding-left: 16px; }
  .mail-card { flex-direction: column; align-items: stretch; margin-bottom: 36px; padding: 22px; }
  .mail-card .address { font-size: 23px; }
  .page .site-footer { flex-direction: column-reverse; padding: 24px 20px; }
  .page .site-footer small { font-size: 13px; }
}
@media (max-width: 359px) {
  .nav ul { gap: 12px; }
  .nav-mark { font-size: 19px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: approach 2.4s cubic-bezier(.22,.61,.36,1) both; }
  @keyframes approach { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
}
