/* PCAPAI Website — Dark theme matching desktop app */

:root {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2b2b2b;
    --bg-card: #353535;
    --bg-hover: #404040;
    --text-primary: #ffffff;
    --text-secondary: #bbbbbb;
    --text-muted: #888888;
    --accent: #0078d4;
    --accent-hover: #1a8ae8;
    --border: #555555;
    --success: #66bb6a;
    --warning: #ffa726;
    --max-width: 1100px;
}

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

/* Particle canvas — full page behind content. z-index: -1 keeps it
   below default stacking so we don't need to lift every div above it. */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

html {
    scroll-behavior: smooth;
    /* Page background lives on html so the particle canvas (z-index: -1)
       is visible in front of it. Body stays transparent. */
    background: var(--bg-primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: transparent;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Navigation */

nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    text-decoration: none;
}

nav .logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

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

nav .nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}

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

/* Hero Section */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 24px 60px;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* App icon — works for both <img> poster and <video> element */
.hero .app-icon {
    display: block;
    width: 140px;
    height: 140px;
    border-radius: 28px;
    margin-bottom: 28px;
    object-fit: cover;
    background: #0a0a0a;
    box-shadow:
        0 20px 44px rgba(0, 120, 212, 0.38),
        0 6px 14px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    animation: app-icon-float 5s ease-in-out infinite;
    transition: box-shadow 0.3s ease;
}

.hero .app-icon:hover {
    box-shadow:
        0 26px 56px rgba(0, 120, 212, 0.6),
        0 6px 14px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

@keyframes app-icon-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(-1.5deg); }
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero .tagline {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Global CTA — works outside .hero too (e.g. beta form submit button) */
.cta {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
    background: var(--accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

.cta:active {
    transform: translateY(0);
}

.hero .cta-note {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Section header (eyebrow + gradient title + subtitle) */

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 12px;
    border: 1px solid rgba(0, 120, 212, 0.35);
    border-radius: 999px;
    background: rgba(0, 120, 212, 0.08);
    margin-bottom: 14px;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.grad-text {
    background: linear-gradient(135deg, #0078d4 0%, #1a8ae8 50%, #9bd2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Beta badge + CTA glow */

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 120, 212, 0.12);
    border: 1px solid rgba(0, 120, 212, 0.3);
    margin-bottom: 24px;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success), 0 0 2px var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.cta-glow {
    position: relative;
    box-shadow: 0 8px 28px rgba(0, 120, 212, 0.45), 0 0 0 1px rgba(255,255,255,0.08) inset;
    animation: cta-pulse 3s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 8px 28px rgba(0, 120, 212, 0.45), 0 0 0 1px rgba(255,255,255,0.08) inset; }
    50% { box-shadow: 0 8px 40px rgba(0, 120, 212, 0.65), 0 0 0 1px rgba(255,255,255,0.1) inset; }
}

/* Screenshot Gallery */

.gallery {
    max-width: 1180px;
    margin: 40px auto 80px;
    padding: 0 24px;
    position: relative;
}

.gallery-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 36px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.gallery-tabs {
    display: inline-flex;
    background: #2b2b2b;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px;
    gap: 2px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.gallery-tab {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s, box-shadow 0.2s;
}

.gallery-tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
}

.gallery-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.gallery-tab.active {
    background: linear-gradient(135deg, #0078d4 0%, #1a8ae8 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.5);
}

/* Stage — halo + frame */

.gallery-stage {
    position: relative;
    padding: 20px 0;
}

.gallery-halo {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(0, 120, 212, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 30% 40% at 20% 30%, rgba(155, 210, 255, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 30% 40% at 80% 70%, rgba(0, 120, 212, 0.2) 0%, transparent 60%);
    filter: blur(40px);
    animation: halo-drift 10s ease-in-out infinite;
}

@keyframes halo-drift {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.85; }
    50% { transform: translateX(-50%) scale(1.05); opacity: 1; }
}

/* Gallery frame is a shadow/glow wrapper only — the screenshots bring their own macOS chrome */
.gallery-frame {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.65),
        0 0 60px rgba(0, 120, 212, 0.18);
}

#gallery-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    opacity: 1;
    transition: opacity 0.14s ease;
}

.gallery-caption {
    max-width: 720px;
    margin: 32px auto 0;
    padding: 0 24px;
    text-align: center;
}

.gallery-caption h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.gallery-caption p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 640px) {
    .gallery { margin: 20px auto 60px; }
    .gallery-tabs-wrap { justify-content: flex-start; }
    .section-title { font-size: 28px; }
}

/* Feature Grid */

.features {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px;
}


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

.feature-card {
    position: relative;
    background: linear-gradient(180deg, #3a3a3a 0%, #2f2f2f 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,120,212,0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 120, 212, 0.5);
    box-shadow: 0 12px 32px rgba(0, 120, 212, 0.18), 0 0 60px rgba(0, 120, 212, 0.08);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.08);
}

.feature-icon-blue   { background: linear-gradient(135deg, rgba(0,120,212,0.25), rgba(0,120,212,0.08)); color: #6db8ff; }
.feature-icon-purple { background: linear-gradient(135deg, rgba(155,100,255,0.25), rgba(155,100,255,0.08)); color: #c9a8ff; }
.feature-icon-green  { background: linear-gradient(135deg, rgba(102,187,106,0.25), rgba(102,187,106,0.08)); color: #86e088; }
.feature-icon-orange { background: linear-gradient(135deg, rgba(255,167,38,0.25), rgba(255,167,38,0.08)); color: #ffc46b; }
.feature-icon-pink   { background: linear-gradient(135deg, rgba(236,72,153,0.25), rgba(236,72,153,0.08)); color: #f5a3c7; }

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.feature-card .badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-free { background: #2e5c2e; color: var(--success); }
.badge-standard { background: #4a3a1a; color: var(--warning); }
.badge-pro { background: #1a3a5c; color: var(--accent); }

/* Pricing Table */

.pricing {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px;
}


.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.pricing-card.featured {
    border-color: var(--accent);
    position: relative;
    background: linear-gradient(180deg, rgba(26,58,92,0.6) 0%, rgba(53,53,53,0.9) 100%);
    box-shadow: 0 12px 40px rgba(0,120,212,0.25), 0 0 80px rgba(0,120,212,0.12);
}

.pricing-card.featured::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,120,212,0.6), rgba(26,138,232,0.2), rgba(0,120,212,0.6));
    z-index: -1;
    opacity: 0.5;
    filter: blur(10px);
    pointer-events: none;
}

.pricing-ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0078d4, #1a8ae8);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0,120,212,0.5);
    white-space: nowrap;
}

.pricing-card .tier-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-card .tier-price {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}

.pricing-card li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid rgba(85,85,85,0.3);
}

.pricing-card li::before {
    content: "\2713 ";
    color: var(--success);
    font-weight: 700;
    margin-right: 6px;
}

.pricing-card li.disabled {
    color: var(--text-muted);
}

.pricing-card li.disabled::before {
    content: "\2013 ";
    color: var(--text-muted);
}

.pricing-card .tier-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}

.tier-btn-free {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tier-btn-free:hover {
    background: #4a4a4a;
    text-decoration: none;
}

.tier-btn-accent {
    background: var(--accent);
    color: #fff;
}

.tier-btn-accent:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

/* System Requirements */

.requirements {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 60px;
    text-align: center;
}

.requirements p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Legal / Content Pages */

.content-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.content-page h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.content-page .meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.content-page h2 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(85,85,85,0.3);
}

.content-page h3 {
    font-size: 17px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
}

.content-page p, .content-page li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-page ul, .content-page ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.content-page li {
    margin-bottom: 6px;
}

.content-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.content-page th, .content-page td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.content-page th {
    background: var(--bg-card);
    font-weight: 600;
}

.content-page td {
    color: var(--text-secondary);
}

.content-page .caps {
    font-size: 13px;
    line-height: 1.8;
}

/* Updates page */

.release {
    margin-bottom: 48px;
}

.release h2 {
    border-top: none;
    padding-top: 0;
}

.release h3 {
    color: var(--text-primary);
}

.release ul {
    margin-bottom: 20px;
}

/* Footer */

footer {
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 32px 24px;
    text-align: center;
}

footer .footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

footer .footer-links a {
    color: var(--text-muted);
    font-size: 13px;
}

footer .copyright {
    font-size: 12px;
    color: var(--text-muted);
}

/* Beta Download Section */

.beta {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.beta-inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.beta-desc {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 12px 0 32px;
    text-align: center;
}

.beta .section-header {
    margin-bottom: 0;
}

.beta-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.beta-form .form-row input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #353535;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.beta-form .form-row input:hover {
    border-color: rgba(0,120,212,0.4);
}

.beta-form .form-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,120,212,0.15);
}

.beta-form .form-row input::placeholder {
    color: var(--text-muted);
}

.beta-form .cta {
    cursor: pointer;
    border: none;
    width: 100%;
    margin-top: 4px;
}

.beta-form .cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.beta-message {
    margin-top: 24px;
    padding: 24px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.beta-message .msg-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.beta-message h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.beta-message p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.beta-error {
    border-color: #ff4444;
}

.beta-error p {
    color: #ff6b6b;
}

/* Hero glow animation */

.hero h1 {
    background: linear-gradient(135deg, #ffffff 0%, #0078d4 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Fade-in on load — uses "backwards" fill so hover transforms are not blocked */

.feature-card, .pricing-card {
    animation: fadeUp 0.5s ease backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.15s; }
.feature-card:nth-child(4) { animation-delay: 0.2s; }
.feature-card:nth-child(5) { animation-delay: 0.25s; }
.feature-card:nth-child(6) { animation-delay: 0.3s; }
.feature-card:nth-child(7) { animation-delay: 0.35s; }
.feature-card:nth-child(8) { animation-delay: 0.4s; }

.pricing-card:nth-child(1) { animation-delay: 0.05s; }
.pricing-card:nth-child(2) { animation-delay: 0.1s; }
.pricing-card:nth-child(3) { animation-delay: 0.15s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Responsive */

@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .hero .tagline { font-size: 16px; }
    .feature-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    nav .nav-links { gap: 16px; }
    nav .nav-links a { font-size: 13px; }
}

@media (max-width: 480px) {
    nav .nav-inner { padding: 0 16px; }
    nav .nav-links { gap: 12px; }
    .hero { padding: 48px 16px 40px; }
    .hero h1 { font-size: 28px; }
}
