/* === Design Tokens & Variables === */
:root {
    /* Colors - Light Mode Theme */
    --bg-base: #F5F5F7;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-surface-hover: rgba(245, 245, 250, 0.8);

    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #86868B;

    --accent-aurora: #008080;
    /* Teal/Cyan for light mode */
    --accent-titanium: #A1A1A6;
    --accent-blue: #0066CC;

    --border-glass: rgba(0, 0, 0, 0.08);

    /* Gradients */
    --gradient-text: linear-gradient(135deg, #1D1D1F 0%, #434346 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(0, 128, 128, 0.08) 0%, transparent 70%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --container-sm: 800px;
    --section-gap: 120px;

    /* Motion */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* === Layout & Containers === */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: var(--container-sm);
}

.section {
    padding: var(--section-gap) 0;
    position: relative;
}

.text-center {
    text-align: center;
}

/* === Typography Classes === */
.text-secondary {
    color: var(--text-secondary);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-sm {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.font-bold {
    font-weight: 700;
}

/* Subdued Font Sizes */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.section-desc {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 80px;
}

/* === UI Components === */

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-glass);
}

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 980px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--text-primary);
    color: #FFF;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* === Specific Sections === */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px saturate(180%));
    -webkit-backdrop-filter: blur(20px saturate(180%));
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

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

.logo {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
    border: none;
    background: transparent;
}

.hero-gradient {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 60vw;
    background: var(--gradient-glow);
    border-radius: 50%;
    opacity: 0.8;
    z-index: 0;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-disclaimer {
    max-width: 650px;
    margin: 0 auto 30px;
    background: rgba(200, 200, 210, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 16px 24px;
}

.hero-disclaimer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.hero-disclaimer strong {
    color: var(--text-primary);
}

.hero-mockup-wrapper {
    margin-top: 60px;
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-mockup {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    background: rgba(240, 240, 245, 0.5);
    min-height: 300px;
}

/* Protocol / Architecture */
.protocol-section {
    border-top: 1px solid var(--border-glass);
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-bottom: 80px;
    padding: 60px;
    background: radial-gradient(circle at center, rgba(0, 102, 204, 0.03) 0%, transparent 60%);
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.arch-layer {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.arch-node {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.arch-core .core-box {
    background: linear-gradient(135deg, #FFFFFF, #F5F5F7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px rgba(0, 128, 128, 0.05);
    padding: 24px 48px;
    border-radius: 20px;
    text-align: center;
}

.arch-core h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.core-ops {
    display: flex;
    gap: 16px;
    font-family: monospace;
    color: var(--accent-aurora);
}

.core-ops span {
    padding: 6px 12px;
    background: rgba(0, 128, 128, 0.08);
    border-radius: 8px;
    font-size: 0.875rem;
}

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

.feature-card h3 {
    font-size: 1.15rem;
    margin: 16px 0 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), transparent);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Sample Apps */
.app-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.app-showcase.reverse {
    direction: rtl;
}

.app-showcase.reverse>* {
    direction: ltr;
}

.app-info h3 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.app-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.app-features li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
}

.app-features li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-aurora);
    font-size: 1.25rem;
    line-height: 1;
}

.app-features strong {
    color: var(--text-primary);
}

.mockup-container {
    position: relative;
    height: 400px;
    perspective: 1000px;
}

.placeholder-mockup {
    position: absolute;
    background: linear-gradient(135deg, #FFF, #F0F0F5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: monospace;
    text-align: center;
}

.ipados-mockup {
    width: 90%;
    height: 80%;
    border-radius: 12px;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%) rotateY(-15deg);
    z-index: 1;
}

.ios-mockup {
    width: 40%;
    height: 70%;
    border-radius: 20px;
    bottom: 0;
    right: 0;
    transform: rotateY(-15deg) translateZ(50px);
    z-index: 2;
    background: linear-gradient(135deg, #F9F9FB, #EEEEF0);
}

.macos-mockup {
    width: 100%;
    height: 80%;
    border-radius: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.macos-mockup small {
    margin-top: 10px;
    color: var(--accent-blue);
    background: rgba(0, 102, 204, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Roadmap Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-aurora), rgba(0, 0, 0, 0.05));
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.t-dot {
    position: absolute;
    left: -37px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.timeline-item.active .t-dot {
    border-color: var(--accent-aurora);
    box-shadow: 0 0 10px rgba(0, 128, 128, 0.2);
    background: #FFF;
}

.t-content h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.t-content p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 60px 0 40px;
    background: #FFFFFF;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.footer-links {
    max-width: 400px;
}

.footer-links p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 24px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    gap: 12px;
}

.icp-info a {
    color: var(--text-secondary);
}

.icp-info a:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .app-showcase,
    .app-showcase.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
    }
}