/* ==========================================================================
   Dune Wars - Landing redesign
   Flat, sharp, desert theme. No rounded corners anywhere.
   Used by app/Views/home_redesign.php (route: /indexNEW)
   ========================================================================== */

:root {
    --sand-950: #0b0805;
    --sand-900: #120d08;
    --sand-850: #18110a;
    --sand-800: #1f160d;
    --sand-700: #2b1f12;
    --sand-600: #3d2c19;
    --dune: #c8955a;
    --dune-light: #e6c08a;

    --spice: #e8862a;
    --spice-hot: #ffa646;
    --spice-edge: #8a420c;

    --blood: #b3261b;
    --blood-hot: #db3b2c;
    --blood-edge: #5a0f09;

    --ibad: #3fa9ff;            /* Eyes of Ibad - accent blue */
    --ibad-edge: #0f4d80;

    --text: #f1e4cf;
    --muted: #b39f82;
    --line: rgba(232, 134, 42, 0.35);
    --line-soft: rgba(200, 149, 90, 0.18);

    --cut: 14px;                /* angled corner size */
    --cut-lg: 26px;

    --font-display: 'Cinzel', 'Times New Roman', serif;
    --font-body: 'Rajdhani', 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    border-radius: 0 !important;   /* enforce flat & sharp */
}

html {
    scroll-behavior: smooth;
}

body.dw-landing {
    margin: 0;
    background: var(--sand-950);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Film-grain noise over everything */
body.dw-landing::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
    color: var(--spice-hot);
    text-decoration: none;
}

a:hover {
    color: var(--dune-light);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0;
}

.dw-wrap {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --------------------------------------------------------------------------
   3D angled buttons
   Parent carries the drop-shadow (the "slab edge"), child carries the clip.
   -------------------------------------------------------------------------- */
.btn3d {
    --face-top: var(--spice-hot);
    --face-bottom: var(--spice);
    --edge: var(--spice-edge);
    --ink: #1a0e03;

    position: relative;
    display: inline-block;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    filter: drop-shadow(0 6px 0 var(--edge)) drop-shadow(0 12px 14px rgba(0, 0, 0, 0.55));
    transition: transform 0.15s ease, filter 0.15s ease;
}

.btn3d > span {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 15px 34px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
    background: linear-gradient(180deg, var(--face-top) 0%, var(--face-bottom) 100%);
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

/* light sweep on hover */
.btn3d > span::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.45s ease;
}

.btn3d:hover {
    color: var(--ink);
    transform: translateY(-3px);
    filter: drop-shadow(0 9px 0 var(--edge)) drop-shadow(0 16px 18px rgba(0, 0, 0, 0.6)) brightness(1.08);
}

.btn3d:hover > span::after {
    left: 120%;
}

.btn3d:active {
    transform: translateY(5px);
    filter: drop-shadow(0 1px 0 var(--edge)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transition-duration: 0.05s;
}

.btn3d:focus-visible {
    outline: 2px solid var(--ibad);
    outline-offset: 6px;
}

.btn3d--blood {
    --face-top: var(--blood-hot);
    --face-bottom: var(--blood);
    --edge: var(--blood-edge);
    --ink: #fff3ea;
}

.btn3d--stone {
    --face-top: #4a3721;
    --face-bottom: #2f2214;
    --edge: #120c06;
    --ink: var(--dune-light);
}

/* outer face = 1px border colour, ::before = inset fill, so the line follows the diagonals */
.btn3d--stone > span {
    background: rgba(230, 192, 138, 0.35);
    box-shadow: none;
    isolation: isolate;
}

.btn3d--stone > span::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    background: linear-gradient(180deg, var(--face-top) 0%, var(--face-bottom) 100%);
    box-shadow: inset 0 2px 0 rgba(230, 192, 138, 0.18);
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.btn3d--sm > span {
    padding: 9px 20px;
    font-size: 0.88rem;
    --cut: 9px;
}

.btn3d--block {
    display: block;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Angled panels (1px "border" made from a clipped outer layer)
   -------------------------------------------------------------------------- */
.cut-panel {
    --c: var(--cut-lg);
    --border: var(--line);
    position: relative;
    padding: 1px;
    background: var(--border);
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}

.cut-panel > .cut-panel__inner {
    height: 100%;
    background: linear-gradient(160deg, rgba(31, 22, 13, 0.94), rgba(11, 8, 5, 0.96));
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.dw-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(11, 8, 5, 0.92), rgba(11, 8, 5, 0.7));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(6px);
}

.dw-topbar .dw-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 70px;
}

.dw-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.32em;
    color: var(--dune-light);
    white-space: nowrap;
}

.dw-logo span {
    color: var(--spice);
}

.dw-logo:hover {
    color: var(--text);
}

.dw-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dw-nav a {
    position: relative;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.dw-nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    background: var(--spice);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.dw-nav a:hover {
    color: var(--text);
}

.dw-nav a:hover::after {
    transform: scaleX(1);
}

.dw-topbar__cta {
    display: flex;
    gap: 14px;
}

/* --------------------------------------------------------------------------
   Hero with crossfading boss images
   -------------------------------------------------------------------------- */
.dw-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 110px 0 90px;
    overflow: hidden;
    isolation: isolate;
}

.dw-hero__slides {
    position: absolute;
    inset: 0;
    z-index: -3;
}

.dw-hero__slide {
    position: absolute;
    inset: -4%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: dwSlide 28s infinite;
}

.dw-hero__slide:nth-child(1) { animation-delay: 0s; }
.dw-hero__slide:nth-child(2) { animation-delay: 7s; }
.dw-hero__slide:nth-child(3) { animation-delay: 14s; }
.dw-hero__slide:nth-child(4) { animation-delay: 21s; }

/* 4 slides x 7s. Visible ~25% of the cycle, with slow Ken Burns zoom. */
@keyframes dwSlide {
    0%   { opacity: 0; transform: scale(1); }
    5%   { opacity: 1; }
    25%  { opacity: 1; }
    31%  { opacity: 0; transform: scale(1.08); }
    100% { opacity: 0; transform: scale(1.08); }
}

/* first slide should be visible immediately on load */
.dw-hero__slide:nth-child(1) {
    animation-name: dwSlideFirst;
}

@keyframes dwSlideFirst {
    0%   { opacity: 1; transform: scale(1); }
    25%  { opacity: 1; }
    31%  { opacity: 0; transform: scale(1.08); }
    95%  { opacity: 0; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); }
}

.dw-hero__shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(11, 8, 5, 0.95) 0%, rgba(11, 8, 5, 0.72) 45%, rgba(11, 8, 5, 0.45) 100%),
        linear-gradient(0deg, var(--sand-950) 0%, transparent 35%);
}

/* drifting sand */
.dw-hero__sand {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(230, 192, 138, 0.8), transparent),
        radial-gradient(1px 1px at 120px 80px, rgba(230, 192, 138, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 200px 150px, rgba(230, 192, 138, 0.7), transparent),
        radial-gradient(1px 1px at 60px 190px, rgba(230, 192, 138, 0.5), transparent),
        radial-gradient(1px 1px at 260px 40px, rgba(230, 192, 138, 0.6), transparent);
    background-size: 300px 220px;
    animation: dwSand 18s linear infinite;
}

@keyframes dwSand {
    from { background-position: 0 0; }
    to   { background-position: -900px 220px; }
}

.dw-hero__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
}

.dw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--spice);
}

.dw-eyebrow::before {
    content: "";
    width: 40px;
    height: 2px;
    background: var(--spice);
}

.dw-hero h1 {
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    line-height: 1.02;
    color: var(--text);
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.dw-hero h1 em {
    font-style: normal;
    color: var(--spice);
    display: block;
}

.dw-hero__lead {
    max-width: 560px;
    margin: 24px 0 36px;
    font-size: 1.2rem;
    color: var(--dune-light);
}

.dw-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.dw-hero__quote {
    margin-top: 48px;
    padding-left: 18px;
    border-left: 2px solid var(--spice);
    font-family: var(--font-display);
    font-style: italic;
    color: var(--muted);
    max-width: 480px;
}

/* --------------------------------------------------------------------------
   Login panel
   -------------------------------------------------------------------------- */
.dw-login .cut-panel__inner {
    padding: 36px 34px 30px;
}

.dw-login h2 {
    font-size: 1.5rem;
    color: var(--dune-light);
    margin-bottom: 6px;
}

.dw-login__sub {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.95rem;
}

.dw-field {
    margin-bottom: 16px;
}

.dw-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.dw-field input {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: rgba(11, 8, 5, 0.85);
    border: 1px solid var(--sand-600);
    border-bottom: 2px solid var(--sand-600);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dw-field input::placeholder {
    color: #6f5e47;
}

.dw-field input:focus {
    border-color: var(--sand-600);
    border-bottom-color: var(--spice);
    box-shadow: 0 6px 14px -8px rgba(232, 134, 42, 0.7);
}

.dw-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dw-captcha {
    margin: 8px 0 22px;
    min-height: 78px;
}

.dw-login__links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    font-size: 0.92rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Flash messages
   -------------------------------------------------------------------------- */
.dw-flash {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-left: 3px solid var(--blood-hot);
    background: rgba(179, 38, 27, 0.18);
    color: #ffd9d2;
    font-weight: 600;
}

.dw-flash--info {
    border-left-color: var(--ibad);
    background: rgba(63, 169, 255, 0.12);
    color: #d6ecff;
}

/* --------------------------------------------------------------------------
   Stats strip
   -------------------------------------------------------------------------- */
.dw-stats {
    position: relative;
    z-index: 2;
    margin-top: -50px;
}

.dw-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: var(--line);
    clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%, 0 100%, 0 var(--cut-lg));
    padding: 1px;
}

.dw-stat {
    padding: 28px 20px;
    text-align: center;
    background: var(--sand-850);
    transition: background 0.2s ease;
}

.dw-stat:hover {
    background: var(--sand-700);
}

/* match the outer cut so the border line runs along the diagonals */
.dw-stat:first-child {
    clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut-lg));
}

.dw-stat:last-child {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%, 0 100%);
}

.dw-stat__num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--spice);
    line-height: 1.1;
}

.dw-stat__label {
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.dw-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    background: #4cd964;
    box-shadow: 0 0 8px #4cd964;
    vertical-align: middle;
    animation: dwPulse 1.6s ease-in-out infinite;
}

@keyframes dwPulse {
    50% { opacity: 0.3; }
}

/* --------------------------------------------------------------------------
   Image-backed sections
   -------------------------------------------------------------------------- */
.dw-section {
    position: relative;
    padding: 120px 0;
    isolation: isolate;
}

.dw-section--img::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.dw-section--img::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, var(--sand-950) 0%, rgba(11, 8, 5, 0.82) 18%, rgba(11, 8, 5, 0.82) 82%, var(--sand-950) 100%);
}

.dw-section__head {
    max-width: 720px;
    margin: 0 auto 60px;
    text-align: center;
}

.dw-section__head .dw-eyebrow {
    justify-content: center;
}

.dw-section__head .dw-eyebrow::after {
    content: "";
    width: 40px;
    height: 2px;
    background: var(--spice);
}

.dw-section__head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text);
}

.dw-section__head p {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Faction cards
   -------------------------------------------------------------------------- */
.dw-factions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.dw-faction {
    --accent: var(--spice);
    --c: 18px;
    transition: transform 0.25s ease;
}

.dw-faction .cut-panel__inner {
    padding: 30px 22px 26px;
    position: relative;
}

.dw-faction .cut-panel__inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

.dw-faction:hover {
    --border: var(--accent);
    transform: translateY(-8px);
}

.dw-faction__sigil {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    background: var(--accent);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--sand-950);
}

.dw-faction h3 {
    font-size: 1.15rem;
    color: var(--accent);
    margin-bottom: 4px;
}

.dw-faction__tag {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.dw-faction p {
    margin: 0;
    font-size: 0.98rem;
    color: var(--text);
    opacity: 0.85;
}

.dw-faction--atreides  { --accent: #4f8fe0; }
.dw-faction--harkonnen { --accent: #d1382b; }
.dw-faction--ordos     { --accent: #3fa36b; }
.dw-faction--fremen    { --accent: #e0a43a; }
.dw-faction--sardaukar { --accent: #a78bd6; }

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */
.dw-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dw-feature {
    --c: 20px;
    transition: transform 0.25s ease;
}

.dw-feature .cut-panel__inner {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 22px;
    padding: 32px 30px;
}

.dw-feature:hover {
    --border: var(--spice);
    transform: translateX(6px);
}

.dw-feature__num {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--spice);
}

.dw-feature h3 {
    font-size: 1.3rem;
    color: var(--dune-light);
    margin-bottom: 10px;
}

.dw-feature p {
    margin: 0;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Final call to action
   -------------------------------------------------------------------------- */
.dw-final {
    text-align: center;
    padding: 160px 0;
}

.dw-final h2 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: var(--text);
    margin-bottom: 18px;
}

.dw-final p {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--dune-light);
    font-size: 1.15rem;
}

.dw-final .dw-hero__actions {
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.dw-footer {
    border-top: 1px solid var(--line);
    background: var(--sand-900);
    padding: 34px 0;
}

.dw-footer .dw-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.dw-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.dw-footer__links a {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dw-footer__links a:hover {
    color: var(--spice-hot);
}

.dw-footer__copy {
    color: #6f5e47;
    font-size: 0.88rem;
}

/* ==========================================================================
   Shared public-page components (help, tos, register, contact, etc.)
   ========================================================================== */

.dw-nav a.is-active {
    color: var(--text);
}

.dw-nav a.is-active::after {
    transform: scaleX(1);
}

/* Page hero: shorter banner with a boss image behind it */
.dw-page-hero {
    position: relative;
    padding: 150px 0 70px;
    isolation: isolate;
    border-bottom: 1px solid var(--line);
}

.dw-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--bg, url('/img/bosses/heighliner_wreck.webp'));
    background-size: cover;
    background-position: center 40%;
}

.dw-page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(11, 8, 5, 0.95) 0%, rgba(11, 8, 5, 0.75) 60%, rgba(11, 8, 5, 0.55) 100%),
        linear-gradient(0deg, var(--sand-950) 0%, transparent 50%);
}

.dw-page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.08;
    color: var(--text);
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.dw-page-hero p {
    max-width: 680px;
    margin: 18px 0 0;
    font-size: 1.15rem;
    color: var(--dune-light);
}

/* Main content area */
.dw-content {
    padding: 70px 0 100px;
}

.dw-stack > * + * {
    margin-top: 28px;
}

/* Sidebar layout (e.g. help guide with table of contents) */
.dw-with-sidebar {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 40px;
    align-items: start;
}

.dw-toc {
    --c: 16px;
    position: sticky;
    top: 94px;
}

.dw-toc .cut-panel__inner {
    padding: 22px 0;
}

.dw-toc h4 {
    padding: 0 22px 12px;
    font-size: 0.85rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--spice);
}

.dw-toc a {
    display: block;
    padding: 8px 22px;
    font-weight: 600;
    color: var(--muted);
    border-left: 3px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dw-toc a:hover,
.dw-toc a.is-active {
    color: var(--text);
    border-left-color: var(--spice);
    background: rgba(232, 134, 42, 0.08);
}

/* Cards: use on a .cut-panel */
.dw-card {
    --c: 20px;
}

.dw-card > .cut-panel__inner {
    padding: 32px 34px;
}

.dw-card--accent {
    --border: var(--spice);
}

.dw-card--danger {
    --border: var(--blood-hot);
}

.dw-grid-2,
.dw-grid-3,
.dw-grid-4 {
    display: grid;
    gap: 22px;
}

.dw-grid-2 { grid-template-columns: repeat(2, 1fr); }
.dw-grid-3 { grid-template-columns: repeat(3, 1fr); }
.dw-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Long-form text */
.dw-prose {
    color: var(--text);
}

.dw-prose h2 {
    font-size: 1.8rem;
    color: var(--dune-light);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.dw-prose h3 {
    font-size: 1.2rem;
    color: var(--spice);
    margin: 28px 0 10px;
}

.dw-prose h4 {
    font-size: 1rem;
    color: var(--dune-light);
    margin: 20px 0 8px;
}

.dw-prose p {
    margin: 0 0 14px;
    color: rgba(241, 228, 207, 0.88);
}

.dw-prose strong {
    color: var(--dune-light);
}

.dw-prose ul,
.dw-prose ol {
    margin: 0 0 16px;
    padding-left: 0;
}

.dw-prose ul {
    list-style: none;
}

.dw-prose ul > li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    color: rgba(241, 228, 207, 0.88);
}

.dw-prose ul > li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background: var(--spice);
    transform: rotate(45deg);
}

.dw-prose ol {
    padding-left: 22px;
}

.dw-prose ol > li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.dw-prose ol > li::marker {
    color: var(--spice);
    font-weight: 700;
}

.dw-prose a:not(.btn3d) {
    border-bottom: 1px solid rgba(255, 166, 70, 0.4);
}

.dw-prose > :last-child {
    margin-bottom: 0;
}

.dw-section-anchor {
    scroll-margin-top: 100px;
}

/* Callout box */
.dw-callout {
    margin: 18px 0;
    padding: 16px 20px;
    border-left: 3px solid var(--spice);
    background: rgba(232, 134, 42, 0.08);
    color: var(--dune-light);
}

.dw-callout--info {
    border-left-color: var(--ibad);
    background: rgba(63, 169, 255, 0.08);
}

.dw-callout--danger {
    border-left-color: var(--blood-hot);
    background: rgba(179, 38, 27, 0.14);
}

/* Accordion (native <details>, no JS) */
.dw-accordion {
    border-top: 1px solid var(--line-soft);
    margin: 16px 0;
}

.dw-accordion details {
    border-bottom: 1px solid var(--line-soft);
}

.dw-accordion summary {
    position: relative;
    display: block;
    padding: 16px 44px 16px 4px;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--dune-light);
    transition: color 0.15s ease;
}

.dw-accordion summary::-webkit-details-marker {
    display: none;
}

.dw-accordion summary::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -7px;
    border-right: 2px solid var(--spice);
    border-bottom: 2px solid var(--spice);
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin-top 0.2s ease;
}

.dw-accordion details[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.dw-accordion summary:hover,
.dw-accordion details[open] > summary {
    color: var(--spice-hot);
}

.dw-accordion__body {
    padding: 0 4px 18px;
}

/* Tables */
.dw-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.dw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
}

.dw-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--spice);
    background: rgba(232, 134, 42, 0.08);
    border-bottom: 1px solid var(--line);
}

.dw-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    color: rgba(241, 228, 207, 0.88);
}

.dw-table tbody tr:hover td {
    background: rgba(232, 134, 42, 0.05);
}

/* Badges */
.dw-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sand-950);
    background: var(--spice);
}

.dw-badge--blood { background: var(--blood-hot); color: #fff3ea; }
.dw-badge--ibad  { background: var(--ibad); }
.dw-badge--stone { background: var(--sand-600); color: var(--dune-light); }

/* Forms (extends .dw-field) */
.dw-field select,
.dw-field textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: rgba(11, 8, 5, 0.85);
    border: 1px solid var(--sand-600);
    border-bottom: 2px solid var(--sand-600);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dw-field select {
    appearance: none;
    padding-right: 40px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--spice) 50%),
        linear-gradient(135deg, var(--spice) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

.dw-field select option {
    background: var(--sand-900);
    color: var(--text);
}

.dw-field textarea {
    min-height: 150px;
    resize: vertical;
}

.dw-field select:focus,
.dw-field textarea:focus {
    border-bottom-color: var(--spice);
    box-shadow: 0 6px 14px -8px rgba(232, 134, 42, 0.7);
}

.dw-field__hint {
    margin-top: 6px;
    font-size: 0.88rem;
    color: var(--muted);
}

.dw-field__error {
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ff8a7a;
}

.dw-field.is-invalid input,
.dw-field.is-invalid select,
.dw-field.is-invalid textarea {
    border-bottom-color: var(--blood-hot);
}

.dw-field.is-valid input {
    border-bottom-color: #4cd964;
}

/* Checkbox / radio */
.dw-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    cursor: pointer;
    color: var(--text);
}

.dw-check input {
    appearance: none;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    background: rgba(11, 8, 5, 0.85);
    border: 1px solid var(--sand-600);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dw-check input[type="radio"] {
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    border: 0;
    background: var(--sand-600);
}

.dw-check input:checked {
    background: var(--spice);
    border-color: var(--spice);
    box-shadow: inset 0 0 0 4px var(--sand-950);
}

.dw-check input[type="radio"]:checked {
    box-shadow: none;
    background: radial-gradient(var(--spice) 30%, var(--sand-600) 32%);
}

.dw-check input:focus-visible {
    outline: 2px solid var(--ibad);
    outline-offset: 3px;
}

/* Selectable option cards (e.g. faction picker on register) */
.dw-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.dw-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dw-option .cut-panel {
    --c: 16px;
    height: 100%;
    transition: transform 0.2s ease;
}

.dw-option .cut-panel__inner {
    padding: 20px;
}

.dw-option:hover .cut-panel {
    transform: translateY(-4px);
}

.dw-option input:checked + .cut-panel {
    --border: var(--accent, var(--spice));
}

.dw-option input:checked + .cut-panel > .cut-panel__inner {
    background: linear-gradient(160deg, rgba(61, 44, 25, 0.96), rgba(18, 13, 8, 0.96));
}

.dw-option input:focus-visible + .cut-panel {
    outline: 2px solid var(--ibad);
    outline-offset: 4px;
}

.dw-flash--success {
    border-left-color: #4cd964;
    background: rgba(76, 217, 100, 0.12);
    color: #d4f7da;
}

.dw-flash--warning {
    border-left-color: var(--spice);
    background: rgba(232, 134, 42, 0.14);
    color: #ffe6c7;
}

.dw-divider {
    height: 1px;
    margin: 40px 0;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    border: 0;
}

.dw-center {
    text-align: center;
}

.dw-muted {
    color: var(--muted);
}

.dw-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.dw-narrow {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .dw-with-sidebar {
        grid-template-columns: 1fr;
    }

    .dw-toc {
        position: static;
    }

    .dw-grid-3,
    .dw-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dw-grid-2,
    .dw-grid-3,
    .dw-grid-4 {
        grid-template-columns: 1fr;
    }

    .dw-card > .cut-panel__inner {
        padding: 24px 20px;
    }

    .dw-page-hero {
        padding: 120px 0 50px;
    }
}

@media (max-width: 1200px) {
    .dw-factions {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .dw-nav {
        display: none;
    }

    .dw-hero__grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .dw-hero__shade {
        background:
            linear-gradient(180deg, rgba(11, 8, 5, 0.75) 0%, rgba(11, 8, 5, 0.9) 100%);
    }

    .dw-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dw-factions {
        grid-template-columns: repeat(2, 1fr);
    }

    .dw-features {
        grid-template-columns: 1fr;
    }

    /* fixed backgrounds are janky on mobile */
    .dw-section--img::before {
        background-attachment: scroll;
    }
}

@media (max-width: 600px) {
    body.dw-landing {
        font-size: 16px;
    }

    .dw-wrap {
        padding: 0 16px;
    }

    .dw-logo {
        font-size: 1.2rem;
        letter-spacing: 0.22em;
    }

    .dw-topbar__cta .btn3d--stone {
        display: none;
    }

    .dw-hero__actions .btn3d {
        width: 100%;
    }

    .dw-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .dw-login .cut-panel__inner {
        padding: 30px 20px 24px;
    }

    .dw-factions {
        grid-template-columns: 1fr;
    }

    .dw-feature .cut-panel__inner {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dw-section {
        padding: 90px 0;
    }

    .dw-captcha {
        transform: scale(0.9);
        transform-origin: left top;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dw-hero__slide,
    .dw-hero__sand,
    .dw-live-dot {
        animation: none;
    }

    .dw-hero__slide:nth-child(1) {
        opacity: 1;
    }

    .btn3d,
    .dw-faction,
    .dw-feature {
        transition: none;
    }
}
