@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --neon-blue: #00ffff;
    --dark-bg: #000000;
    --light-text: #e0e0e0;
    --dark-text: #a0a0a0;
    --card-bg: #0d0d0d;
    --border-color: rgba(0, 255, 255, 0.2);
}

/* Global box-sizing and overflow guard to avoid layout shifting on small screens */
*, *::before, *::after { box-sizing: border-box; }
html, body { -webkit-text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; height: auto; }

/* Prevent accidental horizontal overflow on small devices */
html, body { overflow-x: hidden; }

/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 120px 0;
    background: var(--dark-bg);
    border-bottom: 1px solid var(--border-color);
    position: relative; /* needed for absolute-positioned video */
    overflow: hidden;
}

/* Background video fills the hero area */
.hero-video {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* behind overlay/content */
    pointer-events: none;
    filter: brightness(0.82) saturate(1.02);
}

/* dark overlay above video to improve text contrast */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.22), rgba(0,0,0,0.38));
    z-index: 1;
    pointer-events: none;
}

/* ensure main content sits above video and overlay */
.hero .container { position: relative; z-index: 2; }

/* Video features removed: no hero video or play toggles present */
/* ensure main content sits above background layers */
.hero .container { position: relative; z-index: 2; }

/* Entrance animation: start hidden, animate when `.animate-in` is added to body */
.hero h1,
.hero .sub-headline,
.network-visual .node {
    opacity: 0;
    transform: translateY(12px);
    will-change: opacity, transform;
}

.animate-in .hero h1 {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 700ms cubic-bezier(.2,.9,.2,1), transform 700ms cubic-bezier(.2,.9,.2,1);
}

.animate-in .hero .sub-headline {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 700ms cubic-bezier(.2,.9,.2,1) 120ms, transform 700ms cubic-bezier(.2,.9,.2,1) 120ms;
}

.animate-in .network-visual .node {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 620ms cubic-bezier(.2,.9,.2,1), transform 620ms cubic-bezier(.2,.9,.2,1);
}

.hero h1 {
    /* responsive font size to avoid huge wrapping on small screens */
    font-size: clamp(1.8rem, 6vw, 3.2rem);
    margin-bottom: 20px;
    line-height: 1.05;
    text-wrap: balance;
    /* animated gradient + neon flicker */
    background: linear-gradient(90deg, var(--neon-blue), #7cffb2, #ff6bdb, #ffd166);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.15);
    animation: gradientShift 4s linear infinite, neonFlicker 3s ease-in-out infinite;
}

/* Logo above the heading */
.site-logo {
    display: block;
    margin: 0 auto 18px;
    /* larger default logo size while preserving aspect ratio */
    height: 180px; /* enlarged further */
    width: auto;
    max-width: 320px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

@media (max-width: 900px) {
    .site-logo { height: 150px; margin-bottom: 12px; }
}

@media (max-width: 480px) {
    .site-logo { height: 110px; margin-bottom: 10px; }
}

.hero .sub-headline {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--dark-text);
}

.cta-button {
    display: inline-block;
    padding: 15px 35px;
    background-color: transparent;
    color: var(--neon-blue);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--neon-blue);
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.cta-button:hover {
    background-color: var(--neon-blue);
    color: var(--dark-bg);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8);
}

.network-visual {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.node {
    padding: 12px 25px;
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--light-text);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* per-node color can be supplied via --node-color */
    --node-color: var(--neon-blue);
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 0 8px 0 rgba(0,0,0,0);
    animation: nodeGlow 3.5s ease-in-out infinite;
}

/* Make nodes keyboard-focusable and reset native button styles */
.node {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    padding: 12px 28px;
}

.node:focus {
    outline: 3px solid rgba(255,255,255,0.06);
    box-shadow: 0 6px 24px 2px var(--node-color);
}

/* Assign distinct colors to each node */
.network-visual .node:nth-child(1) { --node-color: #00e5ff; }
.network-visual .node:nth-child(2) { --node-color: #9b59ff; }
.network-visual .node:nth-child(3) { --node-color: #7cffb2; }
.network-visual .node:nth-child(4) { --node-color: #ff6b6b; }

.node:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 24px 2px var(--node-color);
}

/* Hide siblings when a pillar is open */
.node.hidden {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    transition: opacity 260ms ease, transform 260ms ease;
}

/* Floating pillar panel (appears next to clicked node) */
.pillar-panel {
    position: fixed;
    z-index: 60;
    width: 340px;
    max-width: calc(100% - 40px);
    background: linear-gradient(180deg, rgba(13,13,13,0.96), rgba(8,8,8,0.98));
    border: 1px solid var(--border-color);
    color: var(--light-text);
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 6px 30px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(6px) scale(0.99);
    transition: opacity 320ms cubic-bezier(.2,.9,.2,1), transform 320ms cubic-bezier(.2,.9,.2,1);
    pointer-events: none;
}

.pillar-panel.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.pillar-panel .pillar-panel-close {
    position: absolute;
    right: 10px;
    top: 8px;
    background: transparent;
    color: var(--light-text);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 8px;
}

.pillar-panel h2 { margin-top: 0; }

/* Small screens: full width panel under the nodes */
@media (max-width: 640px) {
    /* On small screens keep the panel fixed but make it wider so it fits nicely.
       It will still attempt to sit beside the button, falling back to centered if necessary. */
    .pillar-panel {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        left: 12px !important;
        transform: none;
        right: 12px;
    }
    .network-visual { gap: 14px; }
}

/* Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes neonFlicker {
    0%, 100% { text-shadow: 0 0 12px rgba(0,255,255,0.18), 0 0 30px rgba(0,0,0,0); transform: translateY(0); }
    30% { text-shadow: 0 0 6px rgba(0,255,255,0.12); transform: translateY(-2px); }
    60% { text-shadow: 0 0 20px rgba(255,255,255,0.08); transform: translateY(0); }
}

@keyframes nodeGlow {
    0% { transform: translateY(0); box-shadow: 0 0 6px 0 rgba(0,0,0,0); }
    45% { transform: translateY(-4px); box-shadow: 0 0 14px 4px var(--node-color); }
    100% { transform: translateY(0); box-shadow: 0 0 6px 0 rgba(0,0,0,0); }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero h1, .node { animation: none !important; transition: none !important; }
}

/* Philosophy Section */
.philosophy {
    padding: 100px 0;
    /* start hidden; content appears when user clicks a node */
    display: none;
    opacity: 0;
    transform: translateY(8px);
}

.philosophy.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 420ms ease, transform 420ms ease;
}

.philosophy .container {
    display: block;
    max-width: 800px;
    margin: 0 auto;
}

/* Hide all pillars by default and only show the active one */
.philosophy .pillar {
    display: none;
    background: var(--card-bg);
    padding: 35px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.philosophy .pillar.active {
    display: block;
    animation: pillarIn 360ms cubic-bezier(.2,.9,.2,1);
}

@keyframes pillarIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.philosophy-close {
    position: absolute;
    right: 20px;
    top: 18px;
    background: transparent;
    color: var(--light-text);
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 6px 10px;
}

.philosophy { position: relative; }
.pillar {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pillar:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.pillar h2 {
    font-size: 1.6rem;
    color: var(--neon-blue);
    margin-bottom: 15px;
}

/* Ecosystem Section */
.ecosystem {
    text-align: center;
    padding: 100px 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ecosystem h2 {
    font-size: clamp(1.6rem, 5.5vw, 2.5rem);
    margin-bottom: 20px;
    color: #fff;
}

.featured-product {
    margin-top: 40px;
    background: var(--dark-bg);
    padding: 40px;
    border-radius: 10px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

.featured-product h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--neon-blue);
}

.featured-product h4 {
    text-align: left;
    color: var(--light-text);
    margin-top: 30px;
    margin-bottom: 15px;
}

.featured-product .features-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 450px;
    text-align: left;
}

.featured-product .features-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.featured-product .features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-weight: 600;
}

/* Why iivo Section */
.why-iivo {
    padding: 100px 0;
}

.why-iivo h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.why-iivo ul {
    list-style: none;
    padding: 0;
    max-width: 650px;
    margin: 0 auto;
}

.why-iivo li {
    background: var(--card-bg);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--neon-blue);
    font-size: 1.1rem;
}

/* Process Section */
.process {
    padding: 100px 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.process h2 {
    text-align: center;
    font-size: clamp(1.6rem, 5.5vw, 2.5rem);
    margin-bottom: 50px;
}

.process ol {
    max-width: 700px;
    margin: 0 auto;
    counter-reset: process-counter;
    padding-left: 0;
}

.process li {
    list-style: none;
    background: var(--dark-bg);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
    padding-left: 60px;
    border: 1px solid var(--border-color);
}

.process li::before {
    counter-increment: process-counter;
    content: '0' counter(process-counter);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-blue);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Socials Section */
.socials {
    padding: 100px 0;
    text-align: center;
}

.socials h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.socials p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 50px;
    color: var(--dark-text);
}

.social-links-large {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-link-item {
    display: flex;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--light-text);
    transition: all 0.3s ease;
}

.social-link-item:hover {
    background-color: var(--neon-blue);
    color: var(--dark-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.2);
}

.social-link-item i {
    font-size: 2.5rem;
    margin-right: 20px;
}

.social-link-item span {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    padding: 50px 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.footer nav a {
    color: var(--dark-text);
    text-decoration: none;
    margin: 0 20px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer nav a:hover {
    color: var(--neon-blue);
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
}

.social-links i {
    font-size: 1.8rem;
    color: var(--dark-text);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover i {
    color: var(--neon-blue);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .network-visual {
        flex-direction: column;
        align-items: center;
    }
}

/* Additional responsive adjustments for tablets and phones */
@media (max-width: 900px) {
    .container { padding: 0 18px; }
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 2.6rem; }
    .hero .sub-headline { font-size: 1.05rem; max-width: 620px; }
    .network-visual { gap: 18px; flex-wrap: wrap; }
    .node { padding: 14px 30px; font-size: 1rem; }
    .featured-product { width: 100%; box-sizing: border-box; padding: 28px; }
    .pillar-panel { width: 320px; max-width: calc(100% - 32px); }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 2rem; }
    .hero .sub-headline { font-size: 1rem; max-width: 100%; padding: 0 6px; }
    .cta-button { padding: 12px 22px; font-size: 0.95rem; }

    /* Make nodes easier to tap and stacked */
    .network-visual { flex-direction: column; gap: 12px; align-items: stretch; }
    .network-visual .node { width: 100%; text-align: center; padding: 14px 18px; font-size: 1.05rem; border-radius: 10px; }

    /* Panel becomes wide and centered on small screens */
    .pillar-panel {
        left: 12px !important;
        right: 12px !important;
        top: auto !important;
        bottom: 12px !important;
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        transform: translateY(0);
        box-shadow: 0 12px 36px rgba(0,0,0,0.6);
        border-radius: 12px;
    }

    /* Footer and nav stack vertically */
    .footer nav a { display: block; margin: 8px 0; }
    .social-links { margin-top: 16px; }

    /* Reduce some pillar paddings on small screens */
    .philosophy .pillar { padding: 20px; }
}

/* Tweak social boxes for small screens so icons remain visible */
@media (max-width: 480px) {
    .social-links-large {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    .social-link-item {
        flex: 1 1 calc(50% - 16px);
        max-width: calc(50% - 16px);
        padding: 12px 14px;
        align-items: center;
        justify-content: center;
        gap: 12px;
        box-sizing: border-box;
    }
    .social-link-item i {
        font-size: 1.4rem;
        margin-right: 10px;
    }
    .social-link-item span {
        font-size: 1rem;
    }
    /* On very narrow screens stack them full width */
    @media (max-width: 340px) {
        .social-link-item { flex-basis: 100%; max-width: 100%; }
    }
}

/* Improve general touch targets and readability on high-DPI small devices */
@media (pointer: coarse) {
    .node { padding: 14px 28px; }
    .cta-button { padding: 14px 28px; }
}
