/* ============================================
   THRYND — Website Style
   Matches H11 art direction:
   Thick outlines, flat colours, saturated palette,
   Norse knotwork, Elder Futhark runes
   ============================================ */

/* --- Palette (from H11) --- */
:root {
  --blue:        #2a4a7f;
  --blue-deep:   #1a2f52;
  --blue-dark:   #0f1a2e;
  --red:         #b83230;
  --red-deep:    #8a2220;
  --gold:        #c8922a;
  --gold-light:  #e2b04a;
  --gold-dim:    #a07020;
  --brown:       #5c3d2e;
  --brown-light: #7a5a42;
  --brown-dark:  #3a2518;
  --iron:        #5a5a60;
  --iron-light:  #8a8a90;
  --iron-dark:   #3a3a40;
  --stone:       #2a2520;
  --stone-light: #3a3530;
  --parchment:   #f0e6d0;
  --cream:       #f5eed8;
  --skin:        #e8c8a0;
  --rune-glow:   #4a9ed8;
  --rune-glow-bright: #6ac0ff;
  --text:        #f0e6d0;
  --text-dim:    #a09880;
  --outline:     #1a1410;

  --border:      3px solid var(--outline);
  --border-gold: 3px solid var(--gold);
  --border-thick: 4px solid var(--outline);

  --radius:      6px;
  --radius-lg:   10px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  background: var(--stone) url('../img/site/stone-bg.png');
  background-size: 256px;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--gold-light);
  text-decoration: none;
}

a:hover {
  color: var(--rune-glow-bright);
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.2;
}

/* --- Rune accents --- */
.rune {
  color: var(--rune-glow);
  font-size: 0.85em;
  text-shadow: 0 0 12px var(--rune-glow), 0 0 24px rgba(74, 158, 216, 0.3);
  margin: 0 0.2em;
}

.text-gold {
  color: var(--gold-light);
}

/* --- Knotwork divider (image) --- */
.knotwork-divider {
  width: 100%;
  height: 30px;
  background: url('../img/site/border-h.png') repeat-x center;
  line-height: 0;
  position: relative;
  z-index: 10;
  margin-top: -15px;
  margin-bottom: -15px;
}

/* --- Axe divider --- */
.axe-divider {
  text-align: center;
  padding: 1rem 0;
}

.axe-divider-img {
  max-width: 400px;
  width: 80%;
  height: auto;
  opacity: 0.85;
}

/* --- Hero wrap (header + hero share one background) --- */
.hero-wrap {
  background: url('../img/site/bg-hero.png') center center / cover no-repeat;
  position: relative;
}

.hero-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 12, 0.75) 0%, rgba(8, 10, 20, 0.5) 50%, rgba(5, 5, 12, 0.7) 100%);
}

.hero-wrap > * {
  position: relative;
  z-index: 1;
}

/* --- Header --- */
.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.header-inner {
  margin-bottom: 1.5rem;
}

.logo {
  margin: 0;
}

.logo-img {
  max-width: 450px;
  width: 90%;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.6));
}

.tagline {
  font-size: 1.2rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 4px;
  border: 4px solid var(--outline);
  outline: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative;
  box-shadow:
    0 4px 0 var(--outline),
    0 0 0 0 transparent;
}

.btn:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 var(--outline),
    0 0 0 0 transparent;
}

.btn-primary {
  background: var(--red) url('../img/site/stone-panel.png');
  background-blend-mode: hard-light;
  background-size: 128px;
  color: var(--cream);
  outline-color: var(--red-deep);
  border-top-color: #d04040;
  border-left-color: #d04040;
  border-right-color: #701818;
  border-bottom-color: #701818;
}

.btn-primary:hover {
  background: #cc3a38 url('../img/site/stone-panel.png');
  background-blend-mode: hard-light;
  background-size: 128px;
  color: #fff;
  border-color: var(--rune-glow);
  outline-color: var(--rune-glow);
  box-shadow:
    0 4px 0 var(--outline),
    0 0 16px var(--rune-glow),
    0 0 40px rgba(74, 158, 216, 0.3),
    inset 0 0 12px rgba(74, 158, 216, 0.15);
  text-shadow: 0 0 8px rgba(74, 158, 216, 0.5);
}

.btn-primary:hover .btn-rune {
  text-shadow: 0 0 12px var(--rune-glow-bright), 0 0 24px var(--rune-glow);
  animation: rune-pulse 1.5s ease-in-out infinite;
}

.btn-secondary {
  background: var(--iron-dark) url('../img/site/stone-panel.png');
  background-blend-mode: hard-light;
  background-size: 128px;
  color: var(--gold);
  outline-color: var(--iron);
  border-top-color: #555560;
  border-left-color: #555560;
  border-right-color: #252530;
  border-bottom-color: #252530;
}

.btn-secondary:hover {
  background: var(--iron) url('../img/site/stone-panel.png');
  background-blend-mode: hard-light;
  background-size: 128px;
  color: var(--gold-light);
  border-color: var(--gold);
  outline-color: var(--gold);
  box-shadow:
    0 4px 0 var(--outline),
    0 0 12px rgba(200, 146, 42, 0.4),
    0 0 30px rgba(200, 146, 42, 0.15);
  text-shadow: 0 0 6px rgba(200, 146, 42, 0.4);
}

.btn-large {
  padding: 1rem 3rem;
  font-size: 1.3rem;
  border-width: 5px;
  box-shadow:
    0 5px 0 var(--outline),
    0 0 0 0 transparent;
}

.btn-large:hover {
  box-shadow:
    0 5px 0 var(--outline),
    0 0 20px var(--rune-glow),
    0 0 50px rgba(74, 158, 216, 0.3),
    inset 0 0 15px rgba(74, 158, 216, 0.15);
}

.btn-rune {
  color: var(--rune-glow-bright);
  margin-right: 0.3em;
  text-shadow: 0 0 8px var(--rune-glow);
  transition: text-shadow 0.15s ease;
}

@keyframes rune-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 12px var(--rune-glow-bright), 0 0 24px var(--rune-glow); }
  50% { opacity: 0.85; text-shadow: 0 0 20px var(--rune-glow-bright), 0 0 40px var(--rune-glow), 0 0 60px rgba(74, 158, 216, 0.3); }
}

/* --- Hero --- */
.section-hero {
  max-width: 100%;
  padding: 3rem 1rem 4rem;
}

.hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-image {
  max-width: 550px;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.6));
}

.hero-pitch {
  font-size: 1.15rem;
  color: var(--text-dim);
  font-weight: 400;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Sections --- */
.section {
  padding: 3rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.section-alt {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.section-alt > *:not(.knotwork-divider) {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--gold);
  margin: 1.5rem 0;
  text-shadow: 2px 2px 0 var(--outline);
}

.section-title-light {
  color: var(--cream);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

/* The Hold — warm forge glow */
.section-hold {
  background: url('../img/site/bg-forge.png') center center / cover no-repeat;
  max-width: 100%;
  position: relative;
  padding: 3rem 1rem 6rem;
}

.section-hold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 5, 0.55);
}

.section-hold > * {
  position: relative;
  z-index: 1;
}

.section-hold .card-grid {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* The Clan — deep blue crystal cavern */
.section-clan {
  background: url('../img/site/bg-deep.png') center center / cover no-repeat;
  position: relative;
  padding-top: 2rem;
  padding-bottom: 6rem;
}

.section-clan::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, 0.55);
}

.section-clan > * {
  position: relative;
  z-index: 1;
}

/* Mine Preview — looking down into the abyss */
.section-mine {
  background: url('../img/site/bg-abyss.png') center center / cover no-repeat;
  position: relative;
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.section-mine::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 3, 0.55);
}

.section-mine > * {
  position: relative;
  z-index: 1;
}

.mine-loot {
  text-align: center;
  margin-top: 2rem;
}

.mine-chest {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(255, 180, 40, 0.4));
}

/* CTA — starlit peak, the way out */
.section-cta {
  background: url('../img/site/bg-surface.png') center top / cover no-repeat;
  text-align: center;
  padding: 3rem 1rem 4rem;
  max-width: 100%;
  position: relative;
}

.section-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, 0.5);
}

.section-cta > * {
  position: relative;
  z-index: 1;
}

/* --- Section Headers with decorations --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-torch {
  width: 50px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(255, 150, 30, 0.5));
}

.section-torch-right {
  transform: scaleX(-1);
}

.section-medallion {
  width: 80px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 16px rgba(74, 158, 216, 0.4));
}

.section-desc {
  text-align: center;
  color: var(--text-dim);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* --- Card Grid (with images) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--brown-dark) url('../img/site/stone-panel.png');
  background-size: 256px;
  background-blend-mode: overlay;
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.15s, border-color 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-dim);
}

.card-with-image {
  padding: 0;
  overflow: hidden;
}

.card-with-image h3,
.card-with-image p {
  padding: 0 1.2rem;
}

.card-with-image h3 {
  padding-top: 1rem;
}

.card-with-image p {
  padding-bottom: 1.2rem;
}

.card-image-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 3px solid var(--outline);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card h3 {
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 400;
  line-height: 1.5;
}

/* --- Class Grid (with portraits) --- */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.class-card {
  background: var(--brown-dark) url('../img/site/stone-panel.png');
  background-size: 256px;
  background-blend-mode: overlay;
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.class-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.class-portrait {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  transition: transform 0.15s;
}

.class-card:hover .class-portrait {
  transform: scale(1.05);
}

.class-rune {
  font-size: 1.4rem;
  color: var(--rune-glow);
  text-shadow: 0 0 12px var(--rune-glow), 0 0 24px rgba(74, 158, 216, 0.3);
  display: block;
  margin-bottom: 0.3rem;
}

.class-card h3 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.class-card p {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 400;
}

/* --- Mountain / Lore Section --- */
.section-mountain {
  background: url('../img/site/mountain.png') center center / cover no-repeat;
  max-width: 100%;
  padding: 6rem 1rem;
  position: relative;
}

.section-mountain::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.55);
}

.section-mountain > * {
  position: relative;
  z-index: 1;
}

.lore-block {
  background: rgba(30, 22, 16, 0.9);
  border: var(--border-thick);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.5rem;
  max-width: 650px;
  margin: 1.5rem auto 0;
  position: relative;
  overflow: hidden;
}

.lore-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0.5;
  pointer-events: none;
}

.lore-corner-tl { top: -2px; left: -2px; }
.lore-corner-tr { top: -2px; right: -2px; transform: scaleX(-1); }
.lore-corner-bl { bottom: -2px; left: -2px; transform: scaleY(-1); }
.lore-corner-br { bottom: -2px; right: -2px; transform: scale(-1); }

.lore-text {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--cream);
}


.lore-attribution {
  text-align: right;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* --- Mine Preview --- */
.mine-preview {
  max-width: 600px;
  margin: 1.5rem auto;
  border: 4px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 2px var(--outline);
}

.mine-layer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.4rem;
  border-bottom: 2px solid var(--outline);
}

.mine-layer:last-child {
  border-bottom: none;
}

/* Depth indicator — left column */
.layer-depth {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  background: var(--outline);
  border: 2px solid var(--iron);
  border-radius: 50%;
}

/* Content — middle column */
.layer-content {
  flex: 1;
  min-width: 0;
}

/* Icon — right column */
.layer-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  opacity: 0.6;
}

.layer-resource {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Layer backgrounds — each visually distinct */
.mine-surface {
  background: url('../img/site/layer-surface.png') center center / cover no-repeat;
}

.mine-surface .layer-depth {
  background: var(--blue);
  border-color: var(--rune-glow);
  color: var(--rune-glow-bright);
}

.mine-cleared {
  background: url('../img/site/layer-stone.png') center center / cover no-repeat;
}

.mine-cleared:nth-child(3) {
  background: url('../img/site/layer-iron.png') center center / cover no-repeat;
}

.mine-available {
  background: url('../img/site/layer-deep-iron.png') center center / cover no-repeat;
  border-left: 3px solid var(--rune-glow);
}

.mine-available .layer-depth {
  border-color: var(--rune-glow);
  box-shadow: 0 0 8px rgba(74, 158, 216, 0.3);
}

.mine-active {
  background: url('../img/site/layer-gold.png') center center / cover no-repeat;
  border-left: 3px solid var(--gold);
}

.mine-active .layer-depth {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--cream);
  box-shadow: 0 0 10px rgba(200, 146, 42, 0.3);
}

.mine-unknown {
  background: url('../img/site/layer-unknown.png') center center / cover no-repeat;
}

.mine-unknown .layer-depth {
  background: transparent;
  border: 2px dashed var(--iron);
  color: var(--iron-light);
}

.layer-label {
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.4rem;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 8px #000, 0 0 16px rgba(0,0,0,0.8);
}

.layer-rooms {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.room {
  font-size: 1rem;
  color: var(--cream);
  font-weight: 700;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 8px #000, 0 0 14px rgba(0,0,0,0.8);
}

.layer-discovery {
  font-size: 0.95rem;
  margin-top: 0.3rem;
  font-weight: 600;
}

.layer-discovery.cleared {
  color: var(--cream);
  font-size: 1rem;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 8px #000, 0 0 14px rgba(0,0,0,0.8);
}

.layer-discovery.available {
  color: var(--rune-glow-bright);
  font-size: 1rem;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 10px #000, 0 0 16px rgba(74, 158, 216, 0.4);
  font-weight: 700;
}

.mine-progress {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.progress-bar {
  height: 10px;
  background: var(--iron-dark);
  border: 2px solid var(--outline);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(200, 146, 42, 0.4);
  animation: mine-glow 2s ease-in-out infinite;
}

@keyframes mine-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(200, 146, 42, 0.3); }
  50% { box-shadow: 0 0 14px rgba(200, 146, 42, 0.6); }
}

.progress-detail {
  font-size: 1rem;
  color: var(--gold-light);
  font-weight: 700;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 8px #000, 0 0 14px rgba(0,0,0,0.8);
}

.layer-mystery {
  color: var(--iron-light);
  font-size: 1.05rem;
  font-style: italic;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 8px #000, 0 0 14px rgba(0,0,0,0.8);
}

/* --- CTA --- */
.cta-entrance {
  width: 280px;
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 24px rgba(255, 150, 30, 0.3));
}

.section-cta h2 {
  font-size: 2rem;
  color: var(--cream);
  margin: 0 0 1.5rem;
  text-shadow: 2px 2px 0 var(--outline);
}

/* --- Coming Soon --- */
.coming-soon-badge {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  border: 4px solid var(--gold-dim);
  border-radius: 4px;
  background: rgba(200, 146, 42, 0.08);
  text-shadow: 0 0 12px rgba(200, 146, 42, 0.3);
}

.cta-coming-soon {
  font-size: 1.2rem;
  color: var(--text-dim);
  font-style: italic;
  letter-spacing: 0.04em;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 0 1rem 2rem;
}

.footer-shield {
  width: 60px;
  height: auto;
  display: block;
  margin: 0 auto 0.8rem;
  opacity: 0.7;
}

.footer-inner {
  padding-top: 1.5rem;
}

.footer-inner p {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 400;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .logo-img {
    max-width: 280px;
  }

  .hero h2 {
    font-size: 1.6rem;
  }

  .hero-image {
    max-width: 100%;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .class-portrait {
    width: 100px;
    height: 100px;
  }

  .btn-large {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
  }

  .lore-corner {
    width: 40px;
    height: 40px;
  }

  .axe-divider-img {
    max-width: 250px;
  }
}
