/* ============================================================
   PANOPS - Shared Styles
   ============================================================ */

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

:root {
    --accent: #00e5ff;
    --accent-dim: rgba(0, 229, 255, 0.15);
    --accent-glow: rgba(0, 229, 255, 0.4);
    --white: #f0f0f0;
    --white-dim: rgba(240, 240, 240, 0.6);
    --white-faint: rgba(240, 240, 240, 0.08);
    --bg: #000000;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
}

html { scroll-behavior: smooth; background: var(--bg); }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* --- Navigation --- */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 20px 40px;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

nav.scrolled { padding: 14px 40px; background: rgba(0, 0, 0, 0.85); }

.nav-logo {
    font-size: 20px; font-weight: 700; letter-spacing: 8px;
    color: var(--white); text-decoration: none;
}

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

.nav-links a {
    color: var(--white-dim); text-decoration: none;
    font-size: 13px; font-weight: 500; letter-spacing: 2px;
    text-transform: uppercase; transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }

.nav-cta {
    padding: 8px 24px; background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    border-radius: 4px; transition: all 0.3s !important;
}
.nav-cta:hover {
    background: var(--accent) !important;
    color: #000 !important;
    box-shadow: 0 0 30px var(--accent-glow);
}

/* --- Hero --- */
.hero {
    position: relative; height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.03) 0%, transparent 70%);
}

.hero.no-webgl::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 400px; height: 400px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 229, 255, 0.3); border-radius: 50%;
    animation: spin-globe 20s linear infinite;
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.1), inset 0 0 60px rgba(0, 229, 255, 0.05);
}
.hero.no-webgl::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 500px; height: 500px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 229, 255, 0.15); border-radius: 50%;
    animation: spin-globe 30s linear infinite reverse;
}
@keyframes spin-globe {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

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

.hero-content { position: relative; z-index: 2; text-align: center; pointer-events: none; }

.hero h1 {
    font-size: clamp(48px, 8vw, 96px); font-weight: 700;
    letter-spacing: 16px; line-height: 1.1; margin-bottom: 20px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.6) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-tagline {
    font-size: clamp(14px, 2vw, 18px); color: var(--white);
    letter-spacing: 5px; font-weight: 400; text-transform: uppercase;
}

/* Hero fade-in animation */
.hero-fade {
    opacity: 0; animation: heroFadeIn 2s ease forwards;
}
.hero-fade-delay {
    animation-delay: 0.8s;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%;
    transform: translateX(-50%); z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0.4;
}
.scroll-indicator span { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; }
.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(180deg, var(--accent), transparent);
    animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- Buttons --- */
.btn-primary {
    padding: 14px 40px; background: var(--accent); color: #000;
    font-size: 13px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; text-decoration: none;
    border: none; border-radius: 4px; cursor: pointer; transition: all 0.3s;
}
.btn-primary:hover {
    box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(0,229,255,0.15);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 14px 40px; background: transparent; color: var(--white);
    font-size: 13px; font-weight: 500; letter-spacing: 2px;
    text-transform: uppercase; text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px; cursor: pointer; transition: all 0.3s;
}
.btn-secondary:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05);
}

/* --- Sections --- */
section { padding: 120px 40px; max-width: 1200px; margin: 0 auto; }

.section-label {
    font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
    color: var(--accent); margin-bottom: 16px; font-weight: 500;
}
.section-title {
    font-size: clamp(32px, 4vw, 52px); font-weight: 700;
    letter-spacing: 2px; margin-bottom: 20px; line-height: 1.2;
}
.section-desc {
    font-size: 16px; line-height: 1.8; color: var(--white-dim);
    max-width: 640px; margin-bottom: 60px;
}

/* --- Reveal animations --- */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.divider {
    width: 100%; max-width: 1200px; margin: 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* --- Mission / Stats --- */
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.mission-stat { margin-bottom: 40px; }
.mission-stat .number {
    font-size: 48px; font-weight: 700; color: var(--accent);
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 0 0 30px var(--accent-glow);
}
.mission-stat .label {
    font-size: 13px; letter-spacing: 2px; color: var(--white-dim);
    text-transform: uppercase; margin-top: 4px;
}

/* --- Service cards --- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.service-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 40px; position: relative;
    overflow: hidden; transition: all 0.4s ease;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
    opacity: 0; transition: opacity 0.4s;
}
.service-card:hover {
    border-color: rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.02);
    transform: translateY(-2px);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
    width: 48px; height: 48px;
    border: 1px solid rgba(0, 229, 255, 0.3); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px; background: var(--accent-dim);
}
.service-icon svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.service-card h3 { font-size: 18px; font-weight: 600; letter-spacing: 1px; margin-bottom: 12px; }
.service-card p { font-size: 14px; line-height: 1.7; color: var(--white-dim); }
.service-tag {
    display: inline-block; margin-top: 16px; padding: 4px 12px;
    border: 1px solid rgba(0,229,255,0.2); border-radius: 4px;
    font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
}

/* --- Precision section --- */
.precision-section { max-width: 1200px; }
.precision-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.precision-text { }
.precision-features { margin-top: 32px; }
.pf-item {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 16px 0; border-bottom: 1px solid var(--border);
}
.pf-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow); margin-top: 6px; flex-shrink: 0;
}
.pf-item h4 { font-size: 14px; font-weight: 600; letter-spacing: 1px; margin-bottom: 4px; }
.pf-item p { font-size: 13px; line-height: 1.6; color: var(--white-dim); }

.precision-canvas-wrap {
    position: relative; width: 100%; aspect-ratio: 4/3;
    border: 1px solid var(--border); border-radius: 8px;
    overflow: hidden; background: #000;
}
.precision-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

/* --- Tier cards --- */
.tiers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tier-card {
    border: 1px solid var(--border); border-radius: 12px; padding: 48px 40px;
    position: relative; background: var(--bg-card);
}
.tier-card.featured {
    border-color: rgba(0, 229, 255, 0.3);
    background: linear-gradient(180deg, rgba(0,229,255,0.04) 0%, transparent 60%);
}
.tier-badge {
    display: inline-block; margin-bottom: 16px; padding: 4px 16px;
    background: var(--accent); color: #000;
    font-size: 9px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; border-radius: 3px;
}
.tier-name { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.tier-title { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.tier-desc { font-size: 14px; color: var(--white-dim); line-height: 1.7; margin-bottom: 32px; }
.tier-features { list-style: none; }
.tier-features li {
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 14px; color: var(--white-dim);
    display: flex; align-items: center; gap: 12px;
}
.tier-features li::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); flex-shrink: 0;
}
.tier-price { margin-top: 32px; font-size: 14px; color: var(--white-dim); }
.tier-price strong { font-size: 36px; font-weight: 700; color: var(--white); }
.tier-cta {
    display: block; text-align: center; margin-top: 24px; padding: 14px;
    border-radius: 6px; text-decoration: none;
    font-size: 13px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; transition: all 0.3s;
}
.tier-cta.primary { background: var(--accent); color: #000; }
.tier-cta.primary:hover { box-shadow: 0 0 30px var(--accent-glow); }
.tier-cta.secondary { border: 1px solid rgba(255,255,255,0.2); color: var(--white); }
.tier-cta.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* --- Features grid --- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-item {
    padding: 32px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-card); transition: all 0.3s;
}
.feature-item:hover { border-color: rgba(0,229,255,0.15); }
.feature-item h4 { font-size: 15px; font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; }
.feature-item p { font-size: 13px; line-height: 1.7; color: var(--white-dim); }
.feature-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
    margin-bottom: 20px; box-shadow: 0 0 12px var(--accent-glow);
}

/* --- CTA Section --- */
.cta-section { text-align: center; padding: 160px 40px; }
.cta-section h2 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: 3px; margin-bottom: 20px; }
.cta-section p { font-size: 16px; color: var(--white-dim); margin-bottom: 40px; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.7; }

/* --- Subpage header --- */
.page-header {
    padding-top: 140px; padding-bottom: 60px; text-align: center;
    background: radial-gradient(ellipse at center top, rgba(0, 229, 255, 0.04) 0%, transparent 60%);
}
.page-header .section-label { margin-bottom: 12px; }
.page-header .section-title { margin-bottom: 16px; }
.page-header .section-desc { max-width: 600px; margin: 0 auto; }

/* --- Login page --- */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding-top: 80px;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.03) 0%, transparent 70%);
}
.login-card {
    width: 100%; max-width: 440px; padding: 48px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--bg-card); position: relative; overflow: hidden;
}
.login-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.login-card h2 { font-size: 24px; font-weight: 700; letter-spacing: 4px; margin-bottom: 8px; text-align: center; }
.login-card .login-sub { font-size: 13px; color: var(--white-dim); text-align: center; margin-bottom: 36px; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 11px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--white-dim); margin-bottom: 8px;
}
.form-group input {
    width: 100%; padding: 14px 16px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: 6px; color: var(--white);
    font-size: 14px; font-family: inherit; transition: border-color 0.3s;
    outline: none;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: rgba(255,255,255,0.2); }

.login-btn {
    width: 100%; padding: 14px; margin-top: 8px;
    background: var(--accent); color: #000; border: none;
    border-radius: 6px; font-size: 13px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    cursor: pointer; transition: all 0.3s; font-family: inherit;
}
.login-btn:hover { box-shadow: 0 0 30px var(--accent-glow); }

.login-divider {
    text-align: center; margin: 28px 0; position: relative;
    font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,0.25);
}
.login-divider::before, .login-divider::after {
    content: ''; position: absolute; top: 50%; width: 40%;
    height: 1px; background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

.login-alt {
    text-align: center; font-size: 13px; color: var(--white-dim);
}
.login-alt a { color: var(--accent); text-decoration: none; }
.login-alt a:hover { text-decoration: underline; }

.login-footer {
    text-align: center; margin-top: 32px; padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 11px; color: rgba(255,255,255,0.25);
}

/* --- Legal pages --- */
.legal-content { max-width: 800px; }
.legal-section { margin-bottom: 40px; }
.legal-section h3 {
    font-size: 18px; font-weight: 600; letter-spacing: 1px;
    margin-bottom: 12px; color: var(--white);
}
.legal-section p {
    font-size: 14px; line-height: 1.8; color: var(--white-dim); margin-bottom: 12px;
}
.legal-section ul {
    list-style: none; padding-left: 0; margin-bottom: 12px;
}
.legal-section li {
    font-size: 14px; line-height: 1.8; color: var(--white-dim);
    padding: 4px 0 4px 20px; position: relative;
}
.legal-section li::before {
    content: ''; position: absolute; left: 0; top: 12px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* --- Apply toggle (login page) --- */
.apply-toggle {
    color: var(--accent); cursor: pointer; text-decoration: none;
    font-size: 14px; font-weight: 500; letter-spacing: 1px;
    transition: opacity 0.3s;
}
.apply-toggle:hover { opacity: 0.8; text-decoration: underline; }

.apply-form-wrap {
    max-height: 0; overflow: hidden; transition: max-height 0.5s ease;
}
.apply-form-wrap.open { max-height: 600px; }

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border); padding: 60px 40px;
    max-width: 1200px; margin: 0 auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-brand { font-size: 16px; font-weight: 700; letter-spacing: 6px; margin-bottom: 16px; }
.footer-desc { font-size: 13px; line-height: 1.7; color: var(--white-dim); max-width: 300px; }
.footer-col h5 { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--white); margin-bottom: 20px; }
.footer-col a { display: block; font-size: 13px; color: var(--white-dim); text-decoration: none; padding: 6px 0; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 30px; border-top: 1px solid var(--border);
    font-size: 12px; color: rgba(255,255,255,0.3);
}
.footer-bottom a { color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.3s; }
.footer-bottom a:hover { color: var(--accent); }

/* --- Responsive --- */
@media (max-width: 900px) {
    nav { padding: 16px 24px; }
    .nav-links { display: none; }
    section { padding: 80px 24px; }
    .mission-grid { grid-template-columns: 1fr; gap: 40px; }
    .services-grid { grid-template-columns: 1fr; }
    .tiers-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .precision-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { letter-spacing: 8px; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-cta-group { flex-direction: column; align-items: center; }
}
