/* ==========================================================================
   RushCRM shared base: fonts, colour tokens, buttons, panels and forms.
   Used by the website (site.css) and the CRM app (app.css).
   ========================================================================== */
   ========================================================================== */

/* Fonts are hosted locally (faster, no third-party requests). SIL Open Font License. */
@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-display: swap; src: url("../fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("../fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }

/* Outfit (SIL Open Font License, see fonts/OUTFIT-LICENSE.txt), hosted locally */
@font-face { font-family: "Outfit"; font-weight: 300; font-display: swap; src: url("../fonts/outfit-latin-300-normal.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Outfit"; font-weight: 300; font-display: swap; src: url("../fonts/outfit-latin-ext-300-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-weight: 400; font-display: swap; src: url("../fonts/outfit-latin-400-normal.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Outfit"; font-weight: 400; font-display: swap; src: url("../fonts/outfit-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url("../fonts/outfit-latin-500-normal.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url("../fonts/outfit-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url("../fonts/outfit-latin-600-normal.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url("../fonts/outfit-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-weight: 700; font-display: swap; src: url("../fonts/outfit-latin-700-normal.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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Outfit"; font-weight: 700; font-display: swap; src: url("../fonts/outfit-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
    color-scheme: dark;

    --rush: #ff3346;          /* brand red */
    --rush-light: #ff6372;
    --rush-deep: #d4142a;
    --rush-text: #ff5a69;     /* red for small text on dark */
    --rush-tint: rgba(255, 51, 70, .16);
    --rush-glow: rgba(255, 51, 70, .45);

    --ink: #1d1820;           /* dark text on red surfaces */
    --bg: #110d13;            /* page */
    --bg-2: #17121a;          /* alternate sections */
    --surface: #1f1a23;
    --surface-2: #29222e;
    --surface-3: #352d3a;
    --text: #f5f2f7;
    --muted: #b4adba;
    --line: rgba(255, 255, 255, .09);
    --edge: rgba(255, 255, 255, .14);   /* top highlight on raised surfaces */

    --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
    --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Layered shadows: tight contact shadow plus a soft, far one */
    --lift-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 14px -4px rgba(0, 0, 0, .5);
    --lift-2: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 30px -8px rgba(0, 0, 0, .6), 0 34px 60px -20px rgba(0, 0, 0, .6);
    --lift-3: 0 4px 10px rgba(0, 0, 0, .4), 0 28px 50px -12px rgba(0, 0, 0, .7), 0 70px 100px -30px rgba(0, 0, 0, .7);

    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 32px);
    --section: clamp(64px, 9vw, 120px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

[hidden] { display: none !important; }

a { color: var(--rush-text); text-underline-offset: 3px; }

h1, h2, h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: 0.005em;
    text-wrap: balance;
}

h2 { font-size: clamp(2.5rem, 5vw, 3.75rem); text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
h3 { font-size: 1.625rem; font-weight: 700; line-height: 1.05; }

p { margin: 0; }

::selection { background: var(--rush); color: var(--ink); }

:focus-visible { outline: 3px solid var(--rush); outline-offset: 3px; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

.skip-link {
    position: absolute;
    left: 16px; top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--rush);
    color: var(--ink);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons: raised, with a pressed state ---------- */
.btn {
    --notch: 10px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 28px 3px;
    border: 0;
    font: 600 1.0625rem/1 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
    transition: transform .15s ease, filter .15s ease, background-color .15s ease, color .15s ease;
}
/* clip-path hides outer outlines, so focus is drawn inside the button */
.btn:focus-visible { outline: 3px solid currentColor; outline-offset: -8px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

/* Dark text on red keeps the brand colour and stays readable */
.btn--primary {
    background: linear-gradient(180deg, var(--rush-light) 0%, var(--rush) 55%, #f22a3d 100%);
    color: var(--ink);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .45),
        inset 0 -4px 0 rgba(120, 0, 15, .32);
}
.btn--primary:hover { filter: brightness(1.06) saturate(1.05); }
.btn--primary:active { box-shadow: inset 0 2px 4px rgba(120, 0, 15, .4); }

.btn--dark {
    background: linear-gradient(180deg, #3d3443 0%, var(--ink) 100%);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .2),
        inset 0 -4px 0 rgba(0, 0, 0, .5);
}
.btn--dark:active { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .55); }

.btn--ghost {
    clip-path: none;
    padding-bottom: 0;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), var(--lift-1);
    backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: #fff; color: var(--ink); }

.btn--small { min-height: 44px; padding: 0 18px 3px; font-size: 0.975rem; }


/* ---------- Panels ---------- */
.panel {
    --notch: 20px;
    position: relative;
    padding: clamp(24px, 3.5vw, 40px);
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    box-shadow: inset 0 1px 0 var(--edge), var(--lift-3);
}
.panel--quiet { box-shadow: inset 0 1px 0 var(--edge), var(--lift-2); }

/* ---------- Forms ---------- */
.form-alert {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--rush-tint);
    border-left: 4px solid var(--rush);
    color: #ffd0d5;
    font-weight: 500;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}
.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }

.field label { font-weight: 600; font-size: 0.975rem; }
.field__opt { margin-left: 4px; color: var(--muted); font-weight: 400; font-size: 0.875rem; }

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 0;
    background: #141016;
    color: var(--text);
    font: 400 1rem/1.4 var(--font-body);
    /* Recessed into the panel */
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
            appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #7d7584; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--rush);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), 0 0 0 3px rgba(255, 51, 70, .3);
}

.field [aria-invalid="true"] { border-color: var(--rush); }
.field__error { color: #ff8a95; font-size: 0.875rem; }

.select { position: relative; }
.select::after {
    content: "";
    position: absolute;
    top: 50%; right: 16px;
    width: 8px; height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.select select { padding-right: 40px; cursor: pointer; }
.select option { background: var(--surface); color: var(--text); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 28px;
}
.form-note { color: var(--muted); font-size: 0.9rem; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }

@media (max-width: 640px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
