/* Night of the Gray Death: module home.
   Layout: the Sentinel Productions frame (leather background, sidebar, parchment main) carried over from
   pathfinder.html, with a Runelords-style feature card for the latest dispatch and an ash-gray archive band
   below, the way the Starfinder band shifts palette on the Pathfinder page.
   One dark look, like the rest of the site, so every colour is set here. */

:root {
  /* From the Sentinel site */
  --bg-color: #050505;
  --text-main: #e0e0e0;
  --pf-parchment: #e8dbc3;
  --pf-brown: #5c4033;
  --pf-gold: #c5a059;
  --pf-red: #8a1c1c;
  --pf-ink: #2b1a0f;
  --border-color: #333;
  --font-main: 'Inter', sans-serif;
  --font-serif: 'Crimson Text', serif;
  --font-header: 'Cinzel', serif;

  /* Gray Death */
  --gd-ash: #24221F;
  --gd-ash-deep: #141312;
  --gd-bone: #DCD5C8;
  --gd-dim: #ABA396;
  --gd-line: #4A4541;
  --gd-fog: rgba(200, 192, 180, .13);

  /* The Talons' papers */
  --paper: #E9D9B8;
  --ink: #2B1E14;
  --ink-soft: #5A4632;
  --rubric: #7A1E18;
  --edge: rgba(110, 72, 28, .42);
  --hand: 'Meddon', 'IM Fell DW Pica', Georgia, serif;
  --fell: 'IM Fell DW Pica', Georgia, serif;

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  background-image: url('https://www.transparenttextures.com/patterns/dark-leather.png');
}
a:focus-visible { outline: 2px solid var(--pf-gold); outline-offset: 3px; }

.container {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  padding-block: 2rem;
  padding-left: max(2rem, env(safe-area-inset-left, 0px));
  padding-right: max(2rem, env(safe-area-inset-right, 0px));
}

/* Sidebar, as on the rest of the site */
aside { display: flex; flex-direction: column; gap: 1.5rem; color: #e0e0e0; }
.brand-header { text-align: center; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.brand-star { font-size: 3rem; color: var(--pf-red); line-height: 1.2; }
.brand-header h2 { font-family: var(--font-header); font-size: 1.2rem; margin-top: .5rem; color: #fff; text-transform: uppercase; letter-spacing: 2px; }
.brand-header a { color: inherit; text-decoration: none; }

aside nav ul { list-style: none; }
aside nav li { margin-bottom: .5rem; }
aside nav a {
  display: block; padding: 12px 16px; background: #111; color: #e0e0e0;
  text-decoration: none; border-left: 3px solid #444; transition: all .3s ease;
  font-weight: 600; font-variant: small-caps; letter-spacing: 1px;
}
aside nav a:hover, aside nav a.current { border-left-color: var(--pf-gold); background: #2e2618; color: var(--pf-gold); padding-left: 24px; }

.status-box {
  background: #1a1510;
  padding: 1rem;
  border: 1px solid var(--pf-brown);
  font-size: .85rem;
  color: var(--pf-parchment);
  border-radius: 4px;
  border-left: 3px solid var(--pf-gold);
}

/* Parchment main */
main {
  background-color: var(--pf-parchment);
  color: var(--pf-ink);
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(0, 0, 0, .5);
  font-family: var(--font-serif);
  overflow: hidden;
  min-width: 0;
}
.pf-section { padding: 3rem; position: relative; }
.breadcrumb { margin-bottom: 1rem; font-size: .9rem; font-family: var(--font-main); }
.breadcrumb a { color: var(--pf-brown); text-decoration: none; font-weight: bold; }
.breadcrumb a:hover { text-decoration: underline; }

.pf-header { text-align: center; margin-bottom: 3rem; border-bottom: 3px double var(--pf-brown); padding-bottom: 2rem; }
.pf-title {
  font-family: var(--font-header);
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  color: var(--pf-ink);
  text-shadow: 2px 2px 0 var(--pf-gold);
  letter-spacing: -1px;
  line-height: 1.05;
  text-wrap: balance;
}
.pf-subtitle {
  font-family: var(--font-header);
  color: var(--pf-red);
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: .75rem;
}
.intro-text {
  text-align: justify;
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 3rem auto;
  border-left: 4px solid var(--pf-gold);
  padding-left: 1.5rem;
}

/* Latest dispatch, after the site's Active Campaign card */
.feature { margin-bottom: 3rem; }
.feature-label {
  font-family: var(--font-main);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--pf-brown);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature-label::before { content: ''; width: 8px; height: 8px; background: var(--pf-red); border-radius: 50%; }
.feature-label::after { content: ''; flex: 1; height: 1px; background: var(--pf-brown); opacity: .3; }

.dispatch-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  background: linear-gradient(135deg, #2A2724 0%, #1C1A18 50%, #121110 100%);
  border: 2px solid var(--gd-line);
  border-radius: 6px;
  overflow: hidden;
  transition: all .3s ease;
  text-decoration: none;
  color: inherit;
}
.dispatch-card:hover { border-color: var(--pf-gold); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0, 0, 0, .4), 0 0 20px rgba(201, 162, 39, .1); }
.dispatch-seal {
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #34302C;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, var(--gd-fog), transparent 70%),
    radial-gradient(ellipse 100% 40% at 50% 100%, rgba(200, 192, 180, .08), transparent 70%);
}
.dispatch-seal svg { width: 92px; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.dispatch-body { padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; }
.dispatch-overline { font-family: var(--font-main); font-size: .65rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #c9a227; margin-bottom: 6px; }
.dispatch-title { font-family: var(--font-header); font-size: 1.8rem; color: #F0EDE8; margin-bottom: 8px; letter-spacing: 1px; line-height: 1.2; }
.dispatch-desc { font-family: var(--font-serif); font-size: 1rem; color: #B5AD9F; line-height: 1.6; margin-bottom: 14px; }
.dispatch-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.dispatch-tag {
  font-family: var(--font-main); font-size: .62rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 10px; border: 1px solid var(--gd-line); border-radius: 3px; color: #A49C90; background: rgba(0, 0, 0, .3);
}
.dispatch-tag.lead { border-color: rgba(201, 162, 39, .4); color: #c9a227; background: rgba(201, 162, 39, .08); }
.dispatch-cta { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-main); font-size: .8rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #c9a227; transition: all .2s; }
.dispatch-card:hover .dispatch-cta { color: #e8c84a; gap: 12px; }

/* The Agent: the site's own adventure-path tile */
.section-head { font-family: var(--font-header); color: var(--pf-brown); font-size: 2rem; border-bottom: 1px solid var(--pf-brown); margin-bottom: 1.5rem; font-weight: 400; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.ap-card { background: #fff; border: 1px solid #ccc; padding: 1rem; text-align: center; transition: transform .2s; box-shadow: 3px 3px 5px rgba(0, 0, 0, .1); }
.ap-card:hover { transform: translateY(-5px); border-color: var(--pf-red); }
.ap-title { font-family: var(--font-header); font-weight: bold; font-size: 1.1rem; color: var(--pf-red); margin-bottom: .5rem; }
.ap-desc { font-size: .95rem; color: #444; }
.ap-link {
  display: inline-block; margin-top: 1rem; text-decoration: none; color: var(--pf-brown); font-weight: bold;
  font-family: var(--font-main); font-size: .8rem; text-transform: uppercase; border: 1px solid var(--pf-brown); padding: 4px 10px;
}
.ap-link:hover { background: var(--pf-brown); color: #fff; }

/* The Archive: ash-gray band, the way the Starfinder band shifts palette */
.gd-section {
  position: relative;
  padding: 3.4rem 3rem 3rem;
  color: var(--gd-bone);
  border-top: 5px solid #8A8378;
  background-color: var(--gd-ash);
  background-image:
    radial-gradient(ellipse 70% 50% at 10% 0%, var(--gd-fog), transparent 70%),
    radial-gradient(ellipse 60% 45% at 95% 60%, rgba(200, 192, 180, .08), transparent 70%),
    linear-gradient(180deg, var(--gd-ash), var(--gd-ash-deep));
}
.gd-section::before {
  content: 'The Archive · Litran';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #8A8378;
  color: #111;
  padding: 2px 16px;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.gd-head { font-family: var(--font-header); font-size: 2rem; color: var(--gd-bone); border-bottom: 1px solid var(--gd-line); margin-bottom: .5rem; }
.gd-sub { color: var(--gd-dim); font-size: 1.05rem; margin-bottom: 1.6rem; }
.gd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1.5rem; }

/* A dossier, as a sheet of the Talons' parchment */
.dcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 240px;
  padding: 24px 24px 20px;
  color: var(--ink);
  text-decoration: none;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255, 248, 228, .45), rgba(255, 248, 228, 0) 70%),
    radial-gradient(circle at 88% 8%, rgba(150, 95, 40, .14), transparent 70px),
    repeating-linear-gradient(90deg, rgba(110, 80, 40, .05) 0 1px, transparent 1px 28px);
  box-shadow: inset 0 0 60px var(--edge), inset 0 0 10px var(--edge), 0 16px 34px -14px rgba(0, 0, 0, .8);
  transform: rotate(-.5deg);
}
.dcard .no { font-family: var(--hand); font-size: 1.15rem; color: var(--rubric); }
.dcard h4 { font-family: var(--hand); font-weight: 400; font-size: 1.6rem; line-height: 1.25; }
.dcard .what { font-family: var(--font-main); font-size: .65rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-soft); }
.dcard p { font-family: var(--fell); font-size: 1rem; line-height: 1.5; margin-top: 4px; }
.dcard .go { margin-top: auto; padding-top: 12px; font-family: var(--font-main); font-size: .75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--rubric); }
.dcard .dot { position: absolute; right: 16px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #B4402F, #8A1D16 55%, #560E0A); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
a.dcard:hover { transform: rotate(0deg) translateY(-3px); }
a.dcard:hover .go { text-decoration: underline; text-underline-offset: 3px; }

/* A place kept for the next dossier */
.dslot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 240px;
  padding: 24px;
  border: 1px dashed rgba(220, 213, 200, .35);
  color: var(--gd-dim);
}
.dslot .no { font-family: var(--hand); font-size: 1.15rem; }
.dslot h4 { font-family: var(--hand); font-weight: 400; font-size: 1.5rem; line-height: 1.25; color: var(--gd-bone); opacity: .8; }
.dslot p { font-size: 1rem; margin-top: 4px; }

/* Seal */
.w0 { stop-color: #B4402F; } .w1 { stop-color: #8A1D16; } .w2 { stop-color: #560E0A; }
.rb { fill: #6E1712; } .rb2 { fill: #821F17; }
.r1 { fill: none; stroke: #4E0C09; stroke-width: 2.5; opacity: .65; }
.r2 { fill: none; stroke: #C65A4A; stroke-width: 1; opacity: .45; }
.sx { font-family: 'IM Fell English SC', Georgia, serif; font-size: 32px; text-anchor: middle; fill: #4E0C09; opacity: .85; }
.sx2 { font-family: 'IM Fell English SC', Georgia, serif; font-size: 32px; text-anchor: middle; fill: #D36A58; opacity: .35; }
.hl { fill: #FFFFFF; opacity: .13; }

footer { background: #111; text-align: center; font-size: .9rem; color: #8C8C8C; padding: 2rem; border-top: 1px solid #333; font-family: var(--font-main); }
footer p { max-width: 62em; margin: 0 auto .8em; }
footer .cup { font-size: .78rem; line-height: 1.55; }
footer a { color: #B8B8B8; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media (max-width: 768px) {
  .container { grid-template-columns: 1fr; padding-block: 1rem; padding-left: max(1rem, env(safe-area-inset-left, 0px)); padding-right: max(1rem, env(safe-area-inset-right, 0px)); }
  aside { display: none; }
  .pf-section { padding: 2rem 1.25rem; }
  .gd-section { padding: 3rem 1.25rem 2rem; }
  .dispatch-card { grid-template-columns: 1fr; }
  .dispatch-seal { width: 100%; height: 130px; border-right: none; border-bottom: 1px solid #34302C; }
  .intro-text { text-align: left; }
}
