/* ========================================
   SHARED BASE — visual foundation for all pages
   Extracted from homepage styles.css
   ======================================== */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen-reader only (visually hidden but accessible) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Design tokens */
:root {
    --color-bg: #1e2520;
    --color-bg-dark: #161c18;
    --color-primary: #8a6a3a;
    --color-primary-light: #a0845a;
    --color-accent: #D4A017;
    --color-text: #f0e6d0;
    --color-text-dim: #b8a68e;
    --color-text-label: #b8a68e;
    --color-blood: #8b2020;
    --color-parchment: #b8a68e;
    --color-dark-parchment: #8a6a3a;
    --color-red: #b02010;
    --color-fire: #c850c0;
    --color-sage: #5a7a5a;
    --gradient-bg: linear-gradient(160deg, #1e2520 0%, #2a1c16 55%, #1e2520 100%);
    --font-display: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', serif;
    --font-body: 'Crimson Text', 'Georgia', 'Times New Roman', serif;

    /* Radius scale */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadow scale */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* Transition timing */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Semantic colors */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #e6a817;
    --color-info: #667eea;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--gradient-bg);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
    background-attachment: fixed;
}

/* Noise texture overlay for grit */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Subtle vignette overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(10, 14, 12, 0.3) 100%);
    z-index: 1;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: var(--color-bg);
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

/* Focus states — keyboard accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Shared glass card — matches container styling across swap, dao, holders, etc. */
.glass-card {
    background: linear-gradient(135deg, rgba(138, 106, 58, 0.10) 0%, transparent 50%), rgba(38, 32, 26, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(138, 106, 58, 0.35);
    border-radius: var(--radius-xs);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
}

/* SubDAO disclaimer (shown on every page footer) */
.subdao-disclaimer {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: #6b6560;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    text-align: center;
}

/* Touch-device: disable fixed background to prevent jank */
@media (hover: none) and (pointer: coarse) {
    body {
        background-attachment: scroll;
    }
}
