/* ============================================
   Patent Tools AI — Portal v2
   ============================================ */

:root {
    --primary: #1e3a5f;
    --accent: #0ea5e9;
    --accent-glow: rgba(14,165,233,0.15);
    --bg: #ffffff;
    --bg-alt: #f8f9fb;
    --bg-hero: #0b1426;
    --border: #e2e5ea;
    --border-light: #edf0f3;
    --text: #1a1d23;
    --text-sec: #5a6170;
    --text-muted: #8b919e;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 30px rgba(14,165,233,0.12);
    --radius: 14px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-font-smoothing:antialiased; scroll-behavior:smooth; }
body { font-family:var(--font); background:var(--bg); color:var(--text); overflow-x: hidden; }
.hidden { display:none !important; }
.container { max-width:960px; margin:0 auto; padding:0 32px; }

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.25,1,0.5,1), transform 0.7s cubic-bezier(0.25,1,0.5,1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Accent bar ---- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #6366f1, var(--accent));
    background-size: 200% 100%;
    animation: gradientSlide 4s ease infinite;
    z-index: 200;
}

@keyframes gradientSlide {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Nav ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11,20,38,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

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

.nav-logo {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: -0.3px;
}

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

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 200ms ease;
}

.nav-link:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.06);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(14,165,233,0.1);
}

.nav-right {
    display: flex;
    align-items: center;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    padding: 80px 0 64px;
    background: var(--bg-hero);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(14,165,233,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 80% at 80% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 20% 80%, rgba(14,165,233,0.06) 0%, transparent 50%);
    animation: heroShift 12s ease-in-out infinite alternate;
}

@keyframes heroShift {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.hero-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 20px;
    display: inline-block;
    padding: 6px 16px;
    background: rgba(14,165,233,0.1);
    border: 1px solid rgba(14,165,233,0.2);
    border-radius: 20px;
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #94cbf7 50%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.6px;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ---- Pipeline ---- */
.section-pipeline {
    padding: 56px 0;
    background:
        radial-gradient(circle, var(--border) 1px, transparent 1px),
        var(--bg);
    background-size: 24px 24px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.section-pipeline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--bg) 0%, transparent 15%, transparent 85%, var(--bg) 100%);
    pointer-events: none;
}

.pipeline-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.flow-step {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    background: white;
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 250ms ease;
}

.flow-step {
    position: relative;
}

.flow-step:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.flow-step[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-hero);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    animation: tipFade 0.2s ease;
}

.flow-step[data-tip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-hero);
    pointer-events: none;
    animation: tipFade 0.2s ease;
}

@keyframes tipFade {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.flow-arrow {
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.pipeline-flow:hover .flow-arrow {
    transform: translateX(2px);
}

.pipeline-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    text-align: center;
    margin-bottom: 16px;
}

.pipeline-desc {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

.pipeline-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 36px 0;
    opacity: 0.3;
}

/* ---- Screenshot ---- */
.section-screenshot {
    padding: 56px 0;
    background: var(--bg-alt);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

.screenshot-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
}

.screenshot-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: top left;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}


.screenshot-caption {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.redacted-note {
    display: block;
    color: #7c3aed;
    font-weight: 500;
}

/* ---- Sections ---- */
.section {
    padding: 64px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 10px;
    display: inline-block;
    padding: 5px 14px;
    background: rgba(14,165,233,0.08);
    border: 1px solid rgba(14,165,233,0.15);
    border-radius: 20px;
}

.section-about .section-label {
    background: rgba(14,165,233,0.12);
    border-color: rgba(14,165,233,0.25);
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.6px;
    margin-bottom: 8px;
}

.section-sub {
    font-size: 16px;
    color: var(--text-sec);
    font-weight: 400;
}

/* ---- Cards ---- */
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.card-group {
    display: flex;
    flex-direction: column;
}

.card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: all 300ms cubic-bezier(0.25,1,0.5,1);
}

.card.live {
    opacity: 1;
    pointer-events: auto;
}

.card.live:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    transform: translateY(-4px);
}

.card.live:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-use {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    transition: all 200ms ease;
}

.card.live:hover .card-use {
    letter-spacing: 1.5px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 18px;
    transition: all 300ms ease;
}

.card.live:hover .card-icon {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px rgba(14,165,233,0.3);
}

.card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.2px;
    margin-bottom: 10px;
}

.card-desc {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-sec);
    line-height: 1.65;
}

.card-link {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 200ms ease;
    pointer-events: auto;
    text-align: center;
    margin-top: 10px;
}

.card-link:hover {
    color: var(--primary);
    letter-spacing: 0.3px;
}

.auth-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.auth-hint-link {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 200ms ease;
}

.auth-hint-link:hover {
    color: var(--accent);
}

/* ---- About ---- */
.section-about {
    background: var(--bg-hero);
    padding: 72px 0;
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.section-about .section-label {
    color: var(--accent);
}

.about-statement {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #94cbf7 50%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.6px;
    margin-bottom: 18px;
    line-height: 1.35;
}

.about-body {
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: 12px;
}

/* ---- Footer ---- */
.footer {
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: var(--bg-hero);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
}

.footer-link {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 200ms ease;
}

.footer-link:hover {
    color: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .nav-inner { padding: 0 16px; }
    .nav-links { display: none; }

    .hero { padding: 48px 0 40px; }
    .hero-title { font-size: 22px; }
    .hero-subtitle { font-size: 15px; }

    .pipeline-flow {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .flow-step {
        width: 100%;
        text-align: center;
    }
    .flow-arrow {
        transform: rotate(90deg);
        width: 20px;
        height: 20px;
    }

    .section { padding: 48px 0; }
    .section-title { font-size: 22px; }
    .cards { grid-template-columns: 1fr; }
    .screenshots-grid { grid-template-columns: 1fr; }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 22px; }
    .about-statement { font-size: 22px; }
    .section-title { font-size: 22px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-bg { animation: none; }
    * { transition-duration: 0.01ms !important; }
}
