/* ===================================
   reasoner.dev - Editorial Burnt-Orange Forge
   Palette:
     Forge Dark:    #2A1408
     Burnt Orange:  #5A3818
     Forge Orange:  #A06020
     Neon Warm:     rgba(200,120,40,0.25)
     Forge Cream:   #FFF6EA
     Card Surface:  #FFFAF2
     Logic Line:    #D09040
     Lift Shadow:   rgba(40,20,10,0.08)
   =================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    background-color: #FFF6EA;
    color: #5A3818;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Geometric Shape Anchors
   =================================== */
.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.geo-shape {
    position: absolute;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.geo-circle.geo-1 {
    width: 200px;
    height: 200px;
    top: 3%;
    right: 6%;
}

.geo-triangle.geo-2 {
    width: 130px;
    height: 130px;
    top: 22%;
    left: 2%;
}

.geo-square.geo-3 {
    width: 110px;
    height: 110px;
    top: 42%;
    right: 4%;
}

.geo-circle.geo-4 {
    width: 160px;
    height: 160px;
    top: 58%;
    left: 5%;
}

.geo-triangle.geo-5 {
    width: 95px;
    height: 95px;
    top: 73%;
    right: 10%;
}

.geo-square.geo-6 {
    width: 120px;
    height: 120px;
    top: 12%;
    left: 14%;
}

.geo-circle.geo-7 {
    width: 75px;
    height: 75px;
    top: 86%;
    left: 18%;
}

.geo-triangle.geo-8 {
    width: 85px;
    height: 85px;
    top: 33%;
    right: 18%;
}

.geo-diamond.geo-9 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    margin-left: -380px;
}

.geo-circle.geo-10 {
    width: 180px;
    height: 180px;
    top: 68%;
    right: 2%;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1;
    padding: 60px 20px 40px;
}

.hero-content {
    max-width: 960px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 8px 22px;
    border: 1px solid rgba(160, 96, 32, 0.2);
    border-radius: 40px;
    background: #FFFAF2;
}

.badge-icon {
    width: 20px;
    height: 20px;
}

.badge-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #A06020;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    color: #2A1408;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    text-shadow: 0 0 16px rgba(200, 120, 40, 0.25), 0 0 32px rgba(200, 120, 40, 0.1);
}

.hero-subtitle {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    color: #5A3818;
    line-height: 1.85;
    max-width: 640px;
    margin: 0 auto 32px;
}

.hero-divider {
    margin: 0 auto 24px;
    width: 200px;
    opacity: 0.6;
}

.hero-divider svg {
    width: 100%;
    height: auto;
}

.hero-tagline {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #A06020;
    letter-spacing: 0.04em;
}

/* Hero scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollHintBounce 2.5s ease-in-out infinite;
}

.hero-scroll-hint svg {
    width: 22px;
    height: 36px;
}

.scroll-dot {
    animation: scrollDotMove 2.5s ease-in-out infinite;
}

@keyframes scrollHintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

@keyframes scrollDotMove {
    0% { cy: 10; opacity: 0.5; }
    50% { cy: 26; opacity: 0.15; }
    100% { cy: 10; opacity: 0.5; }
}

/* ===================================
   Z-Pattern Rows
   =================================== */
.z-row {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
}

.z-container {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 20px;
}

/* Z-diagonal connector */
.z-diagonal-connector {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    height: 60px;
    overflow: hidden;
    pointer-events: none;
}

.z-diagonal-connector svg {
    width: 100%;
    height: 100%;
}

/* ===================================
   Reason Cards (Hover-Lift)
   =================================== */
.reason-card {
    background: #FFFAF2;
    border: 1px solid rgba(160, 96, 32, 0.1);
    border-radius: 8px;
    padding: 32px;
    transition: transform 200ms ease, box-shadow 200ms ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.reason-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D09040 50%, transparent);
    opacity: 0;
    transition: opacity 300ms ease;
}

.reason-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 20, 10, 0.08);
}

.reason-card:hover::before {
    opacity: 0.6;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.card-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #2A1408;
}

.card-description {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    color: #5A3818;
    margin-bottom: 20px;
    line-height: 1.85;
}

.card-code {
    margin-bottom: 20px;
    padding: 10px 16px;
    background: rgba(160, 96, 32, 0.04);
    border-radius: 6px;
    border-left: 3px solid #D09040;
}

.code-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #A06020;
}

/* Logic Steps */
.logic-steps {
    list-style: none;
}

.logic-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(160, 96, 32, 0.06);
}

.logic-step:last-child {
    border-bottom: none;
}

.step-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D09040;
    flex-shrink: 0;
    transition: box-shadow 300ms ease;
}

.logic-step:hover .step-marker {
    box-shadow: 0 0 8px rgba(200, 120, 40, 0.4);
}

.step-text {
    font-size: 0.92rem;
    color: #5A3818;
}

/* Output Display */
.output-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.output-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(160, 96, 32, 0.03);
    border-radius: 6px;
    transition: background 200ms ease;
}

.output-line:hover {
    background: rgba(160, 96, 32, 0.06);
}

.output-key {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: #A06020;
}

.output-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #2A1408;
    font-weight: 700;
}

/* Neon Glow */
.neon-glow {
    text-shadow: 0 0 16px rgba(200, 120, 40, 0.25), 0 0 32px rgba(200, 120, 40, 0.1);
}

/* Input Examples */
.input-examples {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-example {
    padding: 12px 16px;
    background: rgba(160, 96, 32, 0.03);
    border-radius: 6px;
    border-left: 2px solid #D09040;
    transition: border-left-color 200ms ease, background 200ms ease;
}

.input-example:hover {
    border-left-color: #A06020;
    background: rgba(160, 96, 32, 0.06);
}

.input-label {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: #A06020;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.input-content {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #5A3818;
    font-style: italic;
}

/* Conclusion Block */
.conclusion-block {
    padding: 20px;
    background: rgba(160, 96, 32, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(160, 96, 32, 0.1);
}

.conclusion-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #A06020;
    box-shadow: 0 0 8px rgba(200, 120, 40, 0.4);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(200, 120, 40, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 16px rgba(200, 120, 40, 0.6); }
}

.status-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #A06020;
    font-weight: 400;
}

.conclusion-summary {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #5A3818;
    line-height: 1.8;
}

/* ===================================
   Pipeline Section
   =================================== */
.pipeline-section {
    position: relative;
    z-index: 1;
    padding: 80px 20px;
}

.pipeline-container {
    max-width: 960px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #2A1408;
    text-align: center;
    margin-bottom: 12px;
}

.section-description {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    color: #5A3818;
    text-align: center;
    margin-bottom: 48px;
    font-size: 1.05rem;
}

.pipeline-flow {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
}

.pipeline-step {
    flex: 1;
    max-width: 200px;
    padding: 24px;
    background: #FFFAF2;
    border: 1px solid rgba(160, 96, 32, 0.1);
    border-radius: 8px;
    transition: transform 200ms ease, box-shadow 200ms ease;
    cursor: default;
    position: relative;
}

.pipeline-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 20, 10, 0.08);
}

.pipe-number {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #D09040;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.pipe-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2A1408;
    margin-bottom: 8px;
}

.pipe-desc {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #5A3818;
    line-height: 1.7;
}

.pipeline-connector {
    display: flex;
    align-items: center;
    padding-top: 40px;
    width: 40px;
    flex-shrink: 0;
}

.pipeline-connector svg {
    width: 40px;
    height: 20px;
}

/* ===================================
   Features Section
   =================================== */
.features-section {
    position: relative;
    z-index: 1;
    padding: 60px 20px 80px;
}

.features-container {
    max-width: 960px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: #FFFAF2;
    border: 1px solid rgba(160, 96, 32, 0.1);
    border-radius: 8px;
    padding: 28px;
    transition: transform 200ms ease, box-shadow 200ms ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #D09040;
    transition: width 300ms ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 20, 10, 0.08);
}

.feature-card:hover::after {
    width: 60%;
}

.feature-icon-wrap {
    margin-bottom: 16px;
}

.feature-icon {
    width: 36px;
    height: 36px;
}

.feature-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2A1408;
    margin-bottom: 8px;
}

.feature-desc {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.88rem;
    color: #5A3818;
    line-height: 1.75;
}

/* ===================================
   Code Section
   =================================== */
.code-section {
    position: relative;
    z-index: 1;
    padding: 60px 20px 80px;
}

.code-container {
    max-width: 960px;
    margin: 0 auto;
}

.code-block {
    background: #2A1408;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(40, 20, 10, 0.15);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-1 { background: #A06020; }
.dot-2 { background: #D09040; }
.dot-3 { background: #FFF6EA; opacity: 0.4; }

.code-filename {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: rgba(255, 246, 234, 0.5);
    margin-left: auto;
}

.code-content {
    padding: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.9;
    color: #FFF6EA;
    overflow-x: auto;
}

.code-content code {
    font-family: inherit;
}

.code-keyword { color: #D09040; }
.code-string { color: #A06020; }
.code-func { color: #FFF6EA; }
.code-number { color: #D09040; }
.code-comment { color: rgba(255, 246, 234, 0.35); font-style: italic; }

/* ===================================
   Footer
   =================================== */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 60px 20px 40px;
    border-top: 1px solid rgba(160, 96, 32, 0.1);
}

.footer-container {
    max-width: 960px;
    margin: 0 auto;
}

.footer-brand {
    margin-bottom: 40px;
}

.footer-logo {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2A1408;
    letter-spacing: 0.06em;
}

.footer-tagline {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #5A3818;
    margin-top: 6px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-heading {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #2A1408;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 8px;
}

.footer-link {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.88rem;
    color: #5A3818;
    text-decoration: none;
    transition: color 200ms ease;
}

.footer-link:hover {
    color: #A06020;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(160, 96, 32, 0.08);
}

.footer-copy {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: rgba(90, 56, 24, 0.5);
}

/* ===================================
   Scroll Reveal Animations
   =================================== */
.reason-card,
.pipeline-step,
.feature-card,
.code-block {
    opacity: 0;
    transform: translateY(20px);
}

.reason-card.revealed,
.pipeline-step.revealed,
.feature-card.revealed,
.code-block.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Staggered reveal for grid items */
.feature-card.revealed:nth-child(1) { transition-delay: 0ms; }
.feature-card.revealed:nth-child(2) { transition-delay: 80ms; }
.feature-card.revealed:nth-child(3) { transition-delay: 160ms; }
.feature-card.revealed:nth-child(4) { transition-delay: 240ms; }
.feature-card.revealed:nth-child(5) { transition-delay: 320ms; }
.feature-card.revealed:nth-child(6) { transition-delay: 400ms; }

.pipeline-step.revealed:nth-child(1) { transition-delay: 0ms; }
.pipeline-step.revealed:nth-child(3) { transition-delay: 150ms; }
.pipeline-step.revealed:nth-child(5) { transition-delay: 300ms; }
.pipeline-step.revealed:nth-child(7) { transition-delay: 450ms; }

/* Hero entrance animations */
.hero-content {
    animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    animation: heroFadeIn 0.8s ease 0.2s both;
}

.hero-title {
    animation: heroTitleIn 0.8s ease 0.4s both;
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: translateY(24px);
        text-shadow: 0 0 0 rgba(200, 120, 40, 0), 0 0 0 rgba(200, 120, 40, 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        text-shadow: 0 0 16px rgba(200, 120, 40, 0.25), 0 0 32px rgba(200, 120, 40, 0.1);
    }
}

.hero-subtitle {
    animation: heroFadeIn 0.8s ease 0.6s both;
}

.hero-divider {
    animation: heroFadeIn 0.8s ease 0.8s both;
}

.hero-tagline {
    animation: heroFadeIn 0.8s ease 1s both;
}

.hero-scroll-hint {
    animation: heroFadeIn 0.8s ease 1.3s both;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 768px) {
    .z-container {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-flow {
        flex-direction: column;
        align-items: center;
    }

    .pipeline-step {
        max-width: 100%;
        width: 100%;
    }

    .pipeline-connector {
        transform: rotate(90deg);
        padding-top: 0;
        padding: 10px 0;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero {
        padding: 40px 20px;
    }

    .reason-card {
        padding: 24px;
    }

    .z-diagonal-connector {
        display: none;
    }

    .geo-diamond.geo-9,
    .geo-circle.geo-10 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 0.04em;
    }

    .code-content {
        font-size: 0.72rem;
        padding: 16px;
    }
}
