/* ===== CSS VARIABLES ===== */
:root {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-soft: #f4f7ff;

    --text-primary: #0f172a;
    --text-secondary: #475569;

    --brand-primary: #1d4ed8;
    --brand-primary-hover: #1e40af;
    --brand-secondary: #0ea5a4;
    --brand-secondary-hover: #0f766e;
    --accent: #f59e0b;

    --border-subtle: #dbe1ea;
    --border-strong: #c5ceda;

    --focus-yellow: #ffdd00;
    --focus-black: #000000;

    --success: #0a7a2f;
    --danger: #b3261e;
}

/* ===== BASE ===== */
html,
body {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: var(--bg-main);
    color: var(--text-primary);
}

body {
    min-height: 100vh;
}

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

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ===== BUTTON RESET ===== */
button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== NAVIGATION ===== */
.navigation-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 32px;
    width: auto;
    margin-right: 0.45rem;
}

.nav-logo-link {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.45rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
}

.nav-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    background-color: #e7eefb;
    color: #1f2937;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    background-color: #d7e3f8;
    transform: translateY(-1px);
}

.nav-links a[aria-current="page"] {
    background: #e0e7ff;
    color: #0f172a;
    font-weight: bold;
    border: 1px solid rgba(29, 78, 216, 0.25);
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--bg-surface);
    color: var(--text-primary);
}

.nav-toggle-lines {
    width: 18px;
    height: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-toggle-lines span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.nav-toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Mobile nav with hamburger */
@media (max-width: 768px) {
    .navigation-menu {
        align-items: flex-start;
    }

    .nav-brand {
        flex: 1 1 auto;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .navigation-menu.nav-collapsible .nav-links,
    .navigation-menu.nav-collapsible .nav-actions {
        display: none;
        width: 100%;
    }

    .navigation-menu.nav-collapsible.nav-open .nav-links,
    .navigation-menu.nav-collapsible.nav-open .nav-actions {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .nav-links a {
        display: block;
    }

    .nav-actions {
        flex-wrap: wrap;
        gap: 0.6rem;
        margin-top: 0.3rem;
    }
}

/* ===== BUTTONS ===== */
.primary-button,
.sign-up {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: var(--brand-primary);
    color: #ffffff;
    border: 2px solid var(--brand-primary);
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.sign-up:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
}

.secondary-button {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: #ffffff;
    color: #222222;
    border: 2px solid #444444;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.secondary-button:hover {
    background-color: #f3f3f3;
    border-color: var(--brand-secondary);
    transform: translateY(-1px);
}

.accessibility-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* ===== HERO ===== */
.hero {
    min-height: 60vh;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-text h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 0.5rem;
}

.hero-text p {
    color: var(--text-secondary);
}

.hero-text,
.hero-image-wrapper {
    flex: 1 1 260px;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

/* Hero responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: left;
    }

    .hero-image-wrapper {
        order: -1;
    }
}

/* ===== PRODUCTS / STOCKS / REPORTS ===== */
.products,
.stocks,
.reports {
    padding: 2.5rem 1rem;
}

.products {
    background: var(--bg-soft);
}

.products-header,
.section-header {
    max-width: 640px;
    margin: 0 auto 2rem;
    text-align: center;
}

#product-principles-heading {
    text-align: center;
}

.products-header p,
.section-header p {
    color: var(--text-secondary);
}

/* Responsive grids */
.products-grid,
.stocks-grid,
.reports-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== CARDS ===== */
.card,
.stock-card,
.report-card {
    background: var(--bg-surface);
    padding: 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    min-width: 220px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card h3,
.stock-card h3,
.report-card h3 {
    margin-top: 0.25rem;
    margin-bottom: 0.4rem;
}

.card:hover,
.stock-card:hover,
.report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    border-color: rgba(29, 78, 216, 0.25);
}

/* Stocks */
.stock-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.stock-up {
    color: var(--success);
}

.stock-down {
    color: var(--danger);
}

.stock-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stocks-disclaimer {
    max-width: 960px;
    margin: 1rem auto 0;
    font-size: 0.8rem;
    color: #777777;
}

/* Reports */
.report-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.report-link {
    font-size: 0.9rem;
    color: var(--brand-primary);
    text-decoration: underline;
}

.report-link:hover,
.report-link:focus {
    color: var(--brand-primary-hover);
}

/*===== SERVICES =====*/

#service-process-heading {
    text-align: center;
}

/* ===== FOOTER ===== */
.site-footer {
    margin-top: 2rem;
    padding: 2rem 1rem 1rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.footer-shell {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.25rem;
}

.footer-brand h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.footer-brand p,
.footer-contact p {
    margin: 0 0 0.45rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.email-link {
    display: inline-block;
    text-decoration: none;
    color: var(--text-secondary);
}

.email-link:hover {
    cursor: pointer;
}


.footer-nav h3,
.footer-contact h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.footer-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.footer-nav a,
.footer-bottom a {
    color: var(--brand-primary);
    text-decoration: none;
}

.footer-nav a:hover,
.footer-bottom a:hover,
.footer-nav a:focus-visible,
.footer-bottom a:focus-visible {
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1100px;
    margin: 1rem auto 0;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.disclaimer {
    text-align: center;
    color: rgb(68, 0, 0);
    background-color: rgba(255, 0, 0, 0.201);
    font-weight: 600;
}

/* ===== SIGNUP ===== */
.signup-section {
    padding: 2.5rem 1rem 3rem;
}

.signup-shell {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.signup-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.signup-card h2 {
    margin-top: 0;
}

.signup-form {
    display: grid;
    gap: 1rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    font: inherit;
    background: #ffffff;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
    outline: 3px solid var(--focus-yellow);
    box-shadow: 0 0 0 3px var(--focus-black);
    outline-offset: 2px;
}

.form-helper {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-status {
    margin: 0 0 0.75rem;
    min-height: 1.3rem;
    font-size: 0.9rem;
    color: var(--danger);
}

.form-status.success {
    color: var(--success);
}

.form-error {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--danger);
}

.signup-form input[aria-invalid="true"] {
    border-color: var(--danger);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.accent-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #000000;
    color: #ffffff;
    border-radius: 6px;
    transform: translateY(-200%);
    transition: transform 0.2s;
    z-index: 1000;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

/* ===== ACCESSIBILITY MENU ===== */
.accessibility-menu {
    position: fixed;
    right: 1rem;
    bottom: 8rem;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    display: none;
    z-index: 900;
}

.accessibility-menu[aria-hidden="false"] {
    display: block;
}

.accessibility-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.accessibility-buttons button {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    background: #f7f7f7;
}

/* ===== STRONG FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--focus-yellow);
    box-shadow: 0 0 0 3px var(--focus-black);
    outline-offset: 2px;
}

/* ===== ACCESSIBILITY MODES ===== */

body.high-contrast {
    background: #000000;
    color: #ffff00;
}

body.high-contrast * {
    background: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

body.grayscale {
    filter: grayscale(1);
}

body.text-only img,
body.text-only video {
    display: none !important;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* ===== MOBILE CONTROLS (Accessibility + Back to Top) ===== */
.mobile-controls {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 950;
}

.mobile-accessibility-btn,
.back-to-top-btn {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 2px solid #444;
    background: #ffffff;
    color: #111;
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #ffffff;
}

/* On small screens: show mobile controls */
@media (max-width: 640px) {
    .mobile-controls {
        display: flex;
    }
}

/* ===== INCREMENTAL TEXT SIZE LEVELS ===== */
body.large-text-1 {
    font-size: 20px;
}

body.large-text-2 {
    font-size: 24px;
}

body.large-text-3 {
    font-size: 28px;
}

body.small-text {
    font-size: 14px;
}

body.large-text-2,
body.large-text-3 {
    line-height: 1.75;
}

/* Target a broad set of interactive and block elements */
body.hover-highlight-enabled *:hover,
body.hover-highlight-enabled *:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
    border-radius: 6px;
    background-color: #fff4cc;
    color: #111111;
    text-shadow: 0 0 1px #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   ABOUT PAGE STYLES
   ========================================================= */

/* ===== ABOUT HERO ===== */
.about-hero {
    padding: 3rem 1rem 2.5rem;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: center;
}

.about-grid.reverse .about-image {
    order: -1;
}

.about-text p {
    color: var(--text-secondary);
    margin: 0.4rem 0;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.about-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
}

.about-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== COMMON ABOUT SECTIONS ===== */
.mission,
.story,
.stats,
.recognition {
    padding: 2.25rem 1rem;
}

.mission,
.story,
.recognition {
    max-width: 960px;
    margin: 0 auto;
}

.mission h2,
.story h2,
.stats h2,
.recognition h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.mission p,
.story p,
.recognition p {
    color: var(--text-secondary);
    max-width: 760px;
}

/* ===== STORY MULTI-PARAGRAPH SPACING ===== */
.story p+p {
    margin-top: 0.75rem;
}

/* ===== STATS SECTION ===== */


.stats {
    background: var(--bg-soft);
}

#stats-heading {
    text-align: center;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 960px;
}

.stats-list li {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.1rem;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.stats-list strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: var(--brand-primary);
}

/* ===== RECOGNITION SECTION ===== */
.recognition {
    text-align: left;
}

.recognition .primary-button {
    margin-top: 1rem;
}

/* ===== ACCESSIBILITY TOOLS ===== */

/* Improve readability in large text modes */
body.large-text-1 .about-hero p,
body.large-text-1 .mission p,
body.large-text-1 .story p,
body.large-text-1 .recognition p,
body.large-text-2 .about-hero p,
body.large-text-2 .mission p,
body.large-text-2 .story p,
body.large-text-2 .recognition p,
body.large-text-3 .about-hero p,
body.large-text-3 .mission p,
body.large-text-3 .story p,
body.large-text-3 .recognition p {
    max-width: 900px;
}

/* High contrast safety */
body.high-contrast .stats-list li {
    background: #000000 !important;
}

/* Reduce motion compliance */
@media (prefers-reduced-motion: reduce) {
    .stats-list li {
        transition: none !important;
    }
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    .about-hero {
        text-align: left;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-grid.reverse .about-image {
        order: initial;
    }

    .stats-list {
        grid-template-columns: 1fr;
    }

    .footer-shell {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ===== AUTH TABS ===== */
[role="tab"] {
    min-width: 120px;
}

[role="tab"][aria-selected="true"] {
    outline: 3px solid var(--focus-yellow);
    box-shadow: 0 0 0 3px var(--focus-black);
}

.input-wrapper {
  position: relative;
}

.validation-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: bold;
  pointer-events: none;
}

.validation-icon.valid {
  color: #16a34a;
}

.validation-icon.invalid {
  color: #dc2626;
}

.form-field input.valid {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.form-field input.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}