/* ChatIOM.com Styles
   Manx pride theme with red/gold accents
   Data sovereignty and privacy focus
   Professional but community-oriented
*/

/* ===== CSS Variables ===== */
:root {
    /* Manx Colors */
    --manx-red: #C41E3A;             /* Manx flag red */
    --manx-red-dark: #a01830;        /* Darker red for hover */
    --manx-red-light: #fdf2f4;       /* Light red for backgrounds */

    --manx-gold: #F4C430;            /* Gold accent */
    --manx-gold-dark: #d4a82a;       /* Darker gold */
    --manx-gold-light: #fffbeb;      /* Light gold for backgrounds */

    /* Primary - using Manx Red */
    --primary-color: var(--manx-red);
    --primary-dark: var(--manx-red-dark);
    --primary-light: var(--manx-red-light);

    /* Accent - using Gold */
    --accent-color: var(--manx-gold);
    --accent-dark: var(--manx-gold-dark);

    /* CTA Colors */
    --cta-color: var(--manx-red);
    --cta-hover: var(--manx-red-dark);

    /* Text Colors */
    --text-primary: #1a1a2e;         /* Deep dark blue-black */
    --text-secondary: #4a4a5a;       /* Medium gray */
    --text-light: #7a7a8a;           /* Light gray */
    --text-inverse: #ffffff;         /* White text on dark backgrounds */

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;              /* Dark section background */
    --bg-accent: var(--manx-red-light);

    /* UI Colors */
    --border-color: #e5e5e5;
    --shadow-color: rgba(26, 26, 46, 0.08);
    --shadow-hover: rgba(26, 26, 46, 0.15);

    /* Sovereign AI brand color */
    --sovereign-color: #2563eb;      /* Blue for SovereignAI references */

    /* Typography */
    --font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 5rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50px;

    /* Container */
    --container-max: 1140px;
    --container-padding: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--primary-dark);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: 2.75rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.375rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--space-sm);
}

/* ===== Container ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--cta-color);
    color: var(--text-inverse);
    border-color: var(--cta-color);
}

.btn-primary:hover {
    background: var(--cta-hover);
    border-color: var(--cta-hover);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--text-inverse);
    border-color: var(--text-primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-nav {
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
}

/* ===== Header & Navigation ===== */
.header {
    background: var(--bg-white);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.75rem;
}

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

.logo-img {
    height: 36px;
    width: auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-right: auto;
    margin-left: 0.75rem;
}

.lema-link {
    color: var(--text-primary);
    font-weight: 600;
}

.lema-link:hover {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    list-style: none;
}

.nav-menu a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Nav CTA button - must come after .nav-menu a to override */
.nav-menu a.btn.btn-primary {
    background: var(--cta-color) !important;
    color: var(--text-inverse) !important;
    border-color: var(--cta-color) !important;
    padding: 0.75rem 1.75rem;
}

.nav-menu a.btn.btn-primary:hover {
    background: var(--cta-hover) !important;
    border-color: var(--cta-hover) !important;
    color: var(--text-inverse) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--primary-light) 100%);
    padding: var(--space-xxl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: var(--space-md);
}

.hero-badge a {
    color: var(--sovereign-color);
    font-weight: 700;
}

.badge-icon {
    font-size: 1.125rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    margin-bottom: var(--space-md);
}

.hero h1 .highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.hero-trust {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.trust-icon {
    font-size: 1.25rem;
}

/* ===== Sections ===== */
.section {
    padding: var(--space-xxl) 0;
}

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

.section-dark {
    background: var(--bg-dark);
    color: var(--text-inverse);
}

.section-dark h2,
.section-dark h3,
.section-dark p {
    color: var(--text-inverse);
}

.section-accent {
    background: var(--primary-light);
}

.section-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    text-align: center;
}

.section-cta h2,
.section-cta p {
    color: var(--text-inverse);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-xl);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.section-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: var(--space-sm);
}

/* ===== Feature Cards ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
}

.feature-card {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 15px var(--shadow-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.feature-card h3 {
    margin-bottom: var(--space-xs);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.feature-card a {
    color: var(--sovereign-color);
    font-weight: 600;
}

/* ===== Split Content ===== */
.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.split-content.reverse {
    direction: rtl;
}

.split-content.reverse > * {
    direction: ltr;
}

.split-text h2 {
    margin-bottom: var(--space-sm);
}

.split-text p {
    margin-bottom: var(--space-md);
}

.problem-list,
.solution-list {
    list-style: none;
}

.problem-list li,
.solution-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.list-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.visual-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
}

.section-accent .visual-card {
    background: var(--bg-white);
}

.visual-card.solution {
    border: 3px solid var(--accent-color);
}

.visual-icon {
    font-size: 5rem;
    margin-bottom: var(--space-sm);
}

.visual-text {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* ===== Use Cases Grid ===== */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.use-case {
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-align: center;
}

.use-case-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-xs);
}

.use-case h3 {
    margin-bottom: var(--space-xs);
}

.use-case p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9375rem;
}

/* ===== Steps Grid ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.step {
    padding: var(--space-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-inverse);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: var(--space-sm);
}

.step h3 {
    margin-bottom: var(--space-xs);
}

.step p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ===== Powered By ===== */
.powered-by {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.powered-by > p:first-child {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: var(--space-xs);
}

.powered-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sovereign-color);
}

.powered-logo:hover {
    color: var(--sovereign-color);
}

.powered-icon {
    font-size: 1.75rem;
}

.powered-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
    margin-bottom: 0;
}

/* ===== CTA Section ===== */
.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-flag {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.cta-content h2 {
    margin-bottom: var(--space-sm);
}

.cta-content > p {
    margin-bottom: var(--space-md);
    opacity: 0.9;
}

.cta-note {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: var(--space-md);
    margin-bottom: 0;
}

/* ===== FAQ Section ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: none;
    border: none;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 var(--space-md) var(--space-md);
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: var(--text-inverse);
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand .logo {
    color: var(--text-inverse);
    margin-bottom: var(--space-sm);
}

.footer-brand .logo-img {
    height: 32px;
    width: auto;
}

.footer-brand .logo-accent {
    color: var(--primary-color);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    margin-bottom: var(--space-sm);
}

.footer-powered {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-powered a {
    color: var(--accent-color);
    font-weight: 600;
}

.footer-powered a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-links h4 {
    color: var(--text-inverse);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--text-inverse);
}

.footer-bottom {
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--space-xs);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a:hover {
    color: var(--text-inverse);
}

.footer-location {
    font-size: 0.8125rem;
}

/* ===== Mobile Styles ===== */
@media (max-width: 900px) {
    .split-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .split-content.reverse {
        direction: ltr;
    }

    .split-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    .section {
        padding: var(--space-xl) 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-brand {
        display: none;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: var(--space-md);
        box-shadow: 0 10px 30px var(--shadow-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: var(--space-sm);
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-trust {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.875rem;
    }

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

    .use-case {
        flex-direction: column;
        text-align: center;
    }
}
