@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=IM+Fell+English:ital@0;1&display=swap');

:root {
  --stone-dark: #2c2a28;
  --stone-mid: #4a453f;
  --stone-light: #6b635a;
  --torch: #e8a84a;
  --parchment: #e8d9b5;
  --ink: #1a1510;
  --moss: #3d4a2e;
}

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

body {
  font-family: 'IM Fell English', serif;
  background: 
    linear-gradient(rgba(20,18,15,0.78), rgba(20,18,15,0.88)),
    url('https://convoycat.com/rlegends/recycled-legends-building-zoom-background.jpeg') center/cover fixed;
  color: var(--parchment);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

header {
  background: linear-gradient(to bottom, #1a1816 0%, var(--stone-dark) 100%);
  border-bottom: 12px solid var(--stone-mid);
  position: relative;
  padding: 1.2rem 1rem 2.4rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  z-index: 10;
}

header::before {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0; right: 0;
  height: 24px;
  background: repeating-linear-gradient(90deg, var(--stone-mid) 0 40px, transparent 40px 55px);
}

.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.logo-area img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.7));
  border: 3px solid var(--torch);
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  padding: 6px;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  letter-spacing: 0.08em;
  color: var(--torch);
  text-shadow: 0 0 12px rgba(232,168,74,0.4), 2px 2px 0 #000;
}

.tagline {
  font-style: italic;
  font-size: 1.05rem;
  color: #c9b896;
  max-width: 600px;
  margin: 0.3rem auto 0;
}

main {
  max-width: 980px;
  margin: 2.2rem auto;
  padding: 0 1rem 3.5rem;
  position: relative;
  z-index: 5;
}

section {
  background: 
    linear-gradient(rgba(232,217,181,0.94), rgba(232,217,181,0.90)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.07"/></svg>');
  color: var(--ink);
  border: 6px solid var(--stone-mid);
  border-radius: 4px;
  padding: 1.6rem 1.4rem;
  margin-bottom: 1.9rem;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.12), 0 10px 25px rgba(0,0,0,0.5);
  position: relative;
}

section::before, section::after {
  content: "◆";
  position: absolute;
  color: var(--stone-mid);
  font-size: 1.25rem;
}

section::before { top: 8px; left: 12px; }
section::after  { bottom: 8px; right: 12px; }

h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.55rem;
  color: #3a2f1e;
  border-bottom: 2px solid var(--moss);
  padding-bottom: 0.35rem;
  margin-bottom: 0.95rem;
  text-align: center;
}

h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: #3a2f1e;
  margin: 1.3rem 0 0.6rem;
  text-align: center;
}

p { margin-bottom: 0.9rem; }

.cta {
  display: inline-block;
  background: linear-gradient(to bottom, #5c4a32, #3a2f1e);
  color: var(--parchment);
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--torch);
  border-radius: 3px;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: all 0.25s;
  box-shadow: 0 4px 0 #1a1510;
}

.cta:hover {
  background: linear-gradient(to bottom, #6e5a3e, #4a3c28);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1a1510, 0 0 15px rgba(232,168,74,0.3);
}

.inventory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.product-card, .card {
  background: rgba(255,255,255,0.35);
  border: 3px solid var(--stone-light);
  padding: 1.1rem;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover, .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.product-card h3, .card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  color: #2c2418;
}

.product-card a, .card a {
  display: inline-block;
  margin-top: 0.6rem;
  color: #5c3d1e;
  font-weight: bold;
  text-decoration: underline;
}

#dice-box {
  text-align: center;
  margin: 1.4rem 0 0.6rem;
}

#roll-btn {
  background: linear-gradient(to bottom, #5c4a32, #3a2f1e);
  color: var(--parchment);
  border: 3px solid var(--torch);
  padding: 0.7rem 1.8rem;
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 5px 0 #1a1510;
  transition: all 0.2s;
}

#roll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #1a1510, 0 0 18px rgba(232,168,74,0.4);
}

#roll-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1a1510;
}

#dice-result {
  font-size: 4.2rem;
  font-family: 'Cinzel', serif;
  color: var(--torch);
  text-shadow: 0 0 16px rgba(232,168,74,0.7);
  margin: 1rem 0 0.4rem;
  min-height: 1.2em;
}

#dice-flavor {
  font-size: 1.15rem;
  font-style: italic;
  color: #3a2f1e;
  max-width: 520px;
  margin: 0.5rem auto 0;
  min-height: 2.8em;
}

@keyframes bounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.25); }
  50%  { transform: scale(0.9); }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.tales-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.tales-list li {
  padding: 0.5rem 0 0.5rem 1.35rem;
  border-bottom: 1px solid rgba(60,50,30,0.22);
  position: relative;
  font-size: 0.98rem;
}

.tales-list li:last-child { border-bottom: none; }

.tales-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--moss);
  font-weight: bold;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

footer {
  background: #1a1816;
  border-top: 10px solid var(--stone-mid);
  text-align: center;
  padding: 2rem 1rem 3rem;
  position: relative;
  z-index: 10;
}

footer::before {
  content: "";
  position: absolute;
  top: -10px; left: 0; right: 0;
  height: 20px;
  background: repeating-linear-gradient(90deg, var(--stone-mid) 0 35px, transparent 35px 50px);
}

.social a {
  color: var(--torch);
  margin: 0 0.65rem;
  text-decoration: none;
  font-size: 1.05rem;
}

.torch {
  display: inline-block;
  width: 8px; height: 36px;
  background: linear-gradient(to top, #3a2a10, var(--torch));
  border-radius: 2px;
  margin: 0 0.8rem;
  box-shadow: 0 0 18px var(--torch);
  animation: flicker 2.4s infinite alternate;
}

@keyframes flicker {
  0%   { opacity: 0.82; box-shadow: 0 0 14px var(--torch); }
  100% { opacity: 1;    box-shadow: 0 0 26px var(--torch); }
}

.badge {
  display: inline-block;
  background: var(--moss);
  color: var(--parchment);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

@media (max-width: 600px) {
  section { padding: 1.2rem 1rem; }
  .logo-area img { width: 120px; height: 120px; }
  #dice-result { font-size: 3.4rem; }
}