/* ===========================
   Lydex Solutions — Stylesheet
   =========================== */

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

:root {
    --navy: #1E3A5F;
    --navy-dark: #152d4a;
    --navy-light: #2a4d7a;
    --gold: #C9A84C;
    --gold-soft: rgba(201, 168, 76, 0.10);
    --gold-hover: #b8963f;
    --bg: #FAFAF8;
    --bg-alt: #F4F3F0;
    --text: #1A1A1A;
    --text-light: #3d3d3d;
    --muted: #6B6B6B;
    --border: #E2E0DB;
    --border-light: #EDECEA;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

a {
    color: var(--navy);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

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

a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 2px;
}

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--navy);
    font-weight: 700;
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p + p { margin-top: 1rem; }

ul, ol { padding-left: 1.5rem; }
li + li { margin-top: 0.4rem; }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section--alt {
    background: var(--bg-alt);
}

/* --- Header & Nav --- */
.site-header {
    background: var(--navy);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.site-logo:hover {
    color: var(--gold);
}

.site-logo .logo-accent {
    color: var(--gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
}

.nav-links a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
    border-radius: 1px;
}

/* Mobile nav */
@media (max-width: 720px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--navy-dark);
        padding: 0.75rem 1rem 1rem;
        gap: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.75rem 0.85rem;
        border-radius: var(--radius-sm);
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* --- Hero / Page Header --- */
.page-hero {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: var(--white);
    padding: 3.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero h1 {
    color: var(--white);
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.page-hero .subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}

/* Homepage hero — with logo on light background */
.home-hero {
    background: var(--white);
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid var(--border-light);
}

.home-hero::before {
    display: none;
}

.home-hero .hero-logo {
    height: auto;
    width: 340px;
    max-width: 75%;
    margin: 0 auto 1.75rem;
    display: block;
}

.home-hero .subtitle {
    font-size: 1.1rem;
    max-width: 520px;
    color: var(--muted);
}

.hero-divider {
    width: 48px;
    height: 3px;
    background: var(--gold);
    border: none;
    border-radius: 2px;
    margin: 1.5rem auto 0;
}

/* --- App Cards (Homepage) --- */
.app-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .app-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.app-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    position: relative;
}

.app-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card:first-child::before {
    background: var(--gold);
}

.app-card:last-child::before {
    background: var(--navy);
}

.app-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
}

.app-card .app-tagline {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.app-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.65;
}

.app-card .badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge--coming-soon {
    background: var(--gold-soft);
    color: var(--gold-hover);
}

.badge--in-dev {
    background: rgba(30, 58, 95, 0.07);
    color: var(--navy-light);
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--muted);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
}

.section-header .accent-bar {
    width: 40px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

/* --- Buttons / Links --- */
.btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn--primary {
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.2);
}

.btn--primary:hover {
    background: var(--navy-light);
    color: var(--white);
    box-shadow: 0 4px 8px rgba(30, 58, 95, 0.25);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--border);
}

.btn--outline:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--white);
}

.link-arrow {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--navy);
    transition: color 0.2s, gap 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.link-arrow::after {
    content: '\2192';
    transition: transform 0.2s;
}

.link-arrow:hover {
    color: var(--gold);
}

.link-arrow:hover::after {
    transform: translateX(3px);
}

/* --- Feature List --- */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 860px) {
    .feature-grid--three {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.feature-item {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.feature-item h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--navy);
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

/* --- Info Box --- */
.info-box {
    background: var(--white);
    border-left: 3px solid var(--gold);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.info-box p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Policy / Legal --- */
.policy-content h2 {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    font-size: 1.25rem;
}

.policy-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.policy-content h3 {
    margin-top: 1.75rem;
    font-size: 1.05rem;
    color: var(--navy);
}

.policy-content p,
.policy-content ul {
    margin-top: 0.75rem;
    color: var(--text-light);
}

.policy-content strong {
    color: var(--text);
}

/* --- Footer --- */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.65);
    padding: 2.5rem 0;
    font-size: 0.85rem;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin: 0 !important;
    padding: 0;
}

.footer-links li + li::before {
    content: '\00B7';
    color: rgba(255, 255, 255, 0.25);
    margin-right: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* --- Print --- */
@media print {
    .site-header, .site-footer, .nav-toggle { display: none; }
    body { background: white; color: black; }
    a { color: black; text-decoration: underline; }
    .page-hero { background: white; color: black; padding: 1rem 0; }
    .page-hero h1, .page-hero .subtitle { color: black; }
}
