/* Lumen Lore Works: the page is relit by the Daylight / Blacklight / Afterglow switch.
   Palette values come from the real filaments (Jade White, Neon Orange, Neon Magenta,
   Neon Yellow, GITD Green). */

/* Fonts are self-hosted (latin subset, SIL Open Font License) so text renders without a trip to Google. */
@font-face { font-family: Figtree; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/figtree.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/figtree-italic.woff2) format("woff2"); }
@font-face { font-family: Kalnia; font-style: normal; font-weight: 300 700; font-stretch: 100% 125%; font-display: swap; src: url(/fonts/kalnia.woff2) format("woff2"); }

:root,
[data-light="d"] {
  --bg: #23170f;          /* walnut, the table every daylight photo is shot on */
  --bg-raise: #2e1f15;
  --ink: #f4ead7;         /* Jade White */
  --muted: #c4b093;
  --line: rgba(244, 234, 215, .16);
  --accent: #ff7800;      /* Neon Orange */
  --on-accent: #1a0f08;
  --accent-2: #f7d959;
  --lamp: rgba(255, 190, 110, .14);
  --headline: var(--ink);
  --headline-glow: none;
}
[data-light="u"] {
  --bg: #160b33;
  --bg-raise: #21124a;
  --ink: #f1ecff;
  --muted: #b3a3e6;
  --line: rgba(241, 236, 255, .16);
  --accent: #f21185;      /* Neon Magenta */
  --on-accent: #fff;
  --accent-2: #e5db2e;    /* Neon Yellow */
  --lamp: rgba(155, 92, 255, .32);
  --headline: #e5db2e;
  --headline-glow: 0 0 .32em rgba(242, 17, 133, .65), 0 0 1.2em rgba(155, 92, 255, .45);
}
[data-light="g"] {
  --bg: #030504;
  --bg-raise: #0a110c;
  --ink: #c9f3cf;
  --muted: #7d9f84;
  --line: rgba(161, 255, 172, .14);
  --accent: #a1ffac;      /* GITD Green */
  --on-accent: #031006;
  --accent-2: #7ac0e9;    /* GITD Blue */
  --lamp: rgba(161, 255, 172, .05);
  --headline: #a1ffac;
  --headline-glow: 0 0 .4em rgba(161, 255, 172, .5);
}

:root {
  --display: Kalnia, "Iowan Old Style", Georgia, serif;
  --body: Figtree, system-ui, sans-serif;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.3, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 40rem at 85% -10%, var(--lamp), transparent 70%) fixed,
    var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }

h1, h2, .logo span, .price {
  font-family: var(--display);
  font-variation-settings: "wdth" 100;
  font-weight: 500;
  letter-spacing: -.005em;
}
h2 { font-variation-settings: "wdth" 112; }
h1 { font-size: clamp(2.4rem, 5vw, 4.3rem); line-height: 1.04; text-wrap: balance; margin: 0 0 .35em; color: var(--headline); text-shadow: var(--headline-glow); transition: color .6s var(--ease), text-shadow .6s var(--ease); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1; margin: 0; }
.kicker { display: block; margin-bottom: .7em; font: 600 .82rem/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); text-shadow: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px 28px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color .6s var(--ease);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo span { font-size: 1.2rem; font-weight: 600; white-space: nowrap; color: var(--headline); text-shadow: var(--headline-glow); transition: color .6s var(--ease); }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; padding: 4px 0; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* the switch -------------------------------------------------------------- */
.switch {
  display: inline-flex; padding: 4px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-raise);
}
.switch button {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 7px 14px;
  background: transparent; color: var(--muted);
  font: 500 .88rem var(--body); cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.switch button:hover { color: var(--ink); }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.bulb { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.bulb-d { background: #ffc874; box-shadow: 0 0 6px #ffc874; }
.bulb-u { background: #9b5cff; box-shadow: 0 0 6px #9b5cff; }
.bulb-g { background: #a1ffac; box-shadow: 0 0 6px #a1ffac; }
.switch-hero { margin: 8px 0 28px; }
.switch-hero button { padding: 12px 22px; font-size: 1rem; }
.switch-hero .bulb { width: 11px; height: 11px; }

/* buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 6px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
  transition: background-color .6s var(--ease), color .6s var(--ease), filter .2s;
}
.btn:hover { color: var(--on-accent); filter: brightness(1.12); }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.text-link { font-weight: 500; }

/* layout ------------------------------------------------------------------ */
main > section, .crumbs, .product, .guide { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding: clamp(48px, 7vw, 96px) 0 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px 48px; align-items: end; margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 52ch; margin: 0; }
.section-title a { text-decoration: none; }
.section-title a:hover { color: var(--accent); }
.section > .section-title { margin-bottom: 24px; }
.lede { color: var(--muted); font-size: 1.2rem; max-width: 46ch; }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
  align-items: center; padding: clamp(36px, 6vw, 80px) 0 0;
}
.hero-links { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin: 0; }
.hero-piece { text-decoration: none; display: block; }
.hero-piece .frame { border-radius: 10px; }
.hero-piece img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero-caption { display: block; margin-top: 10px; color: var(--muted); font-size: .92rem; }

/* gallery wall: one large piece, the rest hung beside it */
.wall { display: grid; gap: 32px 22px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.wall[data-count="5"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wall[data-count="5"] .piece-feature { grid-column: span 2; grid-row: span 2; }
.wall[data-count="3"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.wall[data-count="3"] .piece-feature { grid-row: span 2; }
.wall[data-count="2"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }

.piece {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-content: start; column-gap: 12px;
  text-decoration: none; color: var(--ink);
}
.piece .frame { grid-column: 1 / -1; }
.piece img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.piece-feature { grid-template-rows: 1fr auto; align-content: stretch; }
.piece-feature img { height: 100%; }
.piece-name { margin-top: 10px; font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.piece-feature .piece-name { font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1.15; }
.piece-price { margin-top: 11px; color: var(--muted); font-size: .95rem; }
.piece:hover { color: var(--ink); }
.piece:hover .piece-name { color: var(--accent); }

.frame { position: relative; display: block; overflow: hidden; border-radius: 6px; background: var(--bg-raise); }
.frame img { transition: opacity .25s var(--ease), filter .4s var(--ease), transform .6s var(--ease); }
.piece:hover .frame img { transform: scale(1.025); }
.frame img.fading { opacity: .15; }
.dark-note {
  position: absolute; inset: auto 0 0; padding: 10px 12px;
  font-size: .85rem; color: var(--ink); opacity: 0; transition: opacity .4s var(--ease);
}
.dark-note:empty { display: none; }
.unlit .frame img { opacity: .22; filter: grayscale(.7); }
.unlit .dark-note { opacity: 1; }

.relief-note { padding-bottom: 24px; }
.relief-note p { color: var(--muted); max-width: 60ch; margin-top: 14px; }

/* series pages */
.page-head { padding: clamp(40px, 6vw, 72px) 0 0; }
.page-head .lede { margin-bottom: 0; }
.series-intro { columns: 2 22rem; column-gap: 48px; color: var(--muted); }
.series-intro p { break-inside: avoid; }

/* guide page */
.guide > :not(.page-head) { max-width: 68ch; }
.guide > .page-head { padding-top: clamp(24px, 4vw, 48px); }
.guide h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 1.6em 0 .5em; }
.guide p, .guide li { color: var(--muted); }
.guide strong { color: var(--ink); font-weight: 600; }

/* product ----------------------------------------------------------------- */
.crumbs { display: flex; gap: 10px; padding-top: 24px; font-size: .92rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding-top: 20px; }
.gallery .frame { border-radius: 10px; }
#main-photo { width: 100%; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 12px; }
.thumbs button {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: 500 .75rem var(--body); text-align: left;
}
.thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 5px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s; }
.thumbs span { display: block; margin-top: 5px; }
.thumbs button[aria-pressed="true"] { color: var(--ink); }
.thumbs button[aria-pressed="true"] img { outline-color: var(--accent); }
.details h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.price { font-size: 1.6rem; color: var(--accent); margin: 0 0 20px; transition: color .6s var(--ease); }
.prose { max-width: 58ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 36px 0 20px; }
.facts div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .85rem; margin-bottom: 2px; }
.facts dd { margin: 0; font-size: .97rem; }
.muted { color: var(--muted); }
.note { font-size: .88rem; color: var(--muted); }
.tags { font-size: .88rem; color: var(--muted); }

/* footer ------------------------------------------------------------------ */
.site-footer {
  width: min(var(--max), 100% - 2 * var(--gutter)); margin: clamp(64px, 8vw, 112px) auto 0;
  padding: 36px 0 40px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px 48px; color: var(--muted);
}
.foot-main { display: flex; gap: 20px; align-items: flex-start; }
.foot-main p { max-width: 50ch; margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; justify-self: end; text-align: right; }
.foot-links a { color: var(--ink); }
.fine { grid-column: 1 / -1; font-size: .82rem; margin: 0; max-width: 90ch; }

/* responsive -------------------------------------------------------------- */
@media (max-width: 1080px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; }
  .switch-compact { grid-column: 2; justify-self: end; }
}
@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .site-header nav { gap: 18px; overflow-x: auto; }
  .switch-compact { grid-column: 1 / -1; grid-row: 3; justify-self: stretch; }
  .switch-compact button { flex: 1; justify-content: center; padding: 7px 8px; }
  .logo span { font-size: 1rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-piece { order: -1; }
  .switch-hero { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .wall, .wall[data-count] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .wall[data-count="5"] .piece-feature, .wall[data-count="3"] .piece-feature { grid-column: 1 / -1; grid-row: auto; }
  .piece { grid-template-columns: 1fr; }
  .piece-price { margin-top: 2px; }
  .piece-name { font-size: 1rem; }
  .product { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
