/*
 * ============================================================
 * SUMMONCRAFT — GENERIC.CSS
 * ============================================================
 * General visual components used by custom pages/modules.
 * shared.css handles the main store layout.
 * Halloween decorations are subtle and static (no floating particles).
 * ============================================================
 */

:root {
  --sc-bg: #070609;
  --sc-bg-soft: #0c0a10;
  --sc-panel: #121017;
  --sc-panel-soft: #17131d;
  --sc-panel-hover: #1d1825;

  --sc-orange: #d97832;
  --sc-orange-light: #ee9448;
  --sc-orange-dark: #a85220;

  --sc-purple: #70458a;
  --sc-purple-light: #9864b8;
  --sc-purple-dark: #432650;

  --sc-text: #f2ece8;
  --sc-text-soft: #b9b0bb;
  --sc-text-muted: #78717c;

  --sc-border: rgba(255,255,255,.07);
  --sc-border-strong: rgba(255,255,255,.13);

  --sc-radius: 10px;
  --sc-radius-small: 7px;
}

/* ============================================================
   GENERIC CARDS
   ============================================================ */

.sc-card,
.my-shadow,
.index-body,
.support,
.policy > div {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255,255,255,.025), transparent 48%),
    var(--sc-panel);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}

.sc-card {
  padding: 24px;
  overflow: hidden;
}

/* Thin, elegant top edge on custom cards */
.sc-card::before,
.my-shadow::before,
.index-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(217,120,50,.24),
    rgba(112,69,138,.28),
    transparent
  );
  pointer-events: none;
}

/* ============================================================
   TEXT
   ============================================================ */

.sc-title,
.index-body h1,
.index-body h2,
.index-body h3,
.index-body h4 {
  color: var(--sc-text);
  font-family: 'Cinzel', serif;
  font-weight: 700;
}

.sc-title {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.25;
}

.sc-text,
.index-body p {
  color: var(--sc-text-soft);
  line-height: 1.65;
}

.sc-muted {
  color: var(--sc-text-muted);
}

/* ============================================================
   ACCENTS
   ============================================================ */

.sc-orange {
  color: var(--sc-orange) !important;
}

.sc-purple {
  color: var(--sc-purple-light) !important;
}

.sc-divider {
  width: 100%;
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--sc-border-strong),
    transparent
  );
}

/* ============================================================
   GENERIC BUTTONS
   ============================================================ */

.sc-button,
.btn-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  gap: 8px;
  border: 1px solid rgba(217,120,50,.30);
  border-radius: 7px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--sc-orange-dark), var(--sc-orange));
  font-weight: 700;
  text-decoration: none;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    filter .18s ease;
}

.sc-button:hover,
.btn-wide:hover {
  color: #fff !important;
  border-color: rgba(238,148,72,.50);
  box-shadow: 0 8px 22px rgba(217,120,50,.16);
  transform: translateY(-1px);
  filter: brightness(1.04);
}

/* Existing custom color classes */
.red-bg,
.green-bg,
.blue-bg,
.discord-bg {
  border-radius: 7px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}

.red-bg {
  background: linear-gradient(135deg, #7d2933, #b83c48) !important;
}

.green-bg {
  background: linear-gradient(135deg, #315d48, #438363) !important;
}

.blue-bg {
  background: linear-gradient(135deg, var(--sc-purple-dark), var(--sc-purple)) !important;
  color: #fff !important;
}

.discord-bg {
  background: linear-gradient(135deg, #493d79, #6656a1) !important;
  color: #fff !important;
}

/* ============================================================
   GENERIC INPUTS
   ============================================================ */

.sc-input,
.index-body input,
.index-body select,
.index-body textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--sc-text) !important;
  background: #0d0b10 !important;
  border: 1px solid var(--sc-border);
  border-radius: 7px;
  font-family: 'Montserrat', sans-serif;
}

.sc-input:focus,
.index-body input:focus,
.index-body select:focus,
.index-body textarea:focus {
  border-color: rgba(217,120,50,.45);
  box-shadow: 0 0 0 3px rgba(217,120,50,.07);
  outline: none;
}

/* ============================================================
   HOME LAYOUT
   ============================================================ */

.home-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.home-left,
.home-right {
  position: sticky;
  top: 20px;
}

.home-center {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.home-right > * {
  width: 100%;
}

.home-right .widget {
  width: 100%;
  overflow: hidden;
  border-radius: var(--sc-radius);
}

@media (max-width: 1350px) {
  .home-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .home-right {
    display: none;
  }
}

@media (max-width: 960px) {
  .home-layout {
    display: flex;
    flex-direction: column;
  }

  .home-left,
  .home-center,
  .home-right {
    width: 100%;
    max-width: none;
    position: static;
  }

  .home-left {
    display: none;
  }

  .home-right {
    display: block;
  }
}

/* ============================================================
   SUPPORT / POLICY
   ============================================================ */

.support,
.policy > div {
  padding: 24px;
}

.support h4,
.policy h4 {
  color: var(--sc-orange);
}

.support p,
.policy p {
  color: var(--sc-text-soft);
}

.policy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

/* ============================================================
   HALLOWEEN BOX DECORATIONS
   Add class="halloween-box" to any custom card/box.
   Add class="halloween-spider" when a tiny spider is desired.
   These decorations are static and intentionally rare.
   ============================================================ */

.halloween-box {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Small spider web in the upper-right corner */
.halloween-box::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 76px;
  height: 76px;
  opacity: .23;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23c8bdce' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M100 0L0 100M100 0L25 100M100 0L50 100M100 0L75 100M100 0L100 100'/%3E%3Cpath d='M80 0Q80 20 100 20M60 0Q60 40 100 40M40 0Q40 60 100 60M20 0Q20 80 100 80'/%3E%3C/g%3E%3C/svg%3E")
    top right / contain no-repeat;
}

/* Tiny pumpkin on selected boxes, activated by an extra class */
.halloween-pumpkin {
  position: relative;
  isolation: isolate;
}

.halloween-pumpkin::after {
  content: "🎃";
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 8px;
  font-size: 21px;
  line-height: 1;
  opacity: .72;
  filter: saturate(.78);
  pointer-events: none;
}

/* Optional small spider on selected boxes */
.halloween-spider {
  position: relative;
  isolation: isolate;
}

.halloween-spider::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 12px;
  width: 24px;
  height: 24px;
  opacity: .25;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c8bdce' stroke-linecap='round' stroke-linejoin='round' stroke-width='3'%3E%3Cellipse cx='32' cy='35' rx='10' ry='14' fill='%23c8bdce'/%3E%3Ccircle cx='32' cy='18' r='8' fill='%23c8bdce'/%3E%3Cpath d='M23 28L9 20M21 34L5 32M22 41L8 47M41 28L55 20M43 34L59 32M42 41L56 47'/%3E%3C/g%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.sc-glow-orange {
  box-shadow:
    0 0 18px rgba(217,120,50,.15),
    0 12px 30px rgba(0,0,0,.25);
}

.sc-glow-purple {
  box-shadow:
    0 0 18px rgba(112,69,138,.16),
    0 12px 30px rgba(0,0,0,.25);
}

.sc-hover-lift {
  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.sc-hover-lift:hover {
  transform: translateY(-3px);
}

.transition-all {
  transition: all .2s ease !important;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .transition-all,
  .sc-hover-lift,
  .sc-button,
  .btn-wide {
    transition: none !important;
  }
}
