@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Spectral:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ============================================
   TOKENS
   Drowned Ink   #12191A  primary background
   Ink Deep      #0A1112  darkest recess / footer
   Brass         #9C7A3C  instrument accent
   Brass Bright  #C79B4E  hover / active brass
   Verdigris     #4A7268  secondary accent, oxidised copper
   Parchment     #D8CFB8  card surfaces, water-stained paper
   Bone          #EDE7D9  primary text on dark
   Rust          #8B4332  warnings, Complications
   ============================================ */
@font-face {
    font-family: "PowellAntique";  /* Replace with your font name */
    src: url("../fonts/Powell Antique/PowellAntique.ttf");  /* Path to your uploaded font file */
}

@font-face {
    font-family: "Crimson";  /* Replace with your font name */
    src: url("../fonts/Crimson_Text/CrimsonText-SemiBold.ttf");  /* Path to your uploaded font file */
}
:root {
  --ink: #12191A;
  --ink-deep: #0A1112;
  --brass: #9C7A3C;
  --brass-bright: #C79B4E;
  --verdigris: #4A7268;
  --parchment: #D8CFB8;
  --bone: #EDE7D9;
  --rust: #8B4332;
  --brine: #6E8B8A;
  --line: rgba(216, 207, 184, 0.14);
  --line-strong: rgba(216, 207, 184, 0.28);

  --font-display: 'PowellAntique';
  --font-body: 'Spectral';
  --font-mono: 'Crimson';
    --ks-green: #05ce78;
    --ks-dark-charcoal:#222222;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
}

/* Rising tide backdrop: a slow, near-static gradient that deepens toward the
   foot of every page, as though the reader is descending through water. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74,114,104,0.16), transparent 60%),
    linear-gradient(to bottom, var(--ink) 0%, var(--ink) 40%, var(--ink-deep) 100%);
  pointer-events: none;
}

/* faint suspended sediment */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, var(--line-strong) 0, transparent 100%),
    radial-gradient(1px 1px at 70% 65%, var(--line-strong) 0, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, var(--line-strong) 0, transparent 100%),
    radial-gradient(1px 1px at 85% 20%, var(--line-strong) 0, transparent 100%),
    radial-gradient(1px 1px at 55% 45%, var(--line-strong) 0, transparent 100%);
  background-size: 600px 600px;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--bone);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; color: var(--parchment); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(18, 25, 26, 0.82);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--bone);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}
.brand small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--verdigris);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.site-nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment);
  position: relative;
  padding: 0.3em 0;
  transition: color 0.2s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--brass-bright); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--brass-bright);
  transition: right 0.25s ease;
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after { right: 0; }
.site-nav a[aria-current="page"] { color: var(--brass-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--bone);
  width: 42px;
  height: 42px;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-mono);
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--ink-deep);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 2rem 1.2rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; padding: 0.85em 0; border-bottom: 1px solid var(--line); }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85em 1.5em;
  border-radius: 2px;
  border: 1px solid var(--brass);
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--brass);
  color: var(--ink-deep);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
}
.btn-ghost {
  color: var(--parchment);
  border-color: var(--line-strong);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--brass);
  color: var(--brass-bright);
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 6.5rem 0 5rem;
  position: relative;
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 3rem;
  align-items: end;
}
.hero h1 { max-width: 12ch; }
.hero-dek { font-size: 1.15rem; max-width: 46ch; }
.hero-figure {
  border-left: 1px solid var(--line-strong);
  padding-left: 1.6rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--verdigris);
  line-height: 1.9;
}
.hero-figure strong { display: block; color: var(--brass-bright); font-size: 1.9rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.4em; }
.hero-actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure { border-left: none; border-top: 1px solid var(--line-strong); padding-left: 0; padding-top: 1.4rem; }
}

/* ============================================
   SECTIONS / DEPTH MARKERS
   Each major section of the site is framed as a depth the reader
   descends through, echoing the game's flooded, stratified world.
   ============================================ */
.depth-section {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}
.depth-label {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--verdigris);
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-bottom: 1.4rem;
}
.depth-label .fathom { color: var(--brass); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ============================================
   CARDS
   ============================================ */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: linear-gradient(165deg, rgba(216,207,184,0.05), rgba(216,207,184,0.015));
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.9rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.5em; }
.card .card-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.9em;
  display: block;
}
.card p:last-child { margin-bottom: 0; font-size: 0.95rem; }

/* faction cards get a coloured left rule tied to their bar chip */
.faction-card { border-left: 3px solid var(--faction-color, var(--brass)); }

/* ============================================
   PULL-QUOTE / EPIGRAPH
   ============================================ */
.epigraph {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--parchment);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 2.2rem 0;
  max-width: 34ch;
}
.epigraph cite {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verdigris);
  margin-top: 1rem;
}

/* ============================================
   DEPTH WINDOW (signature element)
   A fixed brass-framed porthole holding a still emblem. A translucent
   tide fills upward from the base as the reader scrolls, its top edge
   standing in for the waterline itself — the page's depth made literal,
   rather than read off a dial.
   ============================================ */
.depth-window {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  z-index: 50;
  width: 128px;
  pointer-events: none;
  opacity: 0.96;
}
.depth-window-frame {
  position: relative;
  width: 100%;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--brass);
  border-radius: 4px;
  background: radial-gradient(ellipse at 50% 28%, rgba(74,114,104,0.14), var(--ink-deep) 72%);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(216,207,184,0.05);
}
.depth-window-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76%;
  opacity: 0.85;
}
.water-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: linear-gradient(to bottom, rgba(74,114,104,0.5), rgba(10,17,18,0.92));
  border-top: 2px solid var(--brass-bright);
  box-shadow: 0 -3px 10px rgba(199,155,78,0.4), inset 0 12px 16px -10px rgba(0,0,0,0.55);
  transition: height 0.2s ease-out;
}
.depth-gauge-label {
  display: block;
  text-align: center;
  margin-top: 0.55rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}
@media (max-width: 760px) {
  .depth-window { width: 92px; right: 1rem; bottom: 1rem; }
  .depth-window-frame { height: 72px; }
  .depth-gauge-label { font-size: 0.54rem; margin-top: 0.4rem; }
}

@media (max-width: 414px) {
    .depth-window { width: 46px; right: 1rem; bottom: 1rem; }
    .depth-window-frame { height: 36px; }
    .depth-gauge-label { font-size: 0.44rem; margin-top: 0.4rem; text-wrap:initial; }
}

/* ============================================
   TABLES (rules reference)
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.5rem 0;
}
th, td {
  text-align: left;
  padding: 0.75em 0.9em;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 400;
}
td { color: var(--parchment); }

.stat-block {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(10, 17, 18, 0.55);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rust);
  padding: 1.4rem 1.6rem;
  border-radius: 3px;
  color: var(--parchment);
}
.stat-block strong { color: var(--rust); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2.5rem;
  background: var(--ink-deep);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--verdigris);
  margin: 0;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--parchment);
}
.footer-links a:hover { color: var(--brass-bright); }

/*CUSTOM */
.brand-watermark {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.2;
  transition: opacity 0.4s ease;
}
.brand-watermark img {
  width: 55vw;
  max-width: 640px;
}
.brand-watermark.is-hidden {
  opacity: 0;
}
.hero .logo-container {
  display: block;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 15rem; /* Optional: set a height */
}


.flash-success {
    background: linear-gradient(90deg, var(--verdigris), #3a5a52);
    border-bottom: 2px solid var(--brass-bright);
    animation: flash-drop 0.35s ease-out;
}
.flash-success-inner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 2rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--bone);
}
.flash-success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brass-bright);
    color: var(--ink-deep);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
@keyframes flash-drop {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
