/* Sito di Riftloom. Token dal client (client/src/ui.css): prugna, viola, oro. */
@font-face { font-family: 'Cinzel'; src: url(/fonts/Cinzel.ttf) format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter.ttf) format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #14111C; --panel: #211A2C; --surface: #30243B; --accent: #9464BA; --gold: #D6AD70;
  --text: #EEE4D8; --muted: #A9A0B6; --danger: #E08AA0; --ok: #8FD19E;
  --line: color-mix(in srgb, var(--gold) 22%, transparent);
  --display: 'Cinzel', 'Palatino Linotype', Georgia, serif;
  --font: 'Inter', system-ui, 'Segoe UI', sans-serif;
  --wrap: 72rem; --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.0625rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: .2em; }
a:hover { color: #F0CF98; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--bg); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
section.wrap { padding-block: clamp(3rem, 7vw, 5.5rem) 0; }
.lead { font-size: 1.2rem; color: var(--text); max-width: 38em; }
.measure { max-width: 40em; }
.note { color: var(--muted); font-size: .9rem; }
.role { color: var(--gold); font-family: var(--display); font-size: .95rem; margin-bottom: .6em; }

/* pulsanti */
.btn { display: inline-block; font: 600 1rem var(--display); letter-spacing: .04em; color: #1B1309; text-decoration: none;
  background: linear-gradient(#E3C08A, #B98C4E); padding: .85rem 1.6rem; border-radius: 6px; border: 0; cursor: pointer;
  box-shadow: 0 0 0 1px #F3D7A6 inset, 0 6px 24px color-mix(in srgb, var(--gold) 25%, transparent); }
.btn:hover { color: #1B1309; filter: brightness(1.08); }
.btn.small { padding: .5rem 1rem; font-size: .85rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.more { font-family: var(--display); font-weight: 600; white-space: nowrap; }

/* intestazione */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 2rem);
  padding: .75rem var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.home .top { position: fixed; inset: 0 0 auto; }
.brand { font: 700 1.3rem var(--display); color: var(--text); text-decoration: none; letter-spacing: .06em; }
.links { display: flex; gap: clamp(.75rem, 2vw, 1.75rem); margin-right: auto; }
.links a, .lang { color: var(--muted); text-decoration: none; font-size: .95rem; }
.links a:hover, .lang:hover, .links a[aria-current] { color: var(--text); }
.links a[aria-current] { box-shadow: 0 2px 0 var(--gold); }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; row-gap: .4rem; }
  .links { order: 3; width: 100%; }
  .brand { margin-right: auto; }
  .home .top { background: #14111Cee; }
}

/* eroe: Valoria che si muove, e il nome tagliato da un filo d'oro */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #14111Cf2 0%, #14111Cb0 38%, transparent 70%), linear-gradient(transparent 55%, var(--bg)); }
.hero-text { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(3rem, 9vh, 6rem); max-width: 44rem; margin-left: max(0px, calc((100vw - var(--wrap)) / 2)); }
.wordmark { display: flex; align-items: stretch; font-size: clamp(3.5rem, 11vw, 8rem); font-weight: 800; letter-spacing: .04em; margin: 0 0 .25em;
  text-shadow: 0 4px 30px #000a; line-height: 1; }
.seam { flex: none; width: max(5px, .07em); border-radius: 50%; margin: -.18em .12em; background: linear-gradient(transparent, var(--gold) 20%, #FFF1D2 50%, var(--gold) 80%, transparent);
  box-shadow: 0 0 24px 4px color-mix(in srgb, var(--gold) 65%, transparent), 0 0 70px 10px color-mix(in srgb, var(--accent) 45%, transparent); transform-origin: center; animation: seam 1.6s cubic-bezier(.2, .7, .2, 1) .3s both; }
@keyframes seam { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.motto { font: italic 500 clamp(1.1rem, 2vw, 1.3rem) var(--font); color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .seam { animation: none; } html { scroll-behavior: auto; } }

/* blocchi */
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.pillars h3 { color: var(--gold); }
.pillars .cols3 > div { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.split-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.split-head p { margin: 0; color: var(--muted); }

.strip { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin: 0; padding: 0; }
.strip a { position: relative; display: block; overflow: hidden; color: var(--text); text-decoration: none; }
.strip img { width: 100%; aspect-ratio: 416 / 608; object-fit: cover; filter: saturate(.85) brightness(.85); transition: filter .25s, transform .4s; }
.strip a:hover img, .strip a:focus-visible img { filter: none; transform: scale(1.03); }
.strip span { position: absolute; inset: auto 0 0; padding: 2.5rem 1rem 1rem; font: 600 1.05rem var(--display);
  background: linear-gradient(transparent, #14111Cee); }
@media (max-width: 900px) { .strip { grid-template-columns: repeat(3, 1fr); } }

.band { position: relative; margin-top: clamp(3rem, 7vw, 5.5rem); padding-block: clamp(4rem, 12vw, 9rem);
  background: linear-gradient(90deg, #14111Cf0 0%, #14111C99 45%, #14111C40), var(--img) center / cover no-repeat var(--bg); }
.band.tall { margin-top: 0; padding-block: clamp(6rem, 18vw, 12rem) clamp(3rem, 8vw, 6rem); }
.band p { max-width: 34em; }
.final { text-align: center; padding-bottom: clamp(3rem, 7vw, 5rem); }
.final p { color: var(--muted); }

/* classi */
.intro { padding-bottom: 0; }
.classes { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); padding-top: clamp(2rem, 5vw, 3.5rem); }
.class { display: grid; grid-template-columns: minmax(11rem, 16rem) 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; scroll-margin-top: 5rem; }
.class:nth-child(even) { grid-template-columns: 1fr minmax(11rem, 16rem); }
.class:nth-child(even) img { order: 2; }
.class img { border-radius: 4px; box-shadow: 0 0 0 1px var(--line), 0 20px 50px #0009; }
.class p:last-child { max-width: 32em; }
@media (max-width: 640px) { .class, .class:nth-child(even) { grid-template-columns: 1fr; } .class:nth-child(even) img { order: 0; } .class img { max-width: 16rem; } }
.races ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.races li { border: 1px solid var(--line); border-radius: 99px; padding: .3rem .9rem; font-family: var(--display); }
.races { padding-bottom: 3rem; }

/* mondo: le aree in fila dal livello 1 al 45 */
/* un solo dipinto per tutte le aree: alto quanto l'elenco, a destra, sfumato verso il testo */
.areas { list-style: none; margin: 1rem 0 0; padding: 0; position: relative; isolation: isolate; }
.areas::before { content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; aspect-ratio: 1280 / 1664; max-width: 100%;
  background: url(/art/sfondo-aree.webp) center / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 35%); }
.areas::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #14111Cf2 0%, #14111Cb5 50%, #14111C33); }
.areas li { padding-block: clamp(2.5rem, 6vw, 4rem); }
.areas li + li { border-top: 1px solid #ffffff12; }
.areas p { max-width: 34em; }
.range { display: flex; align-items: center; gap: 1rem; font-size: .9rem; color: var(--muted); margin: 0; }
.bar { position: relative; width: min(16rem, 45vw); height: 4px; background: #ffffff1a; border-radius: 2px; }
.bar::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--from); right: calc(100% - var(--to)); background: var(--gold); border-radius: 2px; min-width: 4px; }
.dungeons figure { margin: 0; }
.dungeons img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; margin-bottom: 1rem; }

/* novità */
.patches { list-style: none; margin: 0; padding: 0 0 3rem; border-left: 1px solid var(--line); }
.patch { position: relative; padding: 0 0 2.25rem 1.75rem; }
.patch::before { content: ''; position: absolute; left: -5px; top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.patch-head { display: flex; gap: 1rem; color: var(--muted); font-size: .9rem; }
.ver { color: var(--gold); font-weight: 600; }
.patch h3 { margin: .2rem 0 .6rem; }
.patch ul { margin: 0; padding-left: 1.1rem; max-width: 46em; }
.patch li { margin-bottom: .5em; }
.patches.short { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; border: 0; padding: 0; }
.patches.short .patch { padding: 0 0 0 1.25rem; border-left: 1px solid var(--line); }
.patches.short .patch::before { left: -5px; }
.patches.short p { color: var(--muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* beta */
.beta { min-height: calc(100svh - 4rem); padding-block: clamp(3rem, 8vw, 6rem);
  background: linear-gradient(90deg, #14111Cf5 0%, #14111Cd0 50%, #14111C90), var(--img) center / cover no-repeat var(--bg); }
.beta-grid { display: grid; grid-template-columns: 1fr minmax(18rem, 26rem); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 820px) { .beta-grid { grid-template-columns: 1fr; } }
.ticks { padding-left: 1.1rem; color: var(--muted); }
.ticks li { margin-bottom: .5em; }
.signup { display: grid; gap: .9rem; background: color-mix(in srgb, var(--panel) 92%, transparent); padding: clamp(1.5rem, 4vw, 2rem);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 8px; box-shadow: 0 20px 60px #000a; }
.signup label { font-weight: 600; }
.signup input[type=email] { font: inherit; color: var(--text); background: #14111C; border: 1px solid #ffffff2a; border-radius: 6px; padding: .75rem .9rem; }
.signup input[type=email]:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); }
.check { display: flex; gap: .6rem; align-items: start; font-weight: 400 !important; font-size: .95rem; color: var(--muted); }
.check input { margin-top: .3rem; accent-color: var(--gold); width: 1.1rem; height: 1.1rem; flex: none; }
.status { min-height: 1.5em; margin: 0; font-size: .95rem; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }
.signup.done > :not(.status) { display: none; }
.signup.done .status { font: 600 1.15rem/1.4 var(--display); }

/* privacy */
.prose { max-width: 46rem; padding-bottom: 3rem; }
.prose h2 { font-size: 1.35rem; margin-top: 1.75em; }

.foot { margin-top: clamp(3rem, 7vw, 5rem); padding: 2rem var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; text-align: center; }
.foot p { margin: .3rem 0; }
.foot a { color: var(--muted); }
