/* INTcoin Website Styles - Enhanced with Light/Dark Theme Support */
/* SEO-Optimized with WCAG AA Contrast Compliance */

/* ============================================================================
   CSS VARIABLES - DARK THEME (Default)
   ============================================================================ */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #7B68EE;
    --accent-color: #00D9FF;
    --dark-bg: #0A0E27;
    --darker-bg: #050815;
    --light-bg: #1A1F3A;
    --text-light: #E8E9ED;
    --text-gray: #B8BDC9;
    --success-color: #00FF88;
    --warning-color: #FFB800;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #4A90E2 0%, #00D9FF 100%);
    --card-bg: #1A1F3A;
    --border-color: rgba(74, 144, 226, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   LIGHT THEME VARIABLES
   ============================================================================ */
[data-theme="light"] {
    --primary-color: #2563EB;
    --secondary-color: #7C3AED;
    --accent-color: #0891B2;
    --dark-bg: #FFFFFF;
    --darker-bg: #F9FAFB;
    --light-bg: #F3F4F6;
    --text-light: #111827;
    --text-gray: #4B5563;
    --success-color: #059669;
    --warning-color: #D97706;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #2563EB 0%, #0891B2 100%);
    --card-bg: #FFFFFF;
    --border-color: rgba(37, 99, 235, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================================================
   THEME TOGGLE BUTTON
   ============================================================================ */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
    color: var(--text-light);
    font-weight: 600;
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-color);
    border-color: var(--accent-color);
}

.theme-toggle .icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

/* Hide theme icons based on current theme */
[data-theme="dark"] .theme-toggle .light-icon { display: none; }
[data-theme="light"] .theme-toggle .dark-icon { display: none; }

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--dark-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] header {
    background: rgba(10, 14, 39, 0.95);
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.95);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo .tagline {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-top: -5px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */
main {
    margin-top: 80px;
}

section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

[data-theme="dark"] .hero {
    background: radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.1) 0%, transparent 50%);
}

[data-theme="light"] .hero {
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(74,144,226,0.3)"/></svg>');
    opacity: 0.3;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 40px rgba(0, 217, 255, 0.5)); }
}

.hero h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-light);
    margin-bottom: 1rem;
    background: none;
    -webkit-text-fill-color: var(--text-light);
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-2);
    color: white;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.5);
}

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

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

/* ============================================================================
   FEATURES SECTION
   ============================================================================ */
.features {
    background: var(--darker-bg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 12px 24px var(--shadow-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* ============================================================================
   TECHNOLOGY SECTION
   ============================================================================ */
.technology {
    background: var(--dark-bg);
}

.tech-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tech-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.tech-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.tech-item p:first-of-type {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tech-item p:last-of-type {
    color: var(--text-gray);
}

/* ============================================================================
   GENESIS SECTION
   ============================================================================ */
.genesis {
    background: var(--darker-bg);
    text-align: center;
}

.genesis-message {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.genesis-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.genesis-details p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.genesis-details strong {
    color: var(--accent-color);
}

/* ============================================================================
   ROADMAP SECTION
   ============================================================================ */
.roadmap {
    background: var(--dark-bg);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.milestone {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    position: relative;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.milestone.completed {
    border-color: var(--success-color);
}

.milestone.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
}

.milestone h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.milestone.completed h3 {
    color: var(--success-color);
}

.milestone ul {
    list-style: none;
    padding-left: 0;
}

.milestone li {
    padding: 0.5rem 0;
    color: var(--text-gray);
    position: relative;
    padding-left: 1.5rem;
}

.milestone li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* ============================================================================
   DOWNLOAD SECTION
   ============================================================================ */
.download {
    background: var(--darker-bg);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.download-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.download-card h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.download-card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.download-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ============================================================================
   SPECIFICATIONS SECTION
   ============================================================================ */
.specifications {
    background: var(--dark-bg);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.spec-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.spec-label {
    color: var(--text-gray);
    font-weight: 500;
}

.spec-value {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-gray);
}

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

.footer-section a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 0.25rem 0;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Fluid Typography - Responsive font sizes using clamp() */
h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p, li, td {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

/* Mobile-First: Small screens (320px - 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }

    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    header nav {
        padding: 1rem 0;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide navigation by default on mobile */
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 30px var(--shadow-color);
    }

    /* Show navigation when menu is active */
    .nav-links.mobile-active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem;
        font-size: 1.1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    /* Hero sections */
    .hero,
    .download-hero,
    .lightning-hero,
    .address-hero {
        padding: 40px 15px !important;
    }

    .hero h1,
    .download-hero h1,
    .lightning-hero h1,
    .address-hero h1 {
        font-size: 2rem !important;
        margin-bottom: 15px !important;
    }

    /* Sections */
    section {
        padding: 3rem 1rem;
    }

    /* Grids - stack on mobile */
    .features-grid,
    .tech-grid,
    .platform-grid,
    .feature-grid,
    .stats-grid,
    .doc-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Genesis details */
    .genesis-details {
        flex-direction: column;
        gap: 1rem;
    }

    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .btn,
    .download-btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Tables - horizontal scroll */
    .comparison-table,
    .spec-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table th,
    .comparison-table td,
    .spec-table th,
    .spec-table td {
        white-space: nowrap;
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Code blocks */
    .code-block,
    .checksum-box {
        font-size: 0.85rem;
        padding: 15px;
    }

    /* Cards */
    .feature-card,
    .platform-card,
    .doc-card,
    .stat-box {
        padding: 20px;
    }

    .platform-icon {
        font-size: 3em !important;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        width: 100%;
    }

    /* Documentation container */
    .docs-container {
        margin: 80px auto !important;
        padding: 1rem !important;
    }

    /* Address examples and diagrams */
    .address-example,
    .diagram {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* Install guides */
    .install-guide {
        padding: 20px;
    }

    /* Stats grid */
    .stat-box .number {
        font-size: 2em !important;
    }
}

/* Tablet: Medium screens (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Grids - 2 columns on tablet */
    .features-grid,
    .tech-grid,
    .platform-grid,
    .feature-grid,
    .doc-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Hero sections */
    .hero,
    .download-hero,
    .lightning-hero,
    .address-hero {
        padding: 50px 20px !important;
    }

    .hero h1,
    .download-hero h1,
    .lightning-hero h1,
    .address-hero h1 {
        font-size: 2.5rem !important;
    }

    /* Navigation */
    .nav-links {
        gap: 1.5rem;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer-content {
        flex-wrap: wrap;
    }

    .footer-section {
        flex: 1 1 45%;
    }
}

/* Desktop: Large screens (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container {
        max-width: 1200px;
    }

    /* Grids - 3 columns on smaller desktops */
    .features-grid,
    .tech-grid,
    .platform-grid,
    .feature-grid,
    .doc-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Extra Large Screens (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    body {
        font-size: 18px;
    }

    /* Grids can expand to 4 columns if needed */
    .doc-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Landscape phones */
@media (max-width: 767px) and (orientation: landscape) {
    .hero,
    .download-hero,
    .lightning-hero,
    .address-hero {
        padding: 30px 15px !important;
    }

    .hero h1,
    .download-hero h1,
    .lightning-hero h1,
    .address-hero h1 {
        font-size: 1.75rem !important;
    }

    section {
        padding: 2.5rem 1rem;
    }
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .container {
        padding: 0 0.75rem;
    }

    .theme-toggle {
        bottom: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .btn,
    .download-btn {
        font-size: 0.9rem;
        padding: 0.875rem 1.25rem;
    }

    .feature-card,
    .platform-card,
    .doc-card {
        padding: 15px;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ============================================================================
   ACCESSIBILITY & UX
   ============================================================================ */
html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--accent-color);
    color: white;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(74, 144, 226, 0.5);
    }

    .feature-card,
    .tech-item,
    .download-card,
    .spec-item {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .theme-toggle,
    nav,
    .cta-buttons,
    footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
