/* Shared site chrome: landing page and the header strip on every tool page.
   Each tool keeps its own stylesheet for its own interior. */

/* The palette is the Farm Planner's, taken from its own variables rather than
   matched by eye — see :root in journey-guide.css, which is lifted from
   swgoh_graphic. The landing page is the front door to those tools, so it
   should be the same room: blue surfaces, blue-tinted muted text, gold for the
   one thing being pointed at. */
:root {
  --site-bg: #0a0c11;
  --site-card: #101c33;
  --site-card-2: #0c1729;
  --site-line: #2f4366;
  --site-line-soft: #1c2c4a;
  --site-txt: #eef2fb;
  --site-label: #cfd9ff;
  --site-mute: #9fb4ff;
  --site-gold: #ffd23f;
  --site-cyan: #4fd1ff;
}

* { box-sizing: border-box; }

body.site {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-txt);
  font: 14px/1.6 "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- header strip ---- */

/* One size on every page, the tools included — the strip is the site's own
   furniture, and a front door that is taller than the rooms behind it reads as
   two different sites. */
.site-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 24px;
  background: var(--site-card-2);
  border-bottom: 1px solid var(--site-line-soft);
  font-size: 13.5px;
  flex-wrap: wrap;
}
.site-header .brand {
  color: var(--site-txt); font-weight: 800; font-size: 14px; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
}
/* The channel mark. A rounded square rather than a circle: the artwork's cyan
   ring runs close to the edges, and a circular crop would bite into it.
   Served pre-scaled by scripts/build_brand_icon.py, so no image-rendering hint
   is wanted here — the source only looks like pixel art, and telling the
   browser to scale it as sprites would alias the ring. */
.site-header .brand-mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 7px;
}

.site-header .brand .brand-owner { color: var(--site-mute); font-weight: 700; }
.site-header a { text-decoration: none; }
.site-header .crumb { color: var(--site-mute); font-weight: 600; }
.site-header .crumb:hover { color: var(--site-txt); }
.site-header .crumb.current { color: var(--site-gold); }
.site-header .crumb-sep { color: var(--site-line); }
.site-header .tagline { color: #7184b5; font-size: 12px; }
.site-header .yt {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--site-mute);
  font-weight: 600;
}
.site-header .yt:hover { color: var(--site-txt); }

/* ---- loading + error states (HANDOVER.md §5) ---- */

.tool-loading, .tool-error {
  max-width: 620px;
  margin: 70px auto;
  padding: 0 24px;
  text-align: center;
  color: var(--site-mute);
}
.tool-error {
  text-align: left;
  border: 1px solid #5a2a3a;
  background: #1a1119;
  border-radius: 12px;
  padding: 20px 24px;
  color: #e8ecf3;
}
.tool-error h2 { margin: 0 0 8px; font-size: 16px; color: #f87171; }
.tool-error p { margin: 0 0 8px; }
.tool-error .hint { color: var(--site-mute); font-size: 12.5px; margin: 0; }

/* ---- landing page ---- */

/* The banner. A wash of the planner's own surface blue rather than a flat
   block, so the front door reads as the same place the tools do, fading back
   to the page ground before the cards start. */
.hero {
  background:
    radial-gradient(120% 130% at 12% -30%, #16305c 0%, rgba(16, 28, 51, 0) 62%),
    linear-gradient(180deg, var(--site-card-2) 0%, var(--site-bg) 100%);
  border-bottom: 1px solid var(--site-line-soft);
}
.hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 52px 24px 46px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: .4px;
}
/* The possessive sits above the name rather than in front of it: it is whose
   the tools are, not part of what they are called. */
.hero h1 .owner {
  display: block;
  font-size: clamp(13px, 2.4vw, 16px);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--site-mute);
  margin-bottom: 7px;
}
.hero h1 .sub { color: var(--site-gold); }
.hero .lede {
  color: var(--site-label);
  margin: 0;
  max-width: 60ch;
  font-size: 15px;
}
.hero .lede a { color: var(--site-cyan); text-decoration: none; }
.hero .lede a:hover { text-decoration: underline; }

.landing { max-width: 1000px; margin: 0 auto; padding: 34px 24px 90px; }

/* 404.html has no hero — it is a heading and a sentence inside .landing, so
   those keep their own rules rather than inheriting the front door's. */
.landing h1 { font-size: 30px; margin: 0 0 6px; font-weight: 800; letter-spacing: .5px; }
.landing h1 .sub { color: var(--site-gold); }
.landing > .lede { color: var(--site-label); margin: 0 0 40px; max-width: 62ch; }
.landing > .lede a { color: var(--site-cyan); }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--site-label);
  font-weight: 700;
  margin: 34px 0 14px;
}
.section-head:first-of-type { margin-top: 6px; }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--site-line-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; }

.card {
  display: block;
  background: var(--site-card);
  border: 1px solid var(--site-line-soft);
  border-radius: 12px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, background .15s;
}
.card:hover {
  border-color: var(--site-gold);
  background: #14223d;
  transform: translateY(-2px);
}
/* With the badges gone the title is the first thing in the card and has to do
   their job as well as its own: it is what you are picking between. */
.card h3 {
  margin: 0 0 9px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--site-txt);
  transition: color .15s;
}
.card:hover h3 { color: var(--site-gold); }
.card p { margin: 0; color: var(--site-mute); font-size: 13px; }

.card.soon { opacity: .5; pointer-events: none; }

.landing footer {
  margin-top: 54px;
  padding-top: 18px;
  border-top: 1px solid var(--site-line-soft);
  color: #7184b5;
  font-size: 12px;
}
.landing footer a { color: var(--site-mute); }

.tool-error code {
  background: #0f131b; padding: 2px 6px; border-radius: 4px;
  font-size: 11.5px; color: #9fb4ff; word-break: break-all;
}
