/* Realmfall Website — site styles
   Palette pulled from the game: deep navy ground, parchment text, gold + ice accents. */

:root {
  --bg:        #0b1220;
  --bg-2:      #111a2c;
  --panel:     rgba(255, 255, 255, 0.04);
  --line:      rgba(255, 255, 255, 0.10);
  --text:      #e8dcc0;
  --muted:     #b6c2d2;
  --gold:      #f5c542;
  --gold-2:    #f7d98d;
  --ice:       #7cc4ff;
  --danger:    #b43a3a;
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(35, 100, 210, 0.22), transparent 60%),
    radial-gradient(800px 400px at 100% 100%, rgba(245, 197, 66, 0.06), transparent 60%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); color: #fff; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; color: var(--gold-2); }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.center { text-align: center; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-block; font-weight: 600; border-radius: 6px; border: 1px solid transparent;
  padding: .6rem 1.2rem; line-height: 1.2; cursor: pointer; text-decoration: none !important;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn--sm { padding: .4rem .9rem; font-size: .95rem; }
.btn--lg { padding: .85rem 1.6rem; font-size: 1.1rem; }
.btn--primary { background: linear-gradient(135deg, var(--gold), #d9a520); color: #1a1200; box-shadow: 0 6px 18px rgba(245, 197, 66, .18); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(245, 197, 66, .28); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.04); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10, 15, 25, .86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand img { width: 120px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: none; }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.site-nav .btn--primary { color: #1a1200; }
.site-nav .btn--primary:hover { color: #1a1200; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; }

/* Hero slideshow */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero__slides { display: grid; }
.slide {
  grid-area: 1 / 1; position: relative; display: flex; align-items: center;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(4rem, 9vw, 6rem);
  opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s;
}
.slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; z-index: 1; }
.slide__bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  z-index: 0; transform: scale(1.06); transition: transform 9s linear;
}
.slide.is-active .slide__bg { transform: scale(1); }
/* Darken + vignette so parchment text stays legible over any art */
.slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,18,32,.92) 0%, rgba(11,18,32,.78) 45%, rgba(11,18,32,.35) 100%),
    linear-gradient(180deg, rgba(11,18,32,.55) 0%, rgba(11,18,32,0) 30%, rgba(11,18,32,.6) 100%);
}
.slide__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.slide__title { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: var(--gold); font-weight: 600; margin-bottom: 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.slide__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.slide.is-active .slide__copy > * { animation: rise .7s ease both; }
.slide.is-active .slide__copy > :nth-child(2) { animation-delay: .1s; }
.slide.is-active .slide__copy > :nth-child(3) { animation-delay: .2s; }
.slide.is-active .slide__copy > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Slide art */
.slide__art { position: relative; height: 400px; }
.slide__art .card {
  position: absolute; width: 240px; height: auto; border-radius: 12px;
  border: 2px solid rgba(245,197,66,.55);
  box-shadow: 0 30px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.6), 0 0 40px rgba(245,197,66,.12);
}
.slide.is-active .slide__art .card, .slide.is-active .item, .slide.is-active .recipe { animation: fadein .9s ease both .25s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
/* fan of three (slide 1) / two (campaign) */
.art-fan .card--1 { left: 2%;  top: 40px; transform: rotate(-12deg); }
.art-fan .card--2 { left: 30%; top: 0;    transform: rotate(-1deg); z-index: 2; }
.art-fan .card--3 { left: 54%; top: 40px; transform: rotate(11deg); }
.art-fan--two .card--1 { left: 12%; top: 30px; transform: rotate(-8deg); }
.art-fan--two .card--2 { left: 44%; top: 0;    transform: rotate(6deg); z-index: 2; }
/* versus (PVP) */
.art-versus .card { width: 205px; }
.art-versus .card--left  { left: 0;  top: 30px; transform: rotate(-8deg); }
.art-versus .card--right { right: 0; top: 30px; transform: rotate(8deg); }
.versus {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(11,18,32,.95) 55%, rgba(11,18,32,.6));
  border: 2px solid rgba(245,197,66,.7); box-shadow: 0 0 30px rgba(245,197,66,.35), 0 8px 24px rgba(0,0,0,.7);
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--gold);
  text-shadow: 0 0 12px rgba(245,197,66,.6);
}
/* forge (crafting) */
.art-forge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; }
.recipe { display: flex; align-items: center; gap: .6rem; }
.recipe .mat { width: 84px; height: 84px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.7)); }
.recipe__op { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); }
.forged { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.forged .item { width: 200px; height: 200px; filter: drop-shadow(0 16px 24px rgba(0,0,0,.8)) drop-shadow(0 0 22px rgba(245,197,66,.25)); }
.forged .item--armor { width: 170px; height: 170px; }

/* Controls */
.hero__controls {
  position: absolute; left: 0; right: 0; bottom: 1.1rem; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.hero__dots { display: flex; gap: .55rem; }
.hero__dots button {
  width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55);
  background: transparent; padding: 0; cursor: pointer; transition: background .2s, transform .2s;
}
.hero__dots button:hover { background: rgba(255,255,255,.5); }
.hero__dots button[aria-selected="true"] { background: var(--gold); border-color: var(--gold); transform: scale(1.2); }
.hero__arrow {
  background: rgba(10,15,25,.6); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
  width: 36px; height: 36px; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 0 3px;
}
.hero__arrow:hover { background: rgba(245,197,66,.9); color: #1a1200; border-color: var(--gold); }
.hero__dots button:focus-visible, .hero__arrow:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .slide, .slide__bg { transition: none; }
  .slide.is-active .slide__copy > *, .slide.is-active .slide__art .card, .slide.is-active .item, .slide.is-active .recipe { animation: none; }
}

/* Features */
.features { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.feature p { color: var(--muted); margin: 0; }

/* CTA */
.cta { padding: 4rem 0 5rem; }
.cta__inner { text-align: center; background: linear-gradient(135deg, rgba(35,100,210,.25), rgba(22,59,130,.25)); border: 1px solid var(--line); border-radius: 16px; padding: 3rem 1.5rem; }
.cta p { color: var(--muted); }

/* Generic page */
.page { padding: clamp(2.5rem, 6vw, 4rem) 0 4rem; }
.page__narrow { max-width: 720px; }
.checklist { padding-left: 1.2rem; }
.checklist li { margin-bottom: .5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); font-size: .95rem; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a { color: var(--muted); }
.footer-credit a { color: var(--muted); }

/* Responsive */
@media (max-width: 860px) {
  .slide__inner { grid-template-columns: 1fr; gap: 2rem; }
  .slide__art { height: 320px; }
  .slide__art .card { width: 190px; }
  .art-versus .card { width: 160px; }
  .slide__art .card--1, .slide__art .card--2, .slide__art .card--3 { top: 10px; }
  .art-fan .card--1 { left: 5%; } .art-fan .card--2 { left: 30%; } .art-fan .card--3 { left: 55%; }
  .art-fan--two .card--1 { left: 15%; } .art-fan--two .card--2 { left: 45%; }
  .forged .item { width: 150px; height: 150px; } .forged .item--armor { width: 130px; height: 130px; }
  .recipe .mat { width: 64px; height: 64px; }
  .slide::after { background: linear-gradient(180deg, rgba(11,18,32,.88) 0%, rgba(11,18,32,.75) 55%, rgba(11,18,32,.5) 100%); }
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
              background: rgba(10, 15, 25, .98); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: .75rem; text-align: center; border-bottom: 0; }
}
