/* STAR Network "Institutional Trust" Theme */

:root {
    /* Palette */
    --color-primary: #0B1026;
    /* Deep Space Navy (Background) */
    --color-content: #F8F9FA;
    /* Ghost White (Content Background) */
    --color-accent: #14F195;
    /* Solana Teal (Highlights) */
    --color-text-main: #1C1C1C;
    /* Primary Text (on light) */
    --color-text-inv: #FFFFFF;
    /* Inverse Text (on dark) */
    --color-text-sub: #5F6C7B;
    /* Secondary Text */
    --color-border: #E2E8F0;
    /* Subtle Border */
    --color-border-dark: #1E293B;
    /* Border on dark backgrounds */

    /* Typography */
    --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-body: "Inter", "Source Serif", system-ui, sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --max-text-width: 720px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--color-primary);
    color: var(--color-text-inv);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin: 0 0 1rem 0;
    line-height: 1.2;
    color: var(--color-text-inv);
}

p {
    margin: 0 0 1.5rem 0;
    max-width: var(--max-text-width);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Text Colors helper for components with light backgrounds */
.text-dark {
    color: var(--color-text-main);
}

.text-sub {
    color: var(--color-text-sub);
}

/* Buttons & Interactive */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    /* Slightly squared for institutional feel */
    font-size: 0.95rem;
}

/* "Request Access" outline style */
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Muted buttons for Hero */
.btn-muted {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
}

.btn-muted:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Layout Utilities */
section {
    padding: 6rem 0;
}

/* Card / Content Area - Light Backgrounds per spec "Content background: #F8F9FA" */
.card {
    background: var(--color-content);
    color: var(--color-text-main);
    padding: 2rem;
    border: 1px solid var(--color-border);
}

.card h1,
.card h2,
.card h3 {
    color: var(--color-text-main);
}

/* ============================================
   RESPONSIVE DESIGN - Mobile First
   ============================================ */

/* Mobile-specific optimizations (default/base styles) */
@media (max-width: 768px) {

    /* Reduce container padding on mobile */
    .container {
        padding: 0 1rem;
    }

    /* Reduce section padding on mobile */
    section {
        padding: 3rem 0;
    }

    /* Slightly smaller headings on mobile */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Ensure paragraphs don't get too wide constraints on mobile */
    p {
        max-width: 100%;
    }

    /* Make buttons full-width on very small screens */
    @media (max-width: 480px) {
        .btn {
            width: 100%;
            justify-content: center;
        }
    }

    /* Increase touch target size for mobile */
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
    }

    /* Mobile utility: hide on mobile */
    .mobile-hide {
        display: none !important;
    }

    /* Mobile utility: stack grids */
    .grid-responsive-2,
    .grid-responsive-3,
    .grid-responsive-4 {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Mobile header adjustments */
    header .container {
        padding: 0 1rem;
    }

    /* Mobile footer: stack columns */
    footer .container>div {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    footer .container>div>div:last-child {
        flex-direction: column !important;
        gap: 2rem !important;
    }
}

/* Tablet optimizations (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {

    /* 2-column grid on tablet for 3 and 4 column layouts */
    .grid-responsive-3,
    .grid-responsive-4 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Desktop styles (769px and up) */
@media (min-width: 769px) {

    /* Desktop utility: hide on desktop */
    .desktop-hide {
        display: none !important;
    }

    /* Responsive grid classes for desktop */
    .grid-responsive-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem;
    }

    .grid-responsive-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .grid-responsive-4 {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Large desktop (1200px+) - maintain current design */
@media (min-width: 1200px) {
    /* Existing desktop styles work well here */
}

/* Utility class for responsive flex layouts */
.flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

@media (max-width: 768px) {
    .flex-responsive {
        flex-direction: column;
    }
}

/* Responsive text alignment */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
}