/* =========================================
   Global Variables & Reset
   ========================================= */
:root {
    /* Colors: Warm Gradient + Soft Diffused Light + Tech Texture */
    --color-bg: #0b141a;
    --color-surface: #1c252d;
    --color-surface-hover: #2c3640;
    --color-primary: #25d366;
    --color-primary-dark: #128c7e;
    --color-accent: #f7df1e; /* Warm Gold/Yellow for highlights */
    --color-text: #e4e6eb;
    --color-text-muted: #b0b3b8;
    --color-border: rgba(255, 255, 255, 0.1);
    
    /* Gradients */
    --gradient-hero: radial-gradient(circle at 70% 20%, rgba(37, 211, 102, 0.15) 0%, transparent 50%),
                     radial-gradient(circle at 20% 80%, rgba(247, 223, 30, 0.08) 0%, transparent 40%);
    --gradient-btn: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    
    /* Typography */
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --fs-display: clamp(2.5rem, 5vw, 4.5rem);
    --fs-h1: clamp(1.8rem, 3vw, 2.8rem);
    --fs-h2: clamp(1.5rem, 2.5vw, 2rem);
    --fs-body: 1.05rem;
    
    /* Spacing */
    --spacing-section: 6rem;
    --container-width: 1200px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

img, svg {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

ul, ol {
    list-style: none;
}

/* =========================================
   Layout & Utility
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

.section-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}
/* Subtle underline accent */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin-top: 0.5rem;
    border-radius: 2px;
}
.text-center .section-title {
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-btn);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

/* =========================================
   Header & Navigation
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 20, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    height: 32px;
    width: auto;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

nav a:hover, nav a[aria-current="page"] {
    color: var(--color-primary);
}

/* Mobile Nav Handling (Simple) */
@media (max-width: 768px) {
    nav ul { gap: 1rem; }
    nav a { font-size: 0.85rem; }
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: var(--fs-display);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #b0b3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero SVG Container */
.hero-svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
}

/* =========================================
   Feature Blocks
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Interface / Visual Sections
   ========================================= */
.visual-section {
    padding: var(--spacing-section) 0;
}

.visual-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4rem;
}

.visual-text {
    flex: 1;
    min-width: 300px;
}

.visual-text h2 {
    font-size: var(--fs-h1);
    margin-bottom: 1.5rem;
    color: #fff;
}

.visual-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.visual-graphic {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

/* Interface Mockup Styling */
.mockup-window {
    width: 100%;
    max-width: 800px;
    background: #202c33;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}
.mockup-header {
    background: #2a3942;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    margin-right: 0.5rem;
}
.mockup-area {
    padding: 2rem;
    display: flex;
    gap: 1rem;
    height: 300px;
}
.sidebar-mockup { width: 25%; background: #111b21; height: 100%; animation: pulse-bg 4s infinite alternate; }
.chat-mockup { width: 75%; background: #0b141a; height: 100%; position: relative; }

/* =========================================
   Scenarios & Steps
   ========================================= */
.scenario-list {
    counter-reset: scenario;
}
.scenario-item {
    position: relative;
    padding-left: 4rem;
    margin-bottom: 2rem;
}
.scenario-item::before {
    counter-increment: scenario;
    content: counter(scenario);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-primary);
}

.quick-start-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.step-box {
    text-align: center;
}
.step-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
}

/* =========================================
   Tables
   ========================================= */
.table-responsive {
    overflow-x: auto;
    margin-top: 2rem;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
th {
    background: var(--color-surface);
    color: #fff;
    font-weight: 600;
}
tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* =========================================
   Download Section
   ========================================= */
.download-section {
    background: linear-gradient(180deg, var(--color-bg) 0%, #128c7e33 100%);
    padding: var(--spacing-section) 0;
    text-align: center;
}
.download-box {
    background: var(--color-surface);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--color-primary);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(37, 211, 102, 0.1);
}

/* =========================================
   News & Footer
   ========================================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.news-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}
.news-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.news-date {
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}
.news-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.link-btn {
    align-self: flex-start;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.related-links {
    columns: 2;
    column-gap: 4rem;
    margin-top: 2rem;
    color: var(--color-text-muted);
}
.related-links a {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid transparent;
}
.related-links a:hover {
    color: #fff;
    border-bottom-color: var(--color-primary);
}

footer {
    background: #080c10;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.footer-col ul li {
    margin-bottom: 0.8rem;
}
.footer-col a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.footer-col a:hover {
    color: var(--color-primary);
}
.copyright {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* =========================================
   FAQ
   ========================================= */
.faq-list {
    max-width: 800px;
    margin: 2rem auto;
}
details {
    background: var(--color-surface);
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: background 0.3s ease;
}
details[open] {
    background: #232e38;
}
summary {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
summary::-webkit-details-marker {
    display: none;
}
summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s;
}
details[open] summary::after {
    transform: rotate(45deg);
}
.details-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* =========================================
   Animations
   ========================================= */
/* Star Twinkling */
.star {
    animation: twinkle 3s infinite ease-in-out;
}
.star:nth-child(odd) { animation-delay: 1s; }
.star:nth-child(3n) { animation-delay: 2s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Line Drawing */
.connect-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: drawLine 6s infinite ease-in-out;
}

@keyframes drawLine {
    0% { stroke-dashoffset: 1; stroke-opacity: 0.2; }
    50% { stroke-dashoffset: 0; stroke-opacity: 0.8; }
    100% { stroke-dashoffset: 1; stroke-opacity: 0.2; }
}

/* Soft Float */
.float-anim {
    animation: floatY 6s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Pulse BG */
@keyframes pulse-bg {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
