/* SOUL website. Colours come straight from the client's themes (Theme.java). */
:root, [data-theme="mono"] {
  --accent: #ffffff; --accent-deep: #bdbdc2; --on-accent: #0b0b0c;
  --bg: #060607; --panel: #141416; --text: #f4f4f5; --dim: #8d8d94;
  --glow: rgba(255, 255, 255, .14);
}
[data-theme="rukia"] {
  --accent: #9ad8ff; --accent-deep: #5aa9e6; --on-accent: #06131e;
  --bg: #04070c; --panel: #0f1622; --text: #f3f8ff; --dim: #8792a3;
  --glow: rgba(154, 216, 255, .18);
}
[data-theme="ulquiorra"] {
  --accent: #3ddc97; --accent-deep: #1f9e6a; --on-accent: #04120c;
  --bg: #040606; --panel: #0f1513; --text: #f2f7f4; --dim: #85948d;
  --glow: rgba(61, 220, 151, .16);
}
[data-theme="zabimaru"] {
  --accent: #e5383b; --accent-deep: #a4161a; --on-accent: #fff1f1;
  --bg: #080405; --panel: #170c0e; --text: #fff4f4; --dim: #9c8a8c;
  --glow: rgba(229, 56, 59, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 500 16px/1.6 Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
code { font: 500 .9em ui-monospace, Consolas, monospace; background: rgba(255,255,255,.07); padding: .1em .4em; border-radius: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- shared pieces */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 10px; font: 600 15px Manrope, sans-serif;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .tab:focus-visible, .pill:focus-visible, .theme-card:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }
.btn-outline { border-color: rgba(255,255,255,.28); color: var(--text); background: rgba(0,0,0,.25); backdrop-filter: blur(6px); }
.btn-outline:hover { border-color: var(--accent); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 16px; }

.pill {
  height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  background: rgba(0,0,0,.35); color: var(--text); font: 500 14px Manrope, sans-serif;
  transition: border-color .3s ease;
}

.card {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid rgba(255,255,255,.07); border-radius: 12px;
}

.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
h2 { margin: 0 0 14px; font: 600 clamp(26px, 4vw, 38px)/1.2 Manrope, sans-serif; letter-spacing: -.01em; }
h3 { margin: 12px 0 6px; font-size: 17px; font-weight: 700; }
.lead { color: var(--dim); max-width: 640px; margin: 0 0 28px; }
.meta { color: var(--dim); font-size: 14px; margin: 14px 0 0; }

.tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tab {
  height: 34px; padding: 0 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--text);
  font: 600 14px Manrope, sans-serif; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.tab:hover { border-color: rgba(255,255,255,.45); }
.tab.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.frame {
  margin: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4), 0 0 120px var(--glow);
  background: #000; aspect-ratio: 16 / 9;
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.frame img.fading { opacity: 0; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(16px, calc((100vw - 1180px) / 2));
  background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font: 300 20px Montserrat, sans-serif; letter-spacing: .36em; margin-right: -.36em; }
.links { display: flex; gap: 26px; }
.links a { color: var(--dim); text-decoration: none; font-size: 15px; font-weight: 600; transition: color .2s ease; }
.links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: var(--hero-h, 100svh); display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.scene {
  position: absolute; inset: -3%; z-index: -2;
  background: center / cover no-repeat; transform: scale(1.04);
  transition: opacity .6s ease; animation: breathe 48s ease-in-out infinite;
}
.scene.fading { opacity: 0; }
.hero::after { /* the client's vignette: darker at the top, bottom and sides */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 62%, var(--bg) 100%),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
}
.motes { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
@keyframes breathe { 0%, 100% { transform: scale(1.04); } 50% { transform: scale(1.075); } }

.hero-inner { text-align: center; padding: 120px 16px 80px; max-width: 760px; }
.logo { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 34px); }
.logo-emblem { width: clamp(56px, 9vw, 96px); height: auto; filter: drop-shadow(0 0 26px var(--glow)); }
.wordmark {
  margin: 0; font: 300 clamp(54px, 11vw, 116px)/1 Montserrat, sans-serif;
  letter-spacing: .42em; margin-right: -.42em;
  background: linear-gradient(180deg, #ffffff 0%, #ececf0 40%, #8e8e97 64%, #dcdce2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 26px 0 30px; font-size: clamp(17px, 2.2vw, 20px); color: color-mix(in srgb, var(--text) 85%, transparent); text-shadow: 0 2px 18px rgba(0,0,0,.8); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- sections */
.preview { padding: 0 16px; max-width: 1180px; margin: -40px auto 0; position: relative; }
.section { max-width: 1180px; margin: 0 auto; padding: 110px 16px 0; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 30px; }
.feature { padding: 24px; transition: border-color .25s ease, transform .25s ease; }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-2px); }
.feature svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature p { margin: 0; color: var(--dim); font-size: 15px; }

.gallery .tabs { margin: 10px 0 22px; }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.theme-card { padding: 0; overflow: hidden; cursor: pointer; text-align: left; color: inherit; font: inherit; transition: border-color .25s ease, transform .25s ease; }
.theme-card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.theme-card:hover { transform: translateY(-2px); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 40px var(--glow); }
.theme-text { display: block; padding: 14px 16px 18px; }
.theme-text strong { display: block; font-size: 16px; }
.theme-text small { display: block; color: var(--dim); font-size: 14px; margin-top: 2px; }

/* ---------------------------------------------------------------- community */
.community-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.select select {
  height: 34px; padding: 0 34px 0 12px; border-radius: 8px; cursor: pointer;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text); border: 1px solid rgba(255,255,255,.2); font: 600 14px Manrope, sans-serif; appearance: none;
}
.select select:disabled { opacity: .4; cursor: default; }
.community-body { min-height: 180px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pack { overflow: hidden; display: flex; flex-direction: column; }
.pack-thumb { aspect-ratio: 256 / 160; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 14%, #121216), #0a0a0d); display: grid; place-items: center; }
.pack-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pack-thumb .none { width: 42px; opacity: .25; }
.pack-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pack-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-meta { color: var(--dim); font-size: 13px; }
.pack-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.07); color: var(--dim); }
.presets { display: grid; gap: 10px; }
.preset { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.preset svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.preset div { min-width: 0; flex: 1; }
.preset .pack-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preset .hint { color: var(--dim); font-size: 13px; white-space: nowrap; }
.empty { padding: 44px 20px; text-align: center; color: var(--dim); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 12px; height: 230px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- download */
.download { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; padding: 42px; overflow: hidden; position: relative; }
.download::before { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; background: radial-gradient(circle, var(--glow), transparent 70%); pointer-events: none; }
.download-side { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; position: relative; }
.download-side img { filter: drop-shadow(0 0 30px var(--glow)); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--accent); color: var(--on-accent); }
.steps a { color: var(--accent); }
.steps div { color: var(--dim); }
.steps b { color: var(--text); }

.faq details { padding: 0; margin-bottom: 10px; }
.faq summary { padding: 16px 20px; cursor: pointer; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; color: var(--dim); font-size: 20px; line-height: 1; top: 16px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--dim); }

.footer {
  max-width: 1180px; margin: 110px auto 0; padding: 30px 16px 40px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--dim); font-size: 14px;
}
.footer p { margin: 0; }
.footer .brand-word { font-size: 17px; color: var(--text); }

.hidden { display: none !important; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 880px) {
  .links { display: none; }
  .download { grid-template-columns: 1fr; padding: 28px 20px; }
}
@media (max-width: 520px) {
  .theme-pill { display: none; }
  .features { grid-template-columns: 1fr; }
  .preset .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
