/* Copyright (c) 2024-2026, MasterWorking Technology, All Rights Reserved
 www.masterworking.tech     partnerships@mathscitech.org
 */
 
/* ============================================================
   MasterWorking Technology — shared site stylesheet
   Link from every page:  <link rel="stylesheet" href="/mwstyle.css">
   Rules: (1) colours only via tokens — new colours become tokens first;
          (2) reuse component classes — recurring patterns get promoted here;
          (3) motion only via the fade-* utilities, always reduced-motion-guarded.
   ============================================================ */

/* ---- 1. Design tokens ------------------------------------- */
:root {
    /* Core palette */
    --bg-deep: #0e141c;
    --bg-panel: #16232f;
    --brand-dark: #1a2a3a;            /* reserved */
    --text-light: #e9eef4;
    --text-muted: #9fb0bf;
    --gold: #d9b45b;
    --gold-soft: #f0d68a;
    --teal-glow: rgba(43, 179, 192, 0.35);

    /* Glass surfaces */
    --glass-bg: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.16);

    /* Secondary text tones (promoted from literals) */
    --text-soft: #c3ced9;             /* descriptions, body copy */
    --text-dim: #b9c6d2;              /* tagline base tone */
    --text-faint: #8fa2b1;            /* small print */
    --footer-text: #7d8b98;           /* global footer */

    /* Surfaces & lines (promoted from literals) */
    --footer-bg: #0b1017;
    --on-gold: #10202e;               /* text on gold buttons */
    --hairline: rgba(255, 255, 255, 0.14);
    --line-soft: rgba(255, 255, 255, 0.08);
}

/* ---- 2. Reset & base --------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body, html {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-deep);
    color: var(--text-light);
}

a:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---- 3. Page scaffold -------------------------------------- */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    display: flex;
    flex: 1;
    flex-direction: column;
}

/* ---- 4. Panel & atmosphere --------------------------------- */
.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 40px 24px;
    position: relative;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    background:
        radial-gradient(900px 480px at 50% -10%, rgba(43, 179, 192, 0.16), transparent 65%),
        radial-gradient(720px 520px at 88% 88%, rgba(217, 180, 91, 0.18), transparent 62%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-panel) 100%);
}

/* Drifting dot grid (ambient micro-motion) */
.dots {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 1;
    pointer-events: none;
}

/* Golden feather watermark (backlit, anchored to the gold glow) */
.feather-mark {
    position: absolute;
    right: -3%;
    bottom: 7%;
    width: min(560px, 55vw);
    opacity: 0.24;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 0 46px rgba(217, 180, 91, 0.28));
}

/* ---- 5. Header & branding ---------------------------------- */
.panel-header {
    text-align: center;
    width: 100%;
    z-index: 10;
    position: relative;
    margin-bottom: 12px;
}

.brand-title { font-size: 1.5rem; text-transform: uppercase; letter-spacing: 3px; font-weight: 300; margin-bottom: 5px; color: #fff; }
.brand-title span { font-weight: 800; }

.sub-line { font-size: 0.9rem; letter-spacing: 1px; opacity: 0.7; margin-bottom: 6px; }

/* Shimmering tagline */
.tagline-bold {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(100deg,
        var(--text-dim) 0%, var(--text-dim) 40%,
        var(--gold-soft) 50%,
        var(--text-dim) 60%, var(--text-dim) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--text-dim);
    -webkit-text-fill-color: transparent;
}

.contact-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-bottom: 1px solid var(--gold);
    opacity: 1;
}

/* ---- 6. Content card & typography -------------------------- */
.content-card {
    width: 100%;
    max-width: 560px;
    padding: 10px 40px;
    border-radius: 16px;
    text-align: center;
    z-index: 10;
    margin: 10px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 8px;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: #fff;
    margin-bottom: 6px;
    text-wrap: balance;
}

.description { font-size: 1rem; line-height: 1.6; margin-bottom: 12px; color: var(--text-soft); }
.description strong { color: #fff; }

/* ---- 7. Components ------------------------------------------ */
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; justify-content: center; }
.pill-list span {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfe0ea;
}

.btn {
    display: inline-block;
    padding: 11px 26px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-bottom: 14px;
}

.btn-portal {
    background: var(--gold);
    color: var(--on-gold);
    box-shadow: 0 0 26px var(--teal-glow);
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 0 36px var(--teal-glow); }

hr {
    border: none;
    border-top: 1px solid var(--hairline);
    margin: 4px 0 10px 0;
}

/* ---- 8. Footers --------------------------------------------- */
.panel-footer {
    text-align: center;
    width: 100%;
    font-size: 0.9rem;
    z-index: 10;
    position: relative;
    margin-top: 10px;
    color: var(--text-muted);
}
.panel-footer strong { color: var(--text-light); }
.panel-footer a { color: var(--text-light); }

.global-footer {
    padding: 10px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--footer-text);
    border-top: 1px solid var(--line-soft);
    background: var(--footer-bg);
}

/* ---- 9. Motion (all disabled under reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .fade-down { animation: fadeDown 0.7s ease both; }
    .fade-in   { animation: fadeIn 0.8s ease 0.15s both; }
    .fade-up   { animation: fadeUp 0.7s ease 0.3s both; }
    @keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
    @keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
    @keyframes fadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

    .dots { animation: drift 9s linear infinite; }
    @keyframes drift { to { background-position: 30px 30px; } }

    .feather-mark { animation: floatY 7s ease-in-out infinite; }
    @keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

    .tagline-bold { animation: shimmer 6s ease-in-out infinite; }
    @keyframes shimmer { 0% { background-position: 200% center; } 100% { background-position: -200% center; } }
}

/* ---- 10. Responsive ----------------------------------------- */
@media (max-width: 768px) {
    .panel { padding: 40px 20px; }
    .content-card { margin: 40px 0; padding: 24px 22px; }
    .feather-mark { opacity: 0.16; width: 70vw; right: -15%; }
}
