/* ==========================================================================
   base.css — design tokens, reset, typography
   Fonts: Oswald (display) · Montserrat (UI) · Roboto (body)

   Brand palette estimated by eye from static/assets/*.png reference art
   (sunset-over-desert synthwave: night indigo -> hot magenta -> vivid
   orange -> sun-glow gold). Refine with exact swatches from final logo
   files if pixel-precision ever matters.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700;800&family=Roboto:wght@300;400;500&display=swap');

/* --------------------------------------------------------------------------
   Design tokens — light theme (default)
   -------------------------------------------------------------------------- */

:root {
    /* Fonts */
    --font-display: 'Oswald', sans-serif;
    --font-ui:      'Montserrat', sans-serif;
    --font-body:    'Roboto', sans-serif;

    /* Primary palette (sunset orange) — darkened for light-mode text/link
       contrast; -fill tokens stay the vivid brand orange for solid buttons */
    --primary:          #C2600F;
    --primary-dim:      #8F4709;
    --primary-hi:       #E07016;
    --primary-wash:     rgba(244, 132, 31, 0.10);
    --primary-glow:     rgba(244, 132, 31, 0.18);

    --primary-fill:     #F4841F;
    --primary-fill-dim: #C2600F;
    --primary-fill-hi:  #FF9A3D;

    /* Secondary palette (night-sky indigo) — full-bleed dark sections */
    --secondary:        #2C1B49;
    --secondary-fill:   #2C1B49;

    /* Accent (radio-signal magenta) — reserved for highlights/badges,
       not wired into structural chrome */
    --accent:           #E8177A;

    /* Gold (sun-glow) — supporting warm tint for subtle backgrounds */
    --gold:             #FFD9A3;
    --gold-wash:        rgba(255, 217, 163, 0.20);

    /* Semantic — light (default) */
    --bg:           #FFFFFF;
    --bg-page:      var(--bg);
    --bg-alt:       #F7F4F1;
    --surface:      #FFFFFF;
    --surface-hi:   #F1ECE7;
    --border:       #E4DDD5;
    --border-hi:    #C9BDB0;

    --text:         #1A1420;
    --text-2:       #5B5163;
    --text-3:       #948A99;
    --text-on-primary: #FFFFFF;

    /* Status */
    --green:  #2D9E5A;
    --red:    #C81E4B;
    --amber:  #E89B0A;
    --blue:   #2F6FD6;

    --green-wash: rgba(45, 158, 90, 0.10);
    --red-wash:   rgba(200, 30, 75, 0.10);
    --amber-wash: rgba(232, 155, 10, 0.10);
    --blue-wash:  rgba(47, 111, 214, 0.10);

    /* Typography scale */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;
    --text-5xl:  3rem;

    /* Spacing scale (4px base) */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --container-sm:  640px;
    --container-md:  768px;
    --container-lg:  1024px;
    --container-xl:  1280px;
    --container-2xl: 1440px;
    /* Landing bands run wider than the app's reading containers. */
    --container-landing: 1180px;

    /* Comfortable line length for marketing body copy. */
    --measure: 62ch;

    --sidebar-width: 220px;
    --sidebar-collapsed-width: 60px;
    --mobile-menubar-height: 56px;
    --mobile-brand-height: 41px;

    /* Effects */
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.14);
    --shadow-primary: 0 0 20px rgba(244, 132, 31, 0.25);

    --transition-fast:   120ms ease;
    --transition-base:   200ms ease;
    --transition-slow:   350ms ease;

    --z-base:    1;
    --z-raised:  10;
    --z-dropdown: 100;
    --z-overlay: 200;
    --z-modal:   300;
    --z-nav:     400;
    --z-toast:   500;
}

/* --------------------------------------------------------------------------
   Dark theme overrides
   -------------------------------------------------------------------------- */

[data-theme="dark"] {
    --bg:          #14101C;
    --bg-page:     linear-gradient(165deg, #14101C 0%, #1E1430 45%, #2A1640 100%);
    --bg-alt:      #1C1526;
    --surface:     #221A2E;
    --surface-hi:  #2B2138;
    --border:      #3A2E48;
    --border-hi:   #4C3D5C;

    --text:        #F1E9E2;
    --text-2:      #B4A6BC;
    --text-3:      #7A6C86;

    /* primary lightens in dark mode so text/borders stay readable */
    --primary:      #FFB366;
    --primary-dim:  #CC8A4D;
    --primary-hi:   #FFCF99;
    --primary-wash: rgba(255, 179, 102, 0.10);
    --primary-glow: rgba(255, 179, 102, 0.18);
    /* --primary-fill tokens intentionally not overridden — stays sunset orange for solid fills */

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-primary: 0 0 20px rgba(244, 132, 31, 0.35);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hi) transparent;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-hi);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
::-webkit-scrollbar-corner { background: transparent; }

[data-theme="dark"] {
    scrollbar-color: var(--border-hi) transparent;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-page);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button, input, select, textarea {
    font: inherit;
    touch-action: manipulation;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hi);
}

ul, ol {
    list-style: none;
}

/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--text);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

@media (max-width: 500px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
}

/* --------------------------------------------------------------------------
   Body text
   -------------------------------------------------------------------------- */

p {
    line-height: 1.7;
    color: var(--text-2);
}

p + p {
    margin-top: var(--space-4);
}

small {
    font-size: var(--text-sm);
    color: var(--text-3);
}

strong {
    font-weight: 700;
    color: var(--text);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-8) 0;
}

/* --------------------------------------------------------------------------
   Utility classes
   -------------------------------------------------------------------------- */

.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;
}

.text-primary { color: var(--primary); }
.text-muted   { color: var(--text-3); }
.text-secondary { color: var(--text-2); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-accent  { color: var(--accent); }

.font-display { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; }
.font-ui      { font-family: var(--font-ui); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
