/* style.css - Ink & Iron Main Stylesheet */
:root {
  --bg-deep: #000000;
  --bg-panel: #0c101b;
  --bg-panel-soft: #111622;
  --text-main: #f2eee4;
  --text-muted: #c2c0b8;
  --accent: #c79a4a;
  --accent-soft: #8f7444;
  --shadow: rgba(0,0,0,0.75);
}

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

body {
  font-family: 'Libre Baskerville', serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.7;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--text-main);
}

/* ---- HEADER + BANNER ---- */
header {
  position: relative;
  width: 100%;
  background-color: #000000;
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
}

.header-logo {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1200px;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  transform: translateY(-8px);
  margin-left: auto;
  margin-right: auto;
}

/* ---- NAVIGATION ---- */
nav {
  background-color: #000000;
  padding: 0.6rem 2rem 0.9rem;
  margin-top: -0.3rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  border-top: 1px solid #10141c;
  border-bottom: 1px solid #10141c;
}

nav a {
  font-family: 'Cinzel', serif;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(
    to bottom,
    rgba(12,16,27,0.0),
    rgba(12,16,27,0.85)
  );
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

nav a:hover {
  color: var(--accent);
  border-color: rgba(199,154,74,0.7);
  box-shadow: 0 0 14px rgba(199,154,74,0.35);
}

nav a.active {
  color: var(--bg-deep);
  background: radial-gradient(
    circle at top,
    rgba(199,154,74,0.85) 0,
    rgba(199,154,74,0.45) 32%,
    rgba(12,16,27,1) 90%
  );
  border-color: var(--accent-soft);
  box-shadow:
    0 0 18px rgba(199,154,74,0.55),
    0 10px 22px rgba(0,0,0,0.8);
}

/* ---- MAIN LAYOUT ---- */
main {
  max-width: 1100px;
  margin: 3rem auto 4rem;
  padding: 0 2rem;
}

.section {
  margin-bottom: 4rem;
}

.section h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

/* Panels / cards */
.book-card,
.home-card,
.video,
.jukebox-card,
.hero,
.tool-card,
.training-card {
  background: var(--bg-panel-soft);
  border: 1px solid #242a3a;
  box-shadow: 0 18px 40px var(--shadow);
  padding: 1.75rem;
  color: var(--text-main);
  border-radius: 6px;
}

.book-card {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}

.book-card img {
  width: 190px;
  height: auto;
  border: 1px solid #3a4256;
  box-shadow: 0 10px 24px rgba(0,0,0,0.85);
  border-radius: 4px;
}

.book-card-content,
.tool-card-content,
.training-card-content { 
  flex: 1; 
}

.book-card-content h3,
.home-card h3,
.jukebox-card h3,
.tool-card h3,
.training-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.55rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.book-card-content p,
.home-card p,
.tool-card p,
.training-card p {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.status-label,
.tool-label,
.training-label {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.tab-content { display: none; }

/* Home hero */
.hero {
  text-align: center;
  padding: 2.25rem 2rem 2rem;
  background: radial-gradient(circle at top, #182032 0, var(--bg-panel-soft) 55%, var(--bg-deep) 100%);
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  margin-bottom: 0.9rem;
  color: var(--text-main);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero p {
  max-width: 800px;
  margin: 0.6rem auto 0;
  color: var(--text-main);
  font-size: 0.98rem;
}

.home-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 820px) {
  .home-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.home-card {
  background: var(--bg-panel);
}

/* Jukebox */
.jukebox-meta { font-size: 0.95rem; color: var(--text-muted); }

.jukebox-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.jukebox-controls button {
  padding: 0.4rem 0.9rem;
  border: 1px solid #444b5c;
  background: #1a2233;
  cursor: pointer;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.95rem;
  color: var(--text-main);
}

.jukebox-controls button:hover {
  background: #252f45;
}

.jukebox-now {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
}

.jukebox-links {
  font-size: 0.95rem;
}

.jukebox-links a {
  text-decoration: underline;
  color: var(--accent);
}

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .video-grid { grid-template-columns: 1fr 1fr; }
}

.video { padding: 0.9rem; background: var(--bg-panel); }

.video .frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #000;
  border-radius: 4px;
}

.video .frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Tooling and Training Grids */
.tooling-intro,
.training-intro {
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.tools-grid,
.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tool-card,
.training-card {
  background: var(--bg-panel);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tool-card:hover,
.training-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  border-color: rgba(199, 154, 74, 0.4);
}

.tool-card-content h3,
.training-card-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.tool-card-content p,
.training-card-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.tool-card .tool-link,
.training-card .training-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.tool-card .tool-link:hover,
.training-card .training-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.tool-card .tool-link::after,
.training-card .training-link::after {
  content: "→";
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-link::after,
.training-card:hover .training-link::after {
  transform: translateX(3px);
}

/* Category headings */
.category-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  margin: 3rem 0 1.5rem;
  color: var(--text-main);
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 0.5rem;
}

footer {
  background: #05070d;
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid #10141c;
  margin-top: 3rem;
}

footer a {
  color: var(--accent-soft);
  text-decoration: underline;
}

footer a:hover {
  color: var(--text-main);
}

/* ---- COOKIE CONSENT BAR ---- */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #0c101b, #111622);
  border-top: 2px solid var(--accent);
  padding: 1.25rem 2rem;
  box-shadow: 0 -4px 20px var(--shadow);
  z-index: 9999;
  display: none;
  animation: slideUp 0.4s ease-out;
}

.cookie-bar.show {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-main);
  margin: 0;
  min-width: 280px;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  font-family: 'Cinzel', serif;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cookie-btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}

.cookie-btn-primary:hover {
  background: var(--accent-soft);
  box-shadow: 0 4px 12px rgba(199,154,74,0.4);
}

.cookie-btn-secondary {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid #3a4256;
}

.cookie-btn-secondary:hover {
  background: var(--bg-panel-soft);
  border-color: var(--accent-soft);
}

.cookie-btn-text {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
}

.cookie-btn-text:hover {
  color: var(--text-main);
}

/* Cookie Settings Modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.cookie-modal.show {
  display: flex;
}

.cookie-modal-content {
  background: var(--bg-panel-soft);
  border: 2px solid var(--accent-soft);
  border-radius: 6px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px var(--shadow);
}

.cookie-modal-content h3 {
  font-family: 'Cinzel', serif;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.cookie-option {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-panel);
  border: 1px solid #242a3a;
  border-radius: 4px;
}

.cookie-option label {
  display: block;
  cursor: pointer;
}

.cookie-option input[type="checkbox"] {
  margin-right: 0.75rem;
  cursor: pointer;
}

.cookie-option input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.cookie-option strong {
  color: var(--text-main);
  font-size: 1rem;
}

.cookie-option p {
  margin: 0.5rem 0 0 1.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cookie-modal-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cookie-buttons {
    width: 100%;
  }
  
  .cookie-btn {
    flex: 1;
    min-width: 120px;
  }
}

#about-tab p { margin: 0 0 0.75rem 0; }

/* ---- ARTICLES GRID LAYOUT ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.article-card {
  background: var(--bg-panel);
  border: 1px solid #242a3a;
  border-radius: 6px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  border-color: rgba(199, 154, 74, 0.4);
}

.article-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.article-card .article-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.article-card .article-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.article-card .article-link::after {
  content: "→";
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.article-card:hover .article-link::after {
  transform: translateX(3px);
}

/* Featured article styling */
.article-card.featured {
  grid-column: span 2;
  background: linear-gradient(145deg, var(--bg-panel-soft), #182032);
  border-color: var(--accent-soft);
}

.article-card.featured h3 {
  font-size: 1.4rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .articles-grid,
  .tools-grid,
  .training-grid {
    grid-template-columns: 1fr;
  }
  
  .article-card.featured {
    grid-column: span 1;
  }
}

/* ---- RSS SUBSCRIPTION BOX ---- */
.rss-subscription-box {
  background: linear-gradient(145deg, #182032, var(--bg-panel-soft));
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
  box-shadow: 0 12px 40px var(--shadow);
}

.rss-subscription-box h3 {
  font-family: 'Cinzel', serif;
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
}

.rss-subscription-box p {
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.rss-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  background: var(--accent);
  color: var(--bg-deep);
  text-decoration: none;
  border-radius: 6px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  letter-spacing: 0.05em;
  margin: 0.5rem;
}

.rss-button:hover {
  background: var(--accent-soft);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(199,154,74,0.4);
  border-color: var(--text-main);
}

.rss-button.secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent-soft);
}

.rss-button.secondary:hover {
  background: rgba(199,154,74,0.1);
  color: var(--text-main);
}

.rss-badge {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem;
  background: var(--bg-panel);
  border-radius: 6px;
  border: 1px solid #242a3a;
  transition: all 0.3s ease;
}

.rss-badge:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.rss-note {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #242a3a;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}