/* ========================================
   Phoenix Technologies — Redesign 2026
   ======================================== */

:root {
    --bg: #0C0F13;
    --bg-elevated: #141820;
    --bg-subtle: #1A1F2B;
    --surface: #222836;
    --text: #E8ECF1;
    --text-muted: #8892A2;
    --accent: #8B5CF6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-soft: rgba(139, 92, 246, 0.12);
    --color-ptf: #E8431F;
    --color-thor: #E8431F;
    --color-misterx: #A855F7;
    --color-tfeed: #F59E0B;
    --color-mirage: #E8431F;
    --radius: 16px;
    --radius-sm: 8px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    /* Subtle CSS grid background */
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- Typography --- */
h1, .hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

/* --- Layout --- */
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    position: relative;
    z-index: 2;
}

/* --- Navigation --- */
.site-nav {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    transition: background 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
    background: rgba(12, 15, 19, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 72px;
}

.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 36px; width: 36px; object-fit: contain; }
.nav-brand span { font-weight: 600; font-size: 1rem; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 32px; }

.nav-link {
    font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
    transition: color 0.25s ease; position: relative;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--accent);
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.lang-toggle {
    display: flex; align-items: center; gap: 2px;
    background: var(--bg-subtle); border: 1px solid var(--surface);
    border-radius: 20px; padding: 4px 6px; cursor: pointer;
    font-family: inherit;
}
.lang-option {
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
    padding: 4px 10px; border-radius: 14px;
    transition: all 0.25s ease; user-select: none;
}
.lang-option.active { background: var(--accent); color: white; }

/* --- Hero --- */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: transparent;
}

#hero-canvas {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0; pointer-events: none;
}

.hero-content {
    position: relative; z-index: 2;
    max-width: 800px; text-align: center;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.hero-label {
    font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.hero-title { color: white; margin-bottom: 24px; text-shadow: 0 2px 30px rgba(0,0,0,0.9), 0 0 60px rgba(0,0,0,0.5); }

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--text-muted);
    max-width: 600px; margin: 0 auto 40px; line-height: 1.7;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; font-family: inherit; font-size: 0.9rem;
    font-weight: 600; border-radius: var(--radius-sm); cursor: pointer;
    transition: all 0.3s ease; text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; border: none; }
.btn-primary:hover {
    background: #7c3aed; transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--surface); }
.btn-secondary:hover {
    border-color: var(--text-muted); background: var(--bg-elevated);
    transform: translateY(-2px);
}

/* --- Ecosystem --- */
.ecosystem {
    position: relative; padding: 120px 0 100px; overflow: hidden;
    background: transparent;
}

#network-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.5; pointer-events: none;
}

.section-header { text-align: center; margin-bottom: 64px; }
.section-label {
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.15em; color: var(--accent); margin-bottom: 16px;
}
.section-header h2 { color: white; margin-bottom: 16px; }
.section-desc {
    font-size: 1.05rem; color: var(--text-muted);
    max-width: 500px; margin: 0 auto; line-height: 1.7;
}

/* Product Cards */
.product-showcase { display: flex; flex-direction: column; gap: 24px; }

.product-card {
    background: var(--bg-elevated); border: 1px solid var(--surface);
    border-radius: var(--radius); padding: clamp(24px, 3vw, 40px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative; overflow: hidden;
}
.product-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity 0.4s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-card:hover::before { opacity: 1; }

/* Per-product hovers */
.product-card[data-product="ptf"]:hover { border-color: rgba(232,67,31,0.3); box-shadow: 0 8px 40px rgba(232,67,31,0.08); }
.product-card[data-product="ptf"]::before { background: linear-gradient(90deg, transparent, var(--color-ptf), transparent); }
.product-card[data-product="thor"]:hover { border-color: rgba(232,67,31,0.3); box-shadow: 0 8px 40px rgba(232,67,31,0.08); }
.product-card[data-product="thor"]::before { background: linear-gradient(90deg, transparent, var(--color-thor), transparent); }
.product-card[data-product="misterx"]:hover { border-color: rgba(168,85,247,0.3); box-shadow: 0 8px 40px rgba(168,85,247,0.08); }
.product-card[data-product="misterx"]::before { background: linear-gradient(90deg, transparent, var(--color-misterx), transparent); }
.product-card[data-product="tfeed"]:hover { border-color: rgba(245,158,11,0.3); box-shadow: 0 8px 40px rgba(245,158,11,0.08); }
.product-card[data-product="tfeed"]::before { background: linear-gradient(90deg, transparent, var(--color-tfeed), transparent); }
.product-card[data-product="odin"]:hover { border-color: rgba(232,67,31,0.3); box-shadow: 0 8px 40px rgba(232,67,31,0.08); }
.product-card[data-product="odin"]::before { background: linear-gradient(90deg, transparent, var(--color-ptf), transparent); }
.product-card[data-product="saga"]:hover { border-color: rgba(139,92,246,0.3); box-shadow: 0 8px 40px rgba(139,92,246,0.08); }
.product-card[data-product="saga"]::before { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.product-card[data-product="mirage"]:hover { border-color: rgba(232,67,31,0.3); box-shadow: 0 8px 40px rgba(232,67,31,0.08); }
.product-card[data-product="mirage"]::before { background: linear-gradient(90deg, transparent, var(--color-mirage), transparent); }

.product-card.flagship { display: flex; gap: clamp(24px, 4vw, 48px); align-items: center; }
.product-card.flagship .product-icon { flex-shrink: 0; }
.product-card.flagship .product-icon img { max-height: 100px; width: auto; }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-grid .product-card { display: flex; flex-direction: column; gap: 20px; }

.product-icon { display: flex; align-items: center; }
.product-icon img { max-height: 56px; width: auto; object-fit: contain; }
.mirage-icon img { padding: 4px; background: rgba(255,255,255,0.06); border-radius: 8px; }

.product-info { flex: 1; display: flex; flex-direction: column; }
.product-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }

.product-role {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.1em; padding: 3px 10px; border-radius: 20px;
    background: var(--accent-soft); color: var(--accent);
}
.product-card[data-product="ptf"] .product-role { background: rgba(232,67,31,0.12); color: var(--color-ptf); }
.product-card[data-product="thor"] .product-role { background: rgba(232,67,31,0.12); color: var(--color-thor); }
.product-card[data-product="misterx"] .product-role { background: rgba(168,85,247,0.12); color: var(--color-misterx); }
.product-card[data-product="tfeed"] .product-role { background: rgba(245,158,11,0.12); color: var(--color-tfeed); }
.product-card[data-product="odin"] .product-role { background: rgba(232,67,31,0.12); color: var(--color-ptf); }
.product-card[data-product="saga"] .product-role { background: var(--accent-soft); color: var(--accent); }
.product-card[data-product="mirage"] .product-role { background: rgba(232,67,31,0.12); color: var(--color-mirage); }

.product-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.product-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.875rem; font-weight: 600; color: var(--accent);
    margin-top: auto; transition: gap 0.3s ease, color 0.3s ease;
}
.product-link svg { transition: transform 0.3s ease; }
.product-link:hover { gap: 10px; }
.product-link:hover svg { transform: translate(2px, -2px); }
.product-card[data-product="ptf"] .product-link { color: var(--color-ptf); }
.product-card[data-product="thor"] .product-link { color: var(--color-thor); }
.product-card[data-product="odin"] .product-link { color: var(--color-ptf); }
.product-card[data-product="saga"] .product-link { color: var(--accent); }
.product-card[data-product="tfeed"] .product-link { color: var(--color-tfeed); }

/* --- Contact --- */
.contact { padding: 120px 0; text-align: center; position: relative; z-index: 1; background: var(--bg); }
.contact-content { margin-top: 48px; }
.contact-email {
    font-size: clamp(1.25rem, 3vw, 2.5rem); font-weight: 600;
    color: white; position: relative; display: inline-block;
    transition: color 0.3s ease;
}
.contact-email::after {
    content: ''; position: absolute; bottom: -6px; left: 0;
    width: 0; height: 3px; background: var(--accent);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); border-radius: 2px;
}
.contact-email:hover { color: var(--accent); }
.contact-email:hover::after { width: 100%; }

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--surface); padding: 60px 0 40px;
    position: relative; z-index: 1; background: var(--bg);
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
.footer-brand img { height: 32px; width: 32px; margin-bottom: 12px; }
.footer-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.footer-loc { font-size: 0.85rem; color: var(--text-muted); }
.footer-links { display: flex; justify-content: flex-end; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { margin-bottom: 8px; }
.footer-col a { font-size: 0.875rem; color: var(--text-muted); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid var(--surface); }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .product-card.flagship { flex-direction: column; text-align: center; }
    .product-card.flagship .product-header { justify-content: center; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-brand span { display: none; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { justify-content: flex-start; }
}

@media (max-width: 640px) {
    .nav-links { gap: 16px; }
    .nav-link { display: none; }
    .hero-content { padding-top: 80px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; justify-content: center; }
    .ecosystem { padding: 80px 0 60px; }
    .section-header { margin-bottom: 40px; }
    .contact { padding: 80px 0; }
    .product-card.flagship .product-icon img { max-height: 70px; }
    .product-grid { grid-template-columns: 1fr; }
}
