/* ==========================================================
   DUNGEON MASTER TOOL — Landing Page v4.0
   The DM's session table: warm dark wood, candle gold,
   paper notes, ink. v4 keeps the v3 theme and layout and adds
   depth, fluid type, inline icons and the table scenes
   (scene.css). Motion respects prefers-reduced-motion.
   ========================================================== */

/* ---- Fonts: self-hosted latin subsets (SIL OFL 1.1, see fonts/OFL-*.txt) ---- */
@font-face {
    font-family: 'Marcellus';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/marcellus-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/lora-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Lora';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/lora-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Caveat';
    font-style: normal;
    font-weight: 500 600;
    font-display: swap;
    src: url('fonts/caveat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #16110b;
    --bg-raise: #1c1610;
    --panel: #221a12;
    --panel-2: #1a140e;
    --line: #34281b;
    --line-strong: #55432c;

    --ink: #ecdfc9;
    --ink-dim: #b3a184;
    --gold: #d9a96b;
    --gold-soft: #edc78a;
    --red: #a23b2e;
    --red-hover: #b84d3e;

    --gold-text: linear-gradient(180deg, #f6dcaa 0%, #e2b273 55%, #c08a4c 100%);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-deep: 0 2px 0 rgba(0, 0, 0, 0.35), 0 30px 60px -12px rgba(0, 0, 0, 0.7);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    --font-display: 'Marcellus', serif;
    --font-body: 'Lora', serif;
    --font-hand: 'Caveat', cursive;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    color: inherit;
}

/* ---- Inline Lucide icons (sprite at the top of <body>) ---- */
.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Paper grain over the whole canvas ---- */
.grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
}

/* ---- Candle glow at the top, breathing very slowly ---- */
.candle-glow {
    position: fixed;
    top: -25%;
    left: 50%;
    width: 130vw;
    height: 90vh;
    z-index: -1;
    pointer-events: none;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 0%, rgba(217, 169, 107, 0.11) 0%, transparent 60%);
    animation: candle-breathe 7s ease-in-out infinite alternate;
}

@keyframes candle-breathe {
    from { opacity: 0.75; }
    to { opacity: 1; }
}

/* ---- Container ---- */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Anchor targets clear the fixed navbar */
section[id],
header[id] {
    scroll-margin-top: 86px;
}

/* ---- Accessibility helpers ---- */
.skip-link {
    position: fixed;
    top: 0.75rem;
    left: -9999px;
    z-index: 3000;
    padding: 0.6rem 1rem;
    background: var(--gold);
    color: #1a120a;
    font-family: var(--font-display);
}

.skip-link:focus {
    left: 0.75rem;
}

:focus-visible {
    outline: 2px solid var(--gold-soft);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

a {
    text-decoration: none;
    color: inherit;
}

em {
    color: var(--ink);
}

.gold-text {
    background: var(--gold-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---- Section headers: hand-written kicker + rule ---- */
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-hand);
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--gold);
    margin-bottom: 0.8rem;
}

.kicker-num {
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
    border: 1px solid var(--line-strong);
    padding: 0.12rem 0.55rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.45rem);
    line-height: 1.15;
    margin-bottom: 0.9rem;
}

.section-header .section-lead {
    color: var(--ink-dim);
    font-size: 1.02rem;
    max-width: 590px;
    line-height: 1.7;
}

/* A small ink flourish under section titles */
.section-header h2::after {
    content: '';
    display: block;
    width: 74px;
    height: 10px;
    margin-top: 0.85rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='74' height='10'%3E%3Cpath d='M0 5.5h29M45 5.5h29' stroke='%23d9a96b'/%3E%3Cpath d='M37 1l4.5 4.5L37 10l-4.5-4.5z' fill='%23d9a96b'/%3E%3C/svg%3E") no-repeat;
    opacity: 0.85;
}

/* ---- Scroll reveal — one quiet fade per block ---- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

/* No JS: show everything */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.8rem 1.7rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
        transform 0.15s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.btn.large {
    padding: 1rem 2.2rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(180deg, #b0473a, var(--red) 55%, #8e3226);
    color: #f6ead2;
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 220, 190, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #c45a4b, var(--red-hover) 55%, #9c3a2d);
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 220, 190, 0.2);
}

.btn-primary:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.btn-secondary {
    background: rgba(22, 17, 11, 0.35);
    color: var(--gold);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    border-color: var(--gold);
    background: rgba(217, 169, 107, 0.08);
    color: var(--gold-soft);
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(22, 17, 11, 0.72);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.navbar.scrolled {
    background: rgba(17, 13, 9, 0.95);
    border-bottom-color: var(--line);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--gold-soft);
}

.logo-img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.9rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.82rem;
    color: var(--ink-dim);
    font-weight: 500;
    letter-spacing: 0.04em;
    position: relative;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--gold-soft);
}

.nav-links > a:not(.github-link):not(.nav-cta)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
}

.nav-links > a:not(.github-link):not(.nav-cta):hover::after {
    transform: scaleX(1);
}

.nav-links .icon {
    width: 16px;
    height: 16px;
}

.github-link {
    color: var(--ink) !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem !important;
    border: 1px solid var(--line-strong);
    color: var(--gold-soft) !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-cta:hover {
    border-color: var(--gold);
    background: rgba(217, 169, 107, 0.08);
}

/* ---- Dropdown ---- */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
    border: none;
    font-family: inherit;
    color: var(--ink-dim);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 5px 0;
}

.dropdown-toggle:hover {
    color: var(--gold-soft);
}

.dropdown-toggle .icon {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.dropdown:hover .dropdown-toggle .icon,
.dropdown.open .dropdown-toggle .icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 190px;
    width: max-content;
    background: rgba(17, 13, 9, 0.98);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* Bridge the gap so the menu stays open while the pointer travels to it */
.dropdown-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(217, 169, 107, 0.07);
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink);
    cursor: pointer;
}

.mobile-menu-btn .icon {
    width: 24px;
    height: 24px;
}

.mobile-menu-btn .icon-close,
.mobile-menu-btn[aria-expanded="true"] .icon-open {
    display: none;
}

.mobile-menu-btn[aria-expanded="true"] .icon-close {
    display: block;
}

/* ===== HERO ===== */
.hero {
    padding: 150px 0 110px;
    min-height: 95vh;
    min-height: 95svh;
    display: flex;
    align-items: center;
    position: relative;
    /* the glow behind the screenshot may pass the edges; phones would zoom out for it */
    overflow-x: clip;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
    align-items: center;
    width: 100%; /* a flex item of .hero: do not shrink to the content */
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--line-strong);
    background: rgba(217, 169, 107, 0.06);
    color: var(--gold-soft);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    margin-bottom: 1.6rem;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(217, 169, 107, 0.16);
}

.badge.is-stable .badge-dot {
    background: #8fc47a;
    box-shadow: 0 0 0 3px rgba(143, 196, 122, 0.18);
}

.hero-content h1 {
    font-size: clamp(2.2rem, 1.25rem + 3.2vw, 3.75rem);
    line-height: 1.08;
    margin-bottom: 1.6rem;
}

.hero-subtitle {
    font-size: 1.06rem;
    color: var(--ink-dim);
    margin-bottom: 2.4rem;
    max-width: 540px;
    line-height: 1.75;
    border-left: 3px solid var(--red);
    padding-left: 1.4rem;
}

.hero-actions {
    display: flex;
    gap: 1.1rem;
    flex-wrap: wrap;
    margin-bottom: 2.4rem;
}

.hero-platforms {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.platform-label {
    font-size: 0.74rem;
    color: var(--ink-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.platform-icons {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    list-style: none;
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    font-size: 0.72rem;
    color: var(--ink-dim);
    letter-spacing: 0.04em;
}

.platform-tag .icon {
    width: 12px;
    height: 12px;
}

/* Screenshot frame */
.hero-visual {
    position: relative;
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: -12% -8%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(217, 169, 107, 0.14), transparent 70%);
    pointer-events: none;
}

.window-frame {
    background: #0d0a07;
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-deep), 0 0 0 6px rgba(13, 10, 7, 0.55), 0 0 0 7px rgba(85, 67, 44, 0.35);
    overflow: hidden;
    border-radius: 4px;
}

.window-header {
    background: linear-gradient(180deg, #1d1710, #15100b);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: var(--ink-dim);
    letter-spacing: 0.04em;
}

.window-header::before {
    content: 'dungeon_master_tool — session 14';
    order: 4;
    margin-left: 0.5rem;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-strong);
}

.dot.red { background: #a8574a; }
.dot.yellow { background: #b8924f; }
.dot.green { background: #6f8a52; }

.window-frame img {
    width: 100%;
    height: auto;
}

/* Paper note pinned over the frame */
.field-note {
    position: absolute;
    left: -1.6rem;
    bottom: -1.8rem;
    max-width: 300px;
    background: linear-gradient(180deg, #f3e5c6, #e6d3a9);
    color: #3a2a16;
    padding: 1rem 1.2rem;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.3);
    transform: rotate(-2deg);
    border-left: 4px solid var(--red);
}

.field-note::before {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    width: 64px;
    height: 18px;
    transform: translateX(-50%) rotate(3deg);
    background: rgba(236, 223, 201, 0.32);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.field-note-title {
    font-family: var(--font-hand);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 0.35rem;
}

.field-note-text {
    font-size: 0.84rem;
    line-height: 1.5;
}

.field-note-tag {
    display: inline-block;
    margin-top: 0.55rem;
    padding: 0.1rem 0.55rem;
    border: 1px solid rgba(58, 42, 22, 0.35);
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-weight: 600;
}

/* ===== SUPPORT BAR ===== */
.support-bar {
    padding: 1.2rem 0;
    background: var(--bg-raise);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.support-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.support-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.74rem;
    color: var(--ink-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.support-label .icon {
    width: 14px;
    height: 14px;
    color: var(--gold);
}

.support-links {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.42rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    color: var(--ink-dim);
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.support-btn:hover {
    border-color: var(--gold);
    color: var(--gold-soft);
}

.support-btn .icon {
    width: 14px;
    height: 14px;
}

.support-btn.patreon:hover {
    border-color: #f96854;
    color: #ff8a78;
}

.support-btn.gf {
    padding: 0;
    background: transparent;
    border: none;
}

.support-btn.gf img {
    height: 32px;
    width: auto;
}

/* ===== STATS BAR — ledger strip ===== */
.stats-bar {
    padding: 1.7rem 0;
    background: var(--bg-raise);
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    text-align: center;
    border-right: 1px solid var(--line);
    padding: 0.2rem 0.5rem;
}

.stat-item:last-child {
    border-right: none;
}

.stat-num {
    display: block;
    font-family: var(--font-hand);
    font-size: 2.6rem;
    line-height: 1.05;
    color: var(--gold);
}

.stat-gp {
    display: inline-block;
    height: 2.5rem;
    width: auto;
    vertical-align: -0.2em;
}

.stat-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

/* ===== FEATURES ===== */
.features {
    padding: 100px 0 84px;
}

.features .section-header {
    margin-bottom: 2.6rem;
}

.feature-group {
    margin-bottom: 2.4rem;
}

.feature-group:last-child {
    margin-bottom: 0;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    margin-top: 0.5rem;
    background: linear-gradient(90deg, var(--line-strong), transparent);
}

.group-label {
    font-family: var(--font-hand);
    font-size: 1.75rem;
    color: var(--gold);
    line-height: 1;
    margin-top: 0.5rem;
}

.ledger-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.4rem;
}

.ledger-card {
    background:
        linear-gradient(180deg, rgba(255, 236, 200, 0.025), transparent 40%),
        var(--panel);
    border: 1px solid var(--line);
    border-top: 2px solid var(--gold);
    padding: 1.7rem 1.7rem 1.9rem;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(237, 199, 138, 0.025), 0 10px 24px -14px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.ledger-card.featured,
.ledger-card.wide {
    grid-column: span 2;
}

.ledger-card.featured {
    border-color: var(--line-strong);
    border-top: 3px solid var(--gold-soft);
    background: linear-gradient(180deg, rgba(217, 169, 107, 0.09), var(--panel) 60%);
}

.ledger-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 16px 16px 0;
    border-color: transparent var(--bg) transparent transparent;
}

.ledger-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: inset 0 0 0 1px rgba(237, 199, 138, 0.05), 0 22px 40px -18px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(217, 169, 107, 0.06);
}

.ledger-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    color: var(--gold);
    background: radial-gradient(circle at 30% 25%, rgba(237, 199, 138, 0.14), rgba(217, 169, 107, 0.03) 70%);
    box-shadow: inset 0 1px 0 rgba(255, 236, 200, 0.06);
    margin-bottom: 1.1rem;
}

.ledger-icon .icon {
    width: 20px;
    height: 20px;
}

.ledger-card h3 {
    font-size: 1.17rem;
    margin-bottom: 0.55rem;
}

.ledger-card p {
    color: var(--ink-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* New in v20: your own rules — a full-width card */
.ledger-card.spotlight {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1.4rem;
    align-items: start;
    border-color: var(--line-strong);
    border-top: 3px solid var(--gold-soft);
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(162, 59, 46, 0.16), transparent 55%),
        linear-gradient(180deg, rgba(217, 169, 107, 0.1), var(--panel) 70%);
}

.ledger-card.spotlight .ledger-icon {
    grid-row: 1 / span 4;
    width: 54px;
    height: 54px;
    margin: 0;
}

.ledger-card.spotlight .ledger-icon .icon {
    width: 24px;
    height: 24px;
}

.spotlight-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.1rem 0.55rem;
    border: 1px solid var(--line-strong);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-soft);
    background: rgba(217, 169, 107, 0.07);
}

.tag .icon {
    width: 12px;
    height: 12px;
}

.tag.tag-beta {
    color: #e3a294;
    border-color: rgba(162, 59, 46, 0.55);
    background: rgba(162, 59, 46, 0.12);
}

.ledger-card.spotlight h3 {
    font-size: 1.4rem;
    margin: 0.1rem 0 0;
}

.ledger-card.spotlight p {
    max-width: 760px;
}

.spotlight-note {
    font-size: 0.82rem !important;
    font-style: italic;
}

/* Bento: the dice video card next to two text cards */
.ledger-grid.bento {
    grid-template-columns: 1.3fr 1fr;
}

.ledger-grid.bento .media-card {
    grid-row: span 2;
}

.media-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.media-card::after {
    z-index: 2;
}

.media-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0d0a07;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.media-frame video,
.media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
}

.media-copy {
    padding: 1.5rem 1.7rem 1.8rem;
}

/* ===== LOCAL SYNC BAND ===== */
.sync-band {
    padding: 92px 0;
    background: var(--bg-raise);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.sync-panel {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    padding: 3rem;
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(90% 120% at 0% 0%, rgba(217, 169, 107, 0.08), transparent 60%),
        linear-gradient(180deg, var(--panel), var(--panel-2));
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(237, 199, 138, 0.03);
}

.sync-copy h2 {
    font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.1rem);
    line-height: 1.2;
    margin: 0.8rem 0 1rem;
}

.sync-copy h2::after {
    display: none;
}

code {
    font-family: ui-monospace, 'Cascadia Code', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--gold-soft);
}

.sync-notes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.sync-note {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    background: rgba(22, 17, 11, 0.55);
    transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.sync-note:hover {
    border-color: var(--line-strong);
    transform: translateX(3px);
}

.sync-note-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    color: var(--gold);
}

.sync-note-icon .icon {
    width: 18px;
    height: 18px;
}

.sync-note h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.sync-note p {
    font-size: 0.86rem;
    color: var(--ink-dim);
    line-height: 1.55;
}

/* ===== SECOND SCREEN ===== */
.screens {
    padding: 92px 0 84px;
    background:
        radial-gradient(70% 60% at 70% 0%, rgba(217, 169, 107, 0.06), transparent 70%),
        var(--bg-raise);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.screens .section-header {
    margin-bottom: 2.6rem;
}

.ways-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.way-item {
    padding: 1.3rem 1.4rem;
    border: 1px solid var(--line);
    background: var(--panel);
    transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.way-item:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.way-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    color: var(--gold);
    background: rgba(217, 169, 107, 0.05);
    margin-bottom: 0.8rem;
}

.way-icon .icon {
    width: 17px;
    height: 17px;
}

.way-item h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.way-item p {
    font-size: 0.86rem;
    color: var(--ink-dim);
    line-height: 1.6;
}

/* ===== PILLARS ===== */
.pillars {
    padding: 92px 0;
}

.pillars .section-header {
    margin-bottom: 2.4rem;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.pillar-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--line);
    background: var(--panel);
    transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.pillar-item:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.pillar-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    color: var(--gold);
    background: rgba(217, 169, 107, 0.05);
}

.pillar-icon .icon {
    width: 17px;
    height: 17px;
}

.pillar-item h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.pillar-item p {
    font-size: 0.84rem;
    color: var(--ink-dim);
    line-height: 1.55;
}

/* ===== GALLERY ===== */
.showcase {
    padding: 92px 0;
}

.showcase .section-header {
    margin-bottom: 2.4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1060px;
    margin: 0 auto;
    list-style: none;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    background: #0d0a07;
    overflow: hidden;
    cursor: zoom-in;
    text-align: left;
    box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.8);
    transition: border-color 0.25s ease;
}

.gallery-item:hover {
    border-color: var(--line-strong);
}

.gallery-grid li.wide {
    grid-column: 1 / -1;
}

.gallery-item img {
    width: 100%;
    height: auto;
    filter: brightness(0.9);
    transition: filter 0.3s ease, transform 0.5s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.02);
    filter: brightness(1.02);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: linear-gradient(to top, rgba(13, 10, 7, 0.95) 15%, transparent 100%);
    color: var(--gold-soft);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ===== DOWNLOAD ===== */
.download {
    padding: 92px 0 110px;
}

.download .section-header {
    margin-bottom: 2.4rem;
}

.download-card {
    max-width: 720px;
    margin: 0 auto;
}

.os-tabs-container {
    border: 1px solid var(--line-strong);
    background: #0f0b07;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
}

.os-header {
    display: flex;
    border-bottom: 1px solid var(--line);
    background: var(--bg-raise);
    overflow-x: auto;
    scrollbar-width: none;
}

.os-btn {
    flex: 1;
    min-height: 48px;
    background: transparent;
    border: none;
    color: var(--ink-dim);
    padding: 0.85rem 0.5rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.os-btn .icon {
    width: 16px;
    height: 16px;
}

.os-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
}

.os-btn[aria-selected="true"] {
    color: var(--gold-soft);
    border-bottom-color: var(--gold);
    background: linear-gradient(180deg, transparent, rgba(217, 169, 107, 0.06));
}

.os-content-wrapper {
    padding: 2.6rem 2.2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.download-content {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    display: flex;
    animation: tabFade 0.25s ease;
}

.download-content[hidden] {
    display: none;
}

@keyframes tabFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.download-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    color: var(--gold);
    background: radial-gradient(circle at 30% 25%, rgba(237, 199, 138, 0.14), rgba(217, 169, 107, 0.03) 70%);
    margin-bottom: 0.5rem;
}

.download-icon .icon {
    width: 26px;
    height: 26px;
}

.download-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.tab-desc {
    color: var(--ink-dim);
    font-size: 0.92rem;
    text-align: center;
}

.tab-note {
    color: var(--ink-dim);
    font-size: 0.82rem;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

.tab-note code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
    color: var(--gold);
    border: 1px solid var(--line);
}

.version-info {
    display: block;
    font-size: 0.76rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.download-cta {
    margin-top: 1rem;
    text-align: center;
    width: 100%;
}

.download-cta .tab-desc {
    margin-top: 1rem;
}

.code-block {
    background: #0a0705;
    border-left: 3px solid var(--gold);
    padding: 0.8rem 3rem 0.8rem 1rem;
    text-align: left;
    font-family: ui-monospace, 'Cascadia Code', Consolas, 'Courier New', monospace;
    font-size: 0.82rem;
    position: relative;
    color: #d6c9b4;
    width: 100%;
    max-width: 500px;
    margin-top: 0.5rem;
}

.code-block pre {
    overflow-x: auto;
    padding-bottom: 0.3rem;
    margin: 0;
    font: inherit;
}

.copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--line);
    color: var(--ink-dim);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    z-index: 10;
}

.copy-btn .icon {
    width: 15px;
    height: 15px;
}

.copy-btn:hover,
.copy-btn.copied {
    color: var(--gold);
    border-color: var(--gold);
}

.security-note {
    background: rgba(162, 59, 46, 0.08);
    border: 1px solid rgba(162, 59, 46, 0.3);
    padding: 1.2rem;
    text-align: left;
    width: 100%;
}

.security-note h4 {
    font-size: 0.96rem;
    color: #e08b7c;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-note h4 .icon {
    width: 16px;
    height: 16px;
}

.security-note p {
    font-size: 0.86rem;
    color: var(--ink);
    line-height: 1.5;
}

.steps-list {
    text-align: left;
    width: 100%;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background: var(--red);
    color: #f6ead2;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--ink);
}

.step-content .code-block {
    margin-top: 0.6rem;
    max-width: 100%;
}

/* ===== FEEDBACK ===== */
.feedback {
    padding: 92px 0;
    background: var(--bg-raise);
    border-top: 1px solid var(--line);
}

.feedback .section-header {
    margin-bottom: 2.4rem;
}

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    max-width: 920px;
    margin: 0 auto;
}

.feedback-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.9rem 1.3rem;
    border: 1px solid var(--line);
    background: rgba(22, 17, 11, 0.55);
    gap: 0.6rem;
    transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.feedback-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
}

.feedback-icon-badge {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(217, 169, 107, 0.06);
}

.feedback-icon-badge-instagram {
    border-color: rgba(225, 48, 108, 0.4);
    background: rgba(225, 48, 108, 0.12);
}

.feedback-icon-badge-linkedin {
    border-color: rgba(10, 102, 194, 0.4);
    background: rgba(10, 102, 194, 0.14);
}

.feedback-card .icon {
    width: 24px;
    height: 24px;
    color: var(--gold);
}

.feedback-card .feedback-icon-badge-instagram .icon,
.feedback-card .feedback-icon-badge-linkedin .icon {
    color: #fff;
}

.feedback-card h3 {
    font-size: 1rem;
}

.feedback-card p {
    font-size: 0.82rem;
    color: var(--ink-dim);
    overflow-wrap: anywhere;
}

/* ===== FOOTER ===== */
footer {
    background: #0d0a07;
    border-top: 3px solid var(--gold);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    padding-top: 3.2rem;
    padding-bottom: 2rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    max-width: 360px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--gold-soft);
    margin-bottom: 0.3rem;
}

.footer-logo-img {
    width: 30px;
    height: auto;
}

.footer-desc {
    color: var(--ink-dim);
    font-size: 0.86rem;
    line-height: 1.6;
}

.footer-langs {
    display: flex;
    gap: 0.7rem;
    margin-top: 0.5rem;
}

.footer-langs span {
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--line);
    font-size: 0.7rem;
    color: var(--ink-dim);
    letter-spacing: 0.05em;
}

.footer-right {
    display: flex;
    gap: 3rem;
}

.footer-link-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-link-group h4 {
    font-size: 0.8rem;
    color: var(--gold);
    margin-bottom: 0.3rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-link-group a {
    color: var(--ink-dim);
    font-size: 0.84rem;
    transition: color 0.2s ease;
}

.footer-link-group a:hover {
    color: var(--gold-soft);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 1.2rem 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.76rem;
    color: var(--ink-dim);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 7, 4, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: zoom-out;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
    animation: tabFade 0.2s ease;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    cursor: default;
    border: 1px solid var(--line-strong);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--ink);
    cursor: pointer;
}

.lightbox-close .icon {
    width: 28px;
    height: 28px;
}

.lightbox-close:hover {
    color: var(--gold);
}

body.lightbox-open {
    overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1080px) {
    .nav-links {
        gap: 1.4rem;
    }
}

@media (max-width: 968px) {
    .container {
        padding: 0 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        height: calc(100vh - 72px);
        height: calc(100dvh - 72px);
        width: 100%;
        background: #110d09;
        flex-direction: column;
        justify-content: center;
        gap: 1.6rem;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s var(--ease), visibility 0.3s;
        border-top: 1px solid var(--line);
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.05rem;
    }

    .nav-links > a:not(.github-link):not(.nav-cta)::after {
        display: none;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        display: none;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        gap: 1.6rem;
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-menu a {
        padding: 0;
        border-radius: 0;
        white-space: normal;
    }

    .dropdown-menu a:hover {
        background: none;
    }

    .hero {
        padding-top: 128px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4rem;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
        border-left: none;
        padding: 0;
    }

    .hero-actions,
    .hero-platforms,
    .platform-icons {
        justify-content: center;
    }

    .field-note {
        left: 50%;
        transform: translateX(-50%) rotate(-2deg);
        width: max-content;
        max-width: min(300px, 86%);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem 0;
    }

    .stat-item:nth-child(2) {
        border-right: none;
    }

    .sync-panel {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.2rem;
    }

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

    .ways-grid {
        grid-template-columns: 1fr;
    }

    .ledger-grid.bento {
        grid-template-columns: 1fr 1fr;
    }

    .ledger-grid.bento .media-card {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-left {
        align-items: center;
    }

    .footer-right {
        gap: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .ledger-grid,
    .ledger-grid.bento {
        grid-template-columns: 1fr;
    }

    .ledger-card.featured,
    .ledger-card.wide {
        grid-column: auto;
    }

    .ledger-card.spotlight {
        grid-template-columns: 1fr;
    }

    .ledger-card.spotlight .ledger-icon {
        grid-row: auto;
        margin-bottom: 0.6rem;
    }

    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .feedback-grid {
        grid-template-columns: 1fr;
    }

    /* icon-only tabs: the name stays for screen readers */
    .os-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .os-btn {
        padding: 0.85rem 0.8rem;
    }

    .footer-right {
        flex-direction: column;
        align-items: center;
    }

    .footer-link-group {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.15rem;
    }

    .hero {
        padding-top: 112px;
        padding-bottom: 96px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .stat-num {
        font-size: 2.2rem;
    }

    .sync-panel {
        padding: 1.6rem 1.2rem;
    }

    .os-content-wrapper {
        padding: 2rem 1.2rem;
    }

    .ledger-card {
        padding: 1.4rem 1.3rem 1.6rem;
    }

    .media-card {
        padding: 0;
    }

    .media-copy {
        padding: 1.3rem 1.3rem 1.5rem;
    }
}

/* ---- Reduced motion: no ambient motion, no reveal ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .candle-glow {
        animation: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ===== DOC PAGES (privacy, account deletion) ===== */
.doc {
    padding: 120px 0 4rem;
}

.doc-inner {
    max-width: 780px;
}

.doc-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--gold-soft);
    margin-bottom: 0.3rem;
}

.doc-meta {
    color: var(--ink-dim);
    font-size: 0.85rem;
}

.doc-meta a,
.doc p a,
.doc li a {
    color: var(--gold);
    border-bottom: 1px solid var(--line-strong);
}

.doc-meta a:hover,
.doc p a:hover,
.doc li a:hover {
    color: var(--gold-soft);
}

.doc h2 {
    font-size: 1.3rem;
    color: var(--gold);
    margin: 2.2rem 0 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
}

.doc p,
.doc li {
    color: var(--ink-dim);
}

.doc p {
    margin-bottom: 0.9rem;
}

.doc ul,
.doc ol {
    padding-left: 1.4rem;
    margin-bottom: 0.9rem;
}

.doc li {
    margin-bottom: 0.4rem;
}

.doc strong {
    color: var(--ink);
    font-weight: 500;
}

.doc-rule {
    border: 0;
    height: 1px;
    margin: 3.5rem 0 2.5rem;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.newsletter {
    max-width: 520px;
    margin: 2.4rem auto 0;
    text-align: center;
}

.newsletter label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--ink-dim);
}

.newsletter-row {
    display: flex;
    gap: 0.6rem;
}

.newsletter-row input {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    font: inherit;
    color: inherit;
    border: 1px solid var(--line-strong);
    background: rgba(22, 17, 11, 0.55);
}

.newsletter-msg {
    min-height: 1.2em;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--ink-dim);
}
