/* ============================================================
   GFMCloud hub styles
   Direction: the dark room, as a night game. There is a light above the
   page: Wrigley's light towers at the top, a warm stadium glow falling on
   the logo and the project cards, and a stadium light bank to close.
   Idea: 25 of 30 ballparks becomes a light bank, one lamp per park.
   No build step: this file is the source. The date in the filename is the
   cache key; rename it (and the <link>) whenever this file changes.
   ============================================================ */

/* brand-source: default; dealt palette, plum-black swapped for the logo package's midnight blue */
:root {
  --deal-bg: #061226;
  --deal-surface: #0b3d78;        /* GFMCloud midnight blue, from the logo package */
  --deal-ink: #eef2f8;
  --deal-muted: #a9b7cc;
  --deal-accent: #ffd27a;          /* stadium light */
  --deal-accent-ink: #061226;
  --deal-line: rgba(238, 242, 248, 0.14);
  --deal-font: "Switzer", system-ui, -apple-system, "Segoe UI", sans-serif;
  --glow: rgba(255, 210, 122, 0.30);

  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --step-head: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --step-display: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem);

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 160px;
  --shell: min(1200px, 100% - 40px);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  background: var(--deal-bg);
  color: var(--deal-ink);
  font-family: var(--deal-font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* The light above the page: the photo of Wrigley's towers, toned midnight,
   a warm glow from the top, brand blue as the mid-tone, all falling off into the ground */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: min(1040px, 120svh);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 42% at 50% -6%, var(--glow), rgba(255, 210, 122, 0) 70%),
    linear-gradient(to bottom, rgba(6, 18, 38, 0.12) 0%, rgba(6, 18, 38, 0.45) 45%, rgba(6, 18, 38, 0.90) 78%, var(--deal-bg) 100%),
    radial-gradient(110% 70% at 50% 0%, rgba(11, 61, 120, 0.55), rgba(11, 61, 120, 0) 70%),
    url("assets/photo/wrigley-night-1600.jpg") center 30% / cover no-repeat;
  background:
    radial-gradient(60% 42% at 50% -6%, var(--glow), rgba(255, 210, 122, 0) 70%),
    linear-gradient(to bottom, rgba(6, 18, 38, 0.12) 0%, rgba(6, 18, 38, 0.45) 45%, rgba(6, 18, 38, 0.90) 78%, var(--deal-bg) 100%),
    radial-gradient(110% 70% at 50% 0%, rgba(11, 61, 120, 0.55), rgba(11, 61, 120, 0) 70%),
    image-set(url("assets/photo/wrigley-night-1600.webp") type("image/webp"), url("assets/photo/wrigley-night-1600.jpg") type("image/jpeg")) center 30% / cover no-repeat;
}

/* A faint grain so the large gradients don't band; invisible as texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--deal-ink); text-underline-offset: 4px; }
h1, h2 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--deal-accent); outline-offset: 3px; }
#work:focus { outline: none; }
.defs { position: absolute; }

/* Visually hidden, still read aloud */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: var(--s2);
  z-index: 10;
  padding: 12px var(--s3);
  background: var(--deal-accent);
  color: var(--deal-accent-ink);
  border-radius: 999px;
  font-weight: 500;
}
.skip:focus { left: var(--s2); }

.shell { width: var(--shell); margin-inline: auto; }

/* ── Top bar ──────────────────────────────────────────────── */

.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: var(--s2); padding: var(--s3) 0; font-size: var(--step-small); }
.bar .word { display: inline-block; padding: 12px 0; font-weight: 500; text-decoration: none; }
.bar nav { display: flex; flex-wrap: wrap; gap: 0 var(--s2); }
.bar nav a { padding: 12px 8px; color: var(--deal-ink); text-decoration: none; }
.bar nav a:hover { text-decoration: underline; }

/* ── First screen: lights on, the monogram lit ────────────── */

.hero { display: grid; place-items: center; text-align: center; padding: var(--s6) 0 var(--s5); }
.lamp-row { display: block; width: 150px; height: 20px; margin: 0 auto var(--s4); overflow: visible; }
.logo { display: block; width: min(64vw, 280px); margin: 0 auto; }
.logo img { width: 100%; filter: drop-shadow(0 0 28px rgba(255, 210, 122, 0.40)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5)); }
.hero h1 { margin: var(--s4) 0 var(--s2); font-size: var(--step-display); font-weight: 400; line-height: 1.05; letter-spacing: -0.035em; text-shadow: 0 2px 24px rgba(6, 18, 38, 0.8); }
.hero p { margin: 0 auto var(--s4); max-width: 44ch; text-shadow: 0 1px 12px rgba(6, 18, 38, 0.9); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s2) var(--s4); }
.text-link { display: inline-block; padding: 12px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--s4);
  background: var(--deal-accent);
  color: var(--deal-accent-ink);
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 28px -8px rgba(255, 210, 122, 0.55);
  transition: transform 150ms ease-out;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

/* ── Box score: one dense row of real numbers ─────────────── */

.boxscore { margin-top: var(--s4); }
.score {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--deal-line);
  border-radius: 10px;
  background: rgba(11, 61, 120, 0.45);
  overflow: hidden;
}
.score div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: var(--s3) var(--s3) 20px; border-left: 1px solid var(--deal-line); }
.score div:first-child { border-left: 0; }
.score dd { margin: 0; font-size: 2.5rem; font-weight: 500; line-height: 1; letter-spacing: -0.03em; color: var(--deal-accent); font-variant-numeric: tabular-nums; }
.score .of { font-size: 1.25rem; font-weight: 400; color: var(--deal-muted); }
.score dt { color: var(--deal-muted); font-size: var(--step-small); line-height: 1.35; }
.score-note { margin: var(--s1) 0 0; color: var(--deal-muted); font-size: var(--step-small); text-align: right; }

/* ── The work: one horizontal strip, swipe or arrows ─────── */

.work { padding: var(--s7) 0 0; }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.work-head h2 { margin: 0; font-size: var(--step-head); font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; }
.work-nav { display: flex; align-items: center; gap: var(--s2); }
.work-nav[hidden] { display: none; }
.work-pos { min-width: 4.5em; color: var(--deal-muted); font-size: var(--step-small); font-variant-numeric: tabular-nums; text-align: right; }
.nav-btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--deal-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--deal-ink);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}
.nav-btn:hover:not(:disabled) { background: var(--deal-surface); }
.nav-btn:disabled { opacity: 0.35; cursor: default; }

/* The next project peeks in from the right, which says "there is more" without a scrollbar.
   Bottom padding leaves room for the cards' shadows inside the scroll box. */
.strip {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(640px, 82%);
  gap: var(--s4);
  margin: var(--s4) 0 0;
  padding: 0 0 var(--s4);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; min-width: 0; }

/* Each screenshot is an exhibit: a brand-blue plate, light falling on its top edge,
   a small lamp beside the real subdomain */
.lit {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  background: var(--deal-surface);
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.9);
}
.lit::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(70% 55% at 50% -10%, rgba(255, 210, 122, 0.22), rgba(255, 210, 122, 0) 70%);
}
.lit .url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  color: var(--deal-ink);
  font-size: 0.875rem;
  letter-spacing: 0;
}
.lit .url::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--deal-accent);
  box-shadow: 0 0 8px 2px rgba(255, 210, 122, 0.6);
}
.lit img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: left top;
  filter: saturate(0.85);
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  background: var(--deal-surface);
}

.eyebrow { display: block; margin-top: var(--s3); color: var(--deal-accent); font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.slide h3 { margin: 4px 0 var(--s1); font-size: 1.5rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
.card { display: block; color: inherit; text-decoration: none; border-radius: 10px; }
/* The strip clips anything outside it, so the focus ring sits inside the card */
.card:focus-visible { outline-offset: -3px; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.slide p { margin: 0; max-width: 52ch; }
.arrow { color: var(--deal-accent); }

/* ── About ────────────────────────────────────────────────── */

.section { padding: var(--s7) 0 0; }
.section h2 { margin: 0 0 var(--s2); font-size: var(--step-head); font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; }
.details { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--deal-line); }
.details p { margin: 0 0 var(--s3); max-width: 62ch; }
.details .lead { font-size: 1.375rem; line-height: 1.4; letter-spacing: -0.02em; }
.details dl { margin: 0; }
.details dt { margin-top: var(--s3); color: var(--deal-muted); font-size: var(--step-small); }
.details dt:first-child { margin-top: 0; }
.details dd { margin: 4px 0 0; }
.details dd a { display: inline-block; padding: 10px 0; }

/* ── Personal close: a stadium light bank, lit from inside ── */

#ballparks { position: relative; }
#ballparks::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(45% 70% at 22% 55%, rgba(255, 210, 122, 0.10), rgba(255, 210, 122, 0) 70%);
}
.board-wrap { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: var(--s6); align-items: center; }
.bank { display: block; width: 100%; height: auto; overflow: visible; }
.bank .housing { fill: rgba(11, 61, 120, 0.55); stroke: rgba(169, 183, 204, 0.35); }
.bank .housing-in { fill: rgba(6, 18, 38, 0.65); }
.bank .mast { fill: rgba(169, 183, 204, 0.30); }
.bank text { fill: var(--deal-muted); font: 500 19px var(--deal-font); }
.board-copy p { margin: 0 0 var(--s2); max-width: 56ch; }
.board-copy .todo { color: var(--deal-muted); font-size: var(--step-small); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s7) 0 var(--s5); color: var(--deal-muted); font-size: var(--step-small); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.foot-links a { display: inline-block; padding: 12px 0; color: var(--deal-ink); }
.foot .credit { flex-basis: 100%; margin: 0; font-size: 0.875rem; }
.foot .credit a { color: var(--deal-muted); }

@media (max-width: 1000px) {
  .score { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .score div { border-top: 1px solid var(--deal-line); }
  .score div:nth-child(-n+3) { border-top: 0; }
  .score div:nth-child(4) { border-left: 0; }
}

@media (max-width: 860px) {
  /* The photo is drawn at least 150svh wide, so it is 56.25% of that tall (16:9).
     The layer ends exactly where the photo does, so the fade to the ground finishes on the photo's last row. */
  body::before {
    height: calc(max(100vw, 150svh) * 0.5625);
    background:
      radial-gradient(80% 40% at 50% -6%, var(--glow), rgba(255, 210, 122, 0) 70%),
      linear-gradient(to bottom, rgba(6, 18, 38, 0.35) 0%, rgba(6, 18, 38, 0.6) 45%, rgba(6, 18, 38, 0.92) 78%, var(--deal-bg) 100%),
      image-set(url("assets/photo/wrigley-night-900.webp") type("image/webp"), url("assets/photo/wrigley-night-1600.jpg") type("image/jpeg")) center top / max(100%, 150svh) auto no-repeat;
  }
  .board-wrap, .details { grid-template-columns: 1fr; gap: var(--s4); }
  .strip { grid-auto-columns: 86%; gap: var(--s3); }
  .work-pos { min-width: 0; text-align: left; }
  .bank { max-width: 420px; }
}

@media (max-width: 560px) {
  .score { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score div { border-left: 1px solid var(--deal-line); border-top: 1px solid var(--deal-line); }
  .score div:nth-child(odd) { border-left: 0; }
  .score div:nth-child(-n+2) { border-top: 0; }
  .score div:nth-child(5) { grid-column: 1 / -1; }
  .score dd { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-btn { transition: none; }
  .btn:hover { transform: none; }
  .strip { scroll-behavior: auto; }
}

/* Windows high contrast: drop the photo and glow, keep the logo and light bank on their own dark plates */
@media (forced-colors: active) {
  body::before, body::after, #ballparks::before, .lit::after { display: none; }
  .logo { forced-color-adjust: none; background: #061226; padding: 12px; border-radius: 8px; }
  .bank { forced-color-adjust: none; }
  .bank text { fill: CanvasText; }
  .btn, .skip, .nav-btn { border: 2px solid ButtonText; }
}
