/* ================================================================
   AAUJMR — Global design system
   Base palette: sky blue · teal · cyan · ink black
   Type: Bricolage Grotesque (display) · Instrument Sans (UI/body)
         · Newsreader (reading text: abstracts, prose)
================================================================ */

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

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
    /* Core palette — taken from the journal cover */
    --ink:           #0f1830;   /* deep navy-black (crest blue, darkened) */
    --ink-2:         #172444;
    --ink-3:         #263760;
    --blue:          #7092bf;   /* cover steel blue */
    --blue-deep:     #34578a;   /* same hue, dark enough for text + buttons (7:1) */
    --lav:           #c7bfe6;   /* cover lavender */
    --lav-soft:      #ece9f7;
    --red:           #d9222b;   /* cover red — accents + calls to action */
    --red-deep:      #b31a22;

    /* Light surfaces */
    --bg:            #f7f6fb;
    --bg-card:       #ffffff;
    --bg-alt:        #efedf8;
    --tint:          rgba(52, 87, 138, 0.09);
    --tint-sky:      rgba(199, 191, 230, 0.35);

    /* Text */
    --text-primary:   #0f1830;
    --text-secondary: #3d4863;
    --text-muted:     #6a7490;

    /* Lines */
    --border:        #d9d8ea;
    --border-light:  #e8e6f3;

    /* Shadows — cool, soft, low */
    --shadow-sm:  0 1px 2px rgba(15, 24, 48, 0.05);
    --shadow:     0 2px 4px rgba(15, 24, 48, 0.04), 0 10px 24px -8px rgba(15, 24, 48, 0.14);
    --shadow-lg:  0 4px 8px rgba(15, 24, 48, 0.05), 0 22px 44px -12px rgba(15, 24, 48, 0.26);

    /* Type */
    --font-heading: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
    --font-body:    'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-serif:   'Newsreader', Georgia, 'Times New Roman', serif;

    /* Spacing */
    --space-xs:  0.4rem;
    --space-sm:  0.875rem;
    --space-md:  1.5rem;
    --space-lg:  2.5rem;
    --space-xl:  4.5rem;

    /* Layout */
    --container:  1180px;
    --radius:     10px;
    --radius-lg:  18px;
    --radius-pill: 999px;
    --transition: 0.2s ease;

    /* ── Legacy aliases ──────────────────────────────────────
       Older stylesheets used these names (originally orange/maroon).
       They now map onto the new palette so nothing is left behind. */
    --maroon:        var(--blue-deep);
    --maroon-dark:   var(--ink);
    --maroon-light:  var(--blue);
    --maroon-faint:  var(--tint);
    --gold:          var(--lav);
    --gold-light:    var(--lav);
    --gold-dark:     var(--blue-deep);
    --gold-faint:    var(--tint-sky);
    --text:          var(--text-primary);
}

/* ─── Base ───────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { flex: 1; }

a {
    color: var(--blue-deep);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--ink); }

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

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

:focus-visible {
    outline: 2px solid var(--blue-deep);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ─── Container ──────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.05rem; letter-spacing: -0.01em; }

p { text-wrap: pretty; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.62rem 1.3rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn i { font-size: 0.85em; }

.btn-primary {
    background: var(--ink);
    color: #fff;
}
.btn-primary:hover {
    background: var(--blue-deep);
    color: #fff;
}

/* Bright button for dark backgrounds */
.btn-gold {
    background: var(--red);
    color: #fff;
}
.btn-gold:hover {
    background: var(--red-deep);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--border);
}
.btn-outline:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.95rem;
    font-size: 0.84rem;
}

.btn-danger {
    background: #b4233f;
    color: #fff;
}
.btn-danger:hover {
    background: #8f1a31;
    color: #fff;
}

/* ─── Page banner (shared across inner pages) ───────────────── */
.page-banner {
    background:
        radial-gradient(640px 240px at 90% -30%, rgba(199, 191, 230, 0.32), transparent 70%),
        radial-gradient(560px 220px at 0% 130%, rgba(112, 146, 191, 0.4), transparent 70%),
        var(--ink);
    color: #fff;
    padding: 3.25rem 0 2.75rem;
    position: relative;
    overflow: hidden;
}

.page-banner::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(112, 146, 191, 0.5), transparent);
}

.page-banner h1,
.page-banner h2,
.page-banner h3 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.page-banner .subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.02rem;
    max-width: 62ch;
}

.page-banner a { color: rgba(255, 255, 255, 0.75); }
.page-banner a:hover { color: #fff; }
.page-banner .btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.page-banner .btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ─── Content page wrapper ───────────────────────────────────── */
.content-page {
    padding: var(--space-lg) 0 var(--space-xl);
}

/* ─── Card ───────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border);
}

/* ─── Badge ──────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.18rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-gold {
    background: var(--tint-sky);
    color: #214f94;
    border: 1px solid rgba(112, 146, 191, 0.45);
}

.badge-maroon {
    background: var(--tint);
    color: var(--blue-deep);
    border: 1px solid rgba(52, 87, 138, 0.25);
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-group label.required::after {
    content: ' *';
    color: var(--blue-deep);
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-deep);
    box-shadow: 0 0 0 4px rgba(112, 146, 191, 0.28);
}

textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control   { cursor: pointer; }

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
    line-height: 1.5;
}
.alert-error   { background: #fef2f3; color: #8f1a31; border: 1px solid #f6cdd3; }
.alert-success { background: #eefaf6; color: #0d5c46; border: 1px solid #bfe9db; }
.alert ul { margin: 0; padding-left: 1.25rem; }

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-lg) 0;
}

.divider-gold {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
    margin: var(--space-md) 0;
}

/* ─── Utilities ──────────────────────────────────────────────── */
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center    { text-align: center; }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.gap-sm { gap: var(--space-sm); }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .container { padding-inline: 1.1rem; }
    .page-banner { padding: 2.25rem 0 2rem; }
    .content-page { padding: var(--space-md) 0 var(--space-lg); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
