/* =====================================================
   SADIDA — GUARDIANS OF NATURE
   Design: dark, earthy, mythological
   Palette: deep charcoal, earthy greens, warm amber
   ===================================================== */

/* ---- TOKENS ---- */
:root {
  --bg-deep:       #0d0f0b;
  --bg-dark:       #111410;
  --bg-card:       #181d14;
  --bg-card-hover: #1f2819;
  --surface:       #1e2618;
  --surface-2:     #252e1c;

  --green-dark:    #2d4220;
  --green-mid:     #4a7c40;
  --green-light:   #6b9c5a;
  --green-bright:  #8fba70;
  --green-glow:    #a3d47f;

  --amber:         #c8922a;
  --amber-light:   #e8b84b;
  --amber-dim:     #8c641c;

  --text-primary:  #e8dcc8;
  --text-secondary:#b8a888;
  --text-muted:    #7a6e5a;
  --text-green:    #9ec87f;

  --border:        rgba(107, 140, 90, 0.25);
  --border-bright: rgba(143, 186, 112, 0.4);

  --ff-heading:    'Cinzel', 'Georgia', serif;
  --ff-lore:       'EB Garamond', 'Georgia', serif;
  --ff-body:       'Inter', system-ui, sans-serif;

  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     16px;

  --shadow-card:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow:   0 0 40px rgba(107,180,64,0.15);

  --transition:    0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 3px; }

/* ---- CONTAINER ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padded { padding: 100px 0; position: relative; overflow: hidden; }

/* ---- SECTION HEADER ---- */
.section-header { text-align: center; margin-bottom: 64px; }
.section-pretitle {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--ff-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 20px;
}
.title-ornament {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-mid), transparent);
  margin: 0 auto 24px;
}
.section-intro {
  font-family: var(--ff-lore);
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  font-style: italic;
}

/* =======================================
   NAV
======================================= */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--transition), backdrop-filter var(--transition);
}
.site-nav.scrolled {
  background: rgba(13, 15, 11, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--ff-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--green-bright);
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--green-bright); }

/* =======================================
   HERO
======================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-banner-grotto.png');
  background-size: cover;
  background-position: center top;
  transform: scale(1.08);
  transition: transform 0.1s linear;
  will-change: transform;
}

.hero-portrait {
  position: absolute;
  right: 5%;
  bottom: 0;
  height: 92%;
  z-index: 2;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 1.2s ease 0.8s, transform 1.2s ease 0.8s;
}
.hero-portrait.visible {
  opacity: 0.85;
  transform: translateX(0);
}
.hero-portrait img {
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(107,180,64,0.3));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(13,15,11,0.88) 0%, rgba(13,15,11,0.55) 55%, rgba(13,15,11,0.2) 100%),
    linear-gradient(180deg, rgba(13,15,11,0.3) 0%, transparent 40%, rgba(13,15,11,0.8) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding: 0 24px;
  margin-left: -5%;
}

.hero-pretitle {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-title {
  font-family: var(--ff-heading);
  font-size: clamp(5rem, 14vw, 10rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  text-shadow: 0 0 60px rgba(107,180,64,0.25), 0 4px 20px rgba(0,0,0,0.8);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-family: var(--ff-heading);
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--green-bright);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-tagline {
  font-family: var(--ff-lore);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  font-style: italic;
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  border: 1px solid var(--green-mid);
  color: var(--green-bright);
  font-family: var(--ff-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(74, 124, 64, 0.12);
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.cta-btn:hover {
  background: rgba(74, 124, 64, 0.28);
  border-color: var(--green-bright);
  color: #fff;
  box-shadow: 0 0 20px rgba(107,180,64,0.25);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, var(--green-mid), transparent);
  margin: 0 auto;
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); transform-origin: top; }
}

/* ---- REVEAL ANIMATIONS ---- */
.reveal-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.32s; }
.delay-4 { transition-delay: 0.46s; }

/* =======================================
   LORE ORIGIN
======================================= */
.lore-origin { background: var(--bg-dark); }

.lore-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.lore-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.12;
}
.lore-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, transparent 30%, transparent 70%, var(--bg-dark) 100%);
}

.lore-origin .container { position: relative; z-index: 1; }

.lore-body {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: start;
}

.lore-text p {
  font-family: var(--ff-lore);
  font-size: 1.08rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.9;
}
.lore-text p:first-child::first-letter {
  float: left;
  font-family: var(--ff-heading);
  font-size: 4.5rem;
  line-height: 0.8;
  margin: 6px 12px 0 0;
  color: var(--green-mid);
}

.lore-image {
  position: sticky;
  top: 80px;
}
.lore-image img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  object-fit: cover;
  aspect-ratio: 4/3;
}
.lore-image-caption {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-align: center;
  font-style: italic;
}

/* =======================================
   PHILOSOPHY
======================================= */
.philosophy { background: var(--bg-deep); }

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.philo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.philo-card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: translateY(-4px);
}

.philo-summon-art {
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-card) 100%);
  position: relative;
}
.philo-summon-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg-card) 100%);
}
.philo-summon-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
}
.philo-card:hover .philo-summon-art img {
  transform: scale(1.06);
}

.philo-no-img {
  background: radial-gradient(ellipse at center, var(--surface-2) 0%, var(--bg-card) 70%);
}
.philo-rune {
  width: 100px;
  height: 100px;
  position: relative;
  z-index: 1;
  animation: rotateSlow 20s linear infinite;
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.philo-content {
  padding: 28px;
}
.philo-icon {
  width: 36px;
  height: 36px;
  color: var(--green-bright);
  margin-bottom: 14px;
}
.philo-icon svg { width: 100%; height: 100%; }
.philo-content h3 {
  font-family: var(--ff-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.philo-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* =======================================
   SPELLS
======================================= */
.spells { background: var(--bg-dark); }

.spells-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.spells-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
}
.spells-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 75%);
}

.spells .container { position: relative; z-index: 1; }

.spells-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.spell-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 24px;
  padding: 28px;
  align-items: flex-start;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: default;
}
.spell-card:hover {
  border-color: var(--green-mid);
  box-shadow: 0 0 30px rgba(74,124,64,0.2), var(--shadow-card);
  transform: translateY(-3px);
}

.spell-icon-wrap {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.spell-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.spell-card:hover .spell-icon-wrap img {
  transform: scale(1.1);
}
.spell-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(107,180,64,0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}
.spell-card:hover .spell-glow { opacity: 1; }

.spell-info { flex: 1; min-width: 0; }
.spell-name {
  font-family: var(--ff-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.spell-type {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 10px;
  font-weight: 500;
}
.spell-desc {
  font-family: var(--ff-lore);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  font-style: italic;
}
.spell-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.spell-tags span {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2px 8px;
  background: var(--surface);
}

/* =======================================
   WORLD
======================================= */
.world {
  position: relative;
  overflow: hidden;
  min-height: 700px;
}

.world-panels {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.world-panel {
  position: relative;
  overflow: hidden;
}
.world-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}
.world:hover .world-panel img {
  transform: scale(1.04);
}
.world-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,15,11,0.65);
}
.world-overlay-full {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(13,15,11,0.5) 100%),
    linear-gradient(180deg, rgba(13,15,11,0.4) 0%, transparent 20%, transparent 80%, rgba(13,15,11,0.4) 100%);
}

.world-content {
  position: relative;
  z-index: 1;
}

.world-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.world-col h3 {
  font-family: var(--ff-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-bright);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.world-col p {
  font-family: var(--ff-lore);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

/* =======================================
   MASTERY
======================================= */
.mastery { background: var(--bg-deep); }

.mastery-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  margin-bottom: 80px;
}

.mastery-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mastery-block {
  display: flex;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.mastery-block:last-child { border-bottom: none; }

.mastery-num {
  font-family: var(--ff-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1;
  flex-shrink: 0;
  width: 52px;
  padding-top: 4px;
}

.mastery-text h3 {
  font-family: var(--ff-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.mastery-text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.mastery-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mastery-portrait {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.mastery-portrait img {
  width: 100%;
  object-fit: cover;
  object-position: top;
  max-height: 280px;
  transition: transform 0.6s ease;
}
.mastery-portrait:hover img { transform: scale(1.04); }

.mastery-callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color var(--transition);
}
.mastery-callout:hover { border-color: var(--border-bright); }
.mastery-callout img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.callout-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 4px;
  font-weight: 500;
}
.callout-text {
  font-family: var(--ff-lore);
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
}

.mastery-hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 280px;
}
.mastery-hero-banner img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top center;
}
.mastery-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,15,11,0.9) 0%, rgba(13,15,11,0.6) 60%, rgba(13,15,11,0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  gap: 12px;
}
.mastery-banner-overlay blockquote {
  font-family: var(--ff-lore);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
  max-width: 600px;
  quotes: "\201C" "\201D";
}
.mastery-banner-overlay blockquote::before { content: open-quote; }
.mastery-banner-overlay blockquote::after  { content: close-quote; }
.mastery-banner-overlay cite {
  font-size: 0.78rem;
  color: var(--green-bright);
  letter-spacing: 0.1em;
  font-style: normal;
}

/* =======================================
   FOOTER
======================================= */
.site-footer {
  position: relative;
  padding: 120px 0 60px;
  overflow: hidden;
  text-align: center;
}
.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.footer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
}
.footer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(13,15,11,0.7) 40%, var(--bg-deep) 100%);
}
.footer-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-sigil {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
  animation: rotateSlow 30s linear infinite;
  opacity: 0.7;
}
.footer-mantra {
  font-family: var(--ff-heading);
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  line-height: 1.4;
  margin-bottom: 16px;
}
.footer-class-name {
  font-family: var(--ff-heading);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--green-mid);
  opacity: 0.5;
  margin-bottom: 24px;
}
.footer-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}
.footer-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 0 auto 20px;
}
.footer-legal {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
  opacity: 0.6;
}

/* =======================================
   RESPONSIVE
======================================= */
@media (max-width: 1024px) {
  .lore-body { grid-template-columns: 1fr; }
  .lore-image { position: static; }
  .mastery-layout { grid-template-columns: 1fr; }
  .mastery-aside { flex-direction: row; flex-wrap: wrap; }
  .mastery-portrait { flex: 1; min-width: 200px; }
  .mastery-callout { flex: 1; min-width: 200px; }
}

@media (max-width: 768px) {
  .section-padded { padding: 72px 0; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .spells-grid { grid-template-columns: 1fr; }
  .world-columns { grid-template-columns: 1fr; gap: 28px; }
  .hero-portrait { display: none; }
  .hero-content { margin-left: 0; }
  .hero-title { font-size: clamp(4rem, 18vw, 7rem); }
  .nav-links { display: none; }
  .world-panels { grid-template-columns: 1fr; }
  .world-panel:last-child { display: none; }
  .mastery-banner-overlay { padding: 28px; }
  .spell-card { flex-direction: column; }
  .spell-icon-wrap { width: 100%; height: 160px; }
  .mastery-aside { flex-direction: column; }
  .mastery-callout img { width: 44px; height: 44px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 3.5rem; }
  .mastery-block { flex-direction: column; gap: 12px; }
  .mastery-num { font-size: 1.8rem; }
}
