/* Shared styles for Rational Bitcoin Education pages */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #e8e8ed;
    --text-secondary: #9090a0;
    --accent-orange: #f7931a;
    --accent-orange-dim: rgba(247, 147, 26, 0.15);
    --accent-blue: #4a9eff;
    --accent-green: #00d395;
    --accent-red: #ff6b6b;
    --accent-purple: #a855f7;
    --glow-orange: 0 0 30px rgba(247, 147, 26, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 18px 40px rgba(0, 0, 0, 0.35);
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-display);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 1rem;
    padding: 0.5rem 0.9rem;
    background: var(--accent-orange);
    color: #0a0a0f;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1001;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0.75rem;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
    border-radius: 6px;
}

a {
    transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-tertiary);
    padding: 1rem 2rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-orange);
    text-decoration: none;
}

.nav-brand:hover {
    text-shadow: var(--glow-orange);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    min-height: 44px;
    padding: 0.4rem 0.7rem;
    display: inline-flex;
    align-items: center;
}

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

.nav-links a.active {
    color: var(--accent-orange);
}

/* Main content */
main {
    max-width: 900px;
    margin: 0 auto;
}

.content {
    padding: 3rem 2rem 4rem;
    padding-top: 3rem;
}

/* Hero Section */
.hero {
    min-height: clamp(220px, 30vh, 420px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem 2rem;
    position: relative;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(247, 147, 26, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    max-width: 900px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.1s forwards;
}

.hero h1 span {
    color: var(--accent-orange);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

/* Section styling */
.section {
    margin-bottom: 5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-orange);
    border-radius: 2px;
}

.section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.section p strong {
    color: var(--text-primary);
}

/* Interactive boxes */
.interactive-box {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.interactive-box h3 {
    font-size: 1rem;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.interactive-box > p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Input styling */
.hash-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.hash-input:focus {
    outline: none;
    border-color: var(--accent-orange);
}

.hash-output {
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--accent-green);
}

.hash-output-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Key statement box */
.key-statement {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-left: 4px solid var(--accent-orange);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    border-radius: 0 12px 12px 0;
}

/* Topic cards for overview page */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.topic-card {
    background: linear-gradient(150deg, rgba(18, 18, 26, 0.92), rgba(26, 26, 37, 0.92));
    border: 1px solid rgba(247, 147, 26, 0.08);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: block;
    box-shadow: var(--shadow-card);
}

.topic-card:hover {
    border-color: rgba(247, 147, 26, 0.4);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.topic-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.topic-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.topic-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.topic-card .tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: var(--accent-orange-dim);
    color: var(--accent-orange);
    border-radius: 4px;
    margin-top: 1rem;
    font-family: var(--font-mono);
}

.topic-card .tag.coming-soon {
    background: rgba(144, 144, 160, 0.15);
    color: var(--text-secondary);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Comparison table */
.comparison {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-orange);
}

.comparison td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-tertiary);
    color: var(--text-secondary);
}

.comparison tr:hover td {
    background: var(--bg-secondary);
}

.check { color: var(--accent-green); }
.cross { color: var(--accent-red); }

pre {
    max-width: 100%;
    overflow-x: auto;
}

code {
    word-break: break-word;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, var(--accent-orange), #ffb347);
    color: #0a0a0f;
    border: none;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(247, 147, 26, 0.25);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(247, 147, 26, 0.35);
    filter: brightness(1.05);
}

.btn-secondary {
    background: rgba(26, 26, 37, 0.95);
    color: var(--text-primary);
    border: 1px solid rgba(247, 147, 26, 0.15);
    box-shadow: none;
}

.btn-secondary:hover {
    border-color: rgba(247, 147, 26, 0.4);
    background: rgba(26, 26, 37, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: 900px;
    margin: 1.5rem auto 0;
    padding: 0 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

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

.breadcrumbs span {
    opacity: 0.6;
}

/* Related content */
.related-content {
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid var(--bg-tertiary);
    border-radius: 16px;
    background: var(--bg-secondary);
}

.related-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.related-content ul {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.related-content a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.related-content a:hover {
    color: var(--accent-orange);
}

/* CTA section */
.cta-section {
    margin: 4rem 0 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.12), rgba(18, 18, 26, 0.95));
    border: 1px solid rgba(247, 147, 26, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cta-section h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
}

.cta-section p {
    color: var(--text-secondary);
    max-width: 720px;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.next-topic {
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.next-topic:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 2rem 2.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--bg-tertiary);
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.site-footer h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.site-footer .footer-links {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.site-footer .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.site-footer .footer-links a:hover {
    color: var(--accent-orange);
}

.site-footer .footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

.site-footer .footer-bottom a {
    color: var(--accent-orange);
    text-decoration: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .content {
        padding: 2.5rem 1.75rem 3.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem;
    }

    .nav-links {
        width: 100%;
        gap: 1rem;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }
    
    .content {
        padding: 2rem 1.25rem;
        padding-top: 5rem;
    }

    .nav-brand {
        width: 100%;
        text-align: center;
    }
    
    .nav-links {
        width: 100%;
        gap: 1rem;
        justify-content: center;
    }
    
    .interactive-box {
        padding: 1.5rem;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 375px) {
    .content {
        padding: 1.8rem 1.1rem;
        padding-top: 4.5rem;
    }

    .hero {
        padding: 2rem 1.25rem 1.5rem;
    }
}

@media (max-width: 320px) {
    .content {
        padding: 1.5rem 0.9rem;
        padding-top: 4.25rem;
    }
}

