/* ============================================================================
   R34PER SOFTWARE - GLOBAL STYLES
   ============================================================================
   Base reset, layout, shared components, and form styles
   ============================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&display=swap");

:root {
    --brand-blue: #60a5fa;
    --brand-green: #34d399;
    --bg-base: rgb(24, 24, 24);
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --font-display: Outfit, Arial, Helvetica, sans-serif;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body — atmospheric stage background (site-wide) */
body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(ellipse 80% 55% at 85% 18%, rgba(52, 211, 153, 0.11), transparent 55%),
        radial-gradient(ellipse 70% 50% at 8% 72%, rgba(96, 165, 250, 0.13), transparent 50%),
        radial-gradient(ellipse 100% 80% at 50% -12%, rgba(30, 41, 59, 0.85), transparent 60%),
        var(--bg-base);
    background-attachment: fixed;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Display type — headings, CTAs, badges, nav */
.page-title,
.page-subtitle,
.content-card-title,
.cta-button,
.badge,
.text-link,
.home-eyebrow,
.home-title,
.tj-section-title,
.tj-item-title,
.tj-hero-tagline,
.tj-hero-banner,
.docs-heading,
.docs-nav-label,
.docs-nav a,
.docs-hub-card-title,
.docs-release-title,
.form-section-title,
.form-label,
.contact-info-title,
.dl-title,
.dl-kicker,
.dl-btn,
.dl-links a,
.dl-strip span,
header nav a,
#menu_heading,
.r34per {
    font-family: var(--font-display);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Structure */
.page-main {
    position: relative;
    z-index: 10;
    padding: 1.5rem 0 3rem;
}

.page-hero {
    text-align: left;
    max-width: 40rem;
    margin-bottom: 2.5rem;
    animation: site-rise 0.7s ease both;
}

.page-hero--center {
    text-align: center;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.page-kicker {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-green);
    margin: 0 0 0.85rem;
}

.page-title {
    font-size: clamp(2.4rem, 5.5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    color: #f1f5f9;
    line-height: 1.05;
    background: none;
    -webkit-text-fill-color: unset;
}

.page-subtitle {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0;
    line-height: 1.65;
}

.page-hero--center .page-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* Fact strip — same language as downloads */
.fact-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(96, 165, 250, 0.22);
}

.fact-strip p {
    margin: 0;
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.5;
}

.fact-strip span {
    display: block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-blue);
    margin-bottom: 0.35rem;
}

@media (max-width: 900px) {
    .fact-strip {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }

    .page-hero {
        text-align: center;
        max-width: none;
    }

    .page-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Open sections — no cards (downloads language) */
.content-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    box-shadow: none;
}

.content-card--hover:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.content-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: #f1f5f9;
}

.content-card-text {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.65;
}

.card-icon {
    display: none;
}

/* Divided content blocks */
.open-block {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(96, 165, 250, 0.22);
}

.open-block:first-child {
    border-top: none;
    padding-top: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem 2rem;
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(96, 165, 250, 0.22);
}

.content-grid > .content-card {
    padding: 0;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid;
}

.badge--beta {
    background: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.3);
}

.badge--active,
.badge--version {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.badge--planned {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

/* Accent Links */
.text-link {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.text-link:hover {
    color: var(--brand-green);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Shared Forms */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group.full-width {
    min-width: 100%;
}

.form-turnstile {
    display: flex;
    justify-content: center;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    padding: 1rem 1.25rem;
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.55);
    color: #f1f5f9;
    font-size: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.form-input::placeholder {
    color: #64748b;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: #1e293b;
    color: #f1f5f9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.15rem 2.25rem;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    border: none;
    border-radius: 0.75rem;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(96, 165, 250, 0.35);
}

button.dl-btn {
    font: inherit;
    margin-top: 1rem;
}

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

.cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cta-button.is-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

a.cta-button {
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.cta-button--inline {
    margin-top: 0;
}

.status-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: none;
}

.status-message.is-visible {
    display: block;
}

.status-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Shared: TrayJuice demo block (index + trayjuice pages) */
.hero {
    text-align: center;
    position: relative;
    display: block;
}

.keyboard-demo {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 1rem;
    padding: calc(2rem + 200px) 2rem 2rem 2rem;
    margin: 0 0 3rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.keyboard-demo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 1rem;
    text-align: center;
    margin-top: -20px;
}

.keyboard-demo-desc {
    color: #94a3b8;
    margin-bottom: 2rem;
    text-align: center;
}

.demo-logo-wrap {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: -200px;
}

.demo-logo {
    height: 280px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.demo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.demo-arrow {
    font-size: 2rem;
    color: #94a3b8;
}

.demo-tray {
    text-align: center;
}

.tray-demo-img {
    height: 58px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tray-demo-label {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    margin-right: 20px;
}

.battery-icon {
    width: 60px;
    height: 30px;
    border: 2px solid #00ff00;
    border-radius: 6px;
    position: relative;
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.65) 0%, rgba(0, 255, 0, 0.65) 85%, #1f2937 85%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 8px;
    width: 4px;
    height: 14px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 2px 2px 0;
}

.battery-text {
    font-family: arial, 'Courier New', monospace;
    font-size: 1.1rem;
    color: #94a3b8;
    font-weight: 600;
}

.interest-badge-wrap {
    position: absolute;
    bottom: calc(1rem + 10px);
    right: 1rem;
}

.interest-badge {
    font-family: Arial, 'Courier New', monospace;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
    transform: scale(1.1);
    background: #00ff00;
    color: #1f2937;
    animation: pulse 4s infinite;
    border-radius: 30px;
}

.built-by-wrap {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    text-align: center;
}

.built-by-label {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.built-by-logo {
    height: 92px;
    width: auto;
    opacity: 0.7;
}

/* ============================================================================
   STAGE LAYOUT (downloads / home / product heroes)
   ============================================================================ */

.dl-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 2.5rem 3rem;
    align-items: center;
    min-height: min(72vh, 640px);
}

.dl-copy {
    max-width: 32rem;
}

.dl-brand {
    display: block;
    height: clamp(64px, 10vw, 96px);
    width: auto;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
    animation: dl-rise 0.7s ease both;
}

.dl-kicker {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-green);
    margin: 0 0 0.85rem;
    animation: dl-rise 0.7s ease 0.08s both;
}

.dl-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #f1f5f9;
    margin: 0 0 1rem;
    animation: dl-rise 0.7s ease 0.14s both;
}

.dl-lead {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.65;
    margin: 0 0 1.75rem;
    max-width: 28rem;
    animation: dl-rise 0.7s ease 0.2s both;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.15rem 2.25rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #0f172a;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: dl-rise 0.7s ease 0.26s both;
}

.dl-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(96, 165, 250, 0.35);
}

.dl-btn:active {
    transform: translateY(-1px);
}

.dl-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin-top: 1.75rem;
    animation: dl-rise 0.7s ease 0.34s both;
}

.dl-links a {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-blue);
    text-decoration: none;
}

.dl-links a:hover {
    color: var(--brand-green);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.dl-visual {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 400px;
    animation: dl-float-in 0.9s ease 0.15s both;
}

.dl-visual-glow {
    position: absolute;
    inset: 8% -8% -5% 8%;
    background: radial-gradient(circle at 50% 40%, rgba(52, 211, 153, 0.22), rgba(96, 165, 250, 0.1), transparent 70%);
    filter: blur(28px);
    pointer-events: none;
    z-index: 0;
}

.dl-ui {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.dl-tray {
    position: relative;
    z-index: 2;
    display: block;
    height: 48px;
    width: auto;
    margin: 1rem auto 0;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: dl-pulse-soft 4s ease-in-out 1s infinite;
}

.dl-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(96, 165, 250, 0.22);
}

.dl-strip p {
    margin: 0;
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.5;
}

.dl-strip span {
    display: block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-blue);
    margin-bottom: 0.35rem;
}

@keyframes pulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.6; }
}

@keyframes site-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dl-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dl-float-in {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes dl-pulse-soft {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

@media (max-width: 900px) {
    .dl-stage {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: 0;
        text-align: center;
    }

    .dl-copy {
        max-width: none;
        margin: 0 auto;
    }

    .dl-brand {
        margin-left: auto;
        margin-right: auto;
    }

    .dl-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .dl-visual {
        justify-self: center;
        max-width: 320px;
    }

    .dl-links {
        justify-content: center;
    }

    .dl-strip {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-hero,
    .tj-panel,
    .home-intro,
    .dl-brand,
    .dl-kicker,
    .dl-title,
    .dl-lead,
    .dl-btn,
    .dl-file,
    .dl-links,
    .dl-visual,
    .dl-tray {
        animation: none !important;
    }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .demo-row {
        flex-direction: column;
        gap: 1rem;
    }
}
