/* ============================================
   parallel.day - Art-Deco Candy Editorial
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    color: #4A3838;
    background-color: #FFF8F0;
    line-height: 1.8;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Barlow Condensed', sans-serif;
    color: #2A1818;
    line-height: 1.2;
}

h1 {
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}

h3 {
    font-weight: 500;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
}

h4 {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* --- Section Header (shared deco motif) --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
    justify-content: center;
}

.section-title {
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.deco-line-left,
.deco-line-right {
    flex: 1;
    max-width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3A2828, transparent);
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #FFF8F0;
}

.deco-pattern-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.deco-pattern-bg svg {
    width: 100%;
    height: 100%;
}

.botanical-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.botanical-hero-left {
    position: absolute;
    left: 2%;
    top: 10%;
    width: 220px;
    height: auto;
}

.botanical-hero-right {
    position: absolute;
    right: 2%;
    top: 15%;
    width: 220px;
    height: auto;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 40px;
}

.deco-frame-top,
.deco-frame-bottom {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0.4;
}

.deco-frame-top svg,
.deco-frame-bottom svg {
    width: 100%;
    height: 30px;
}

.hero-title {
    margin: 20px 0;
    letter-spacing: 0.15em;
    font-size: clamp(3rem, 8vw, 6rem);
}

.title-parallel {
    color: #2A1818;
}

.title-dot {
    color: #C04060;
}

.title-day {
    color: #C04060;
}

.hero-subtitle {
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: #4A3838;
    letter-spacing: 0.06em;
    margin-top: 8px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
}

.scroll-indicator span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #4A3838;
}

.scroll-dot {
    animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { cy: 8; }
    50% { cy: 20; }
}

/* ============================================
   EDITORIAL COLUMNS SECTION
   ============================================ */
#editorial {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.editorial-columns {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.column-divider {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
}

.column {
    background: #FFFCF6;
    padding: 32px;
    border-radius: 2px;
}

.editorial-article {
    margin-bottom: 32px;
}

.article-heading {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #E0C040;
}

.article-body {
    margin-bottom: 16px;
    color: #4A3838;
    font-weight: 300;
}

/* --- Pull-Quote with Floral Corners --- */
.pull-quote {
    position: relative;
    margin: 40px 0;
    padding: 40px 32px;
    background: #FFF8F0;
    border-left: 4px solid #C04060;
}

.floral-corner {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
}

.floral-tl { top: -4px; left: -4px; }
.floral-tr { top: -4px; right: -4px; }
.floral-bl { bottom: -4px; left: -4px; }
.floral-br { bottom: -4px; right: -4px; }

.floral-corner svg {
    width: 100%;
    height: 100%;
}

.quote-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 150%;
    color: #2A1818;
    line-height: 1.4;
    font-style: italic;
}

.quote-cite {
    display: block;
    margin-top: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: #C04060;
    font-style: normal;
    letter-spacing: 0.05em;
}

/* ============================================
   TUTORIAL SECTION
   ============================================ */
#tutorial {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.tutorial-step {
    background: #FFFCF6;
    padding: 32px;
    position: relative;
    border: 1px solid rgba(58, 40, 40, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tutorial-step:hover {
    box-shadow: 0 4px 24px rgba(42, 24, 24, 0.08);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    position: relative;
}

.step-number span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: #D04060;
    position: relative;
    z-index: 2;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    border: 2px solid #D04060;
    opacity: 0.2;
    transform: rotate(45deg);
}

.step-title {
    margin-bottom: 8px;
}

.step-description {
    margin-bottom: 16px;
    font-weight: 300;
    font-size: 0.95em;
}

/* Code Block */
.step-code-block {
    margin-bottom: 20px;
    border: 1px solid rgba(58, 40, 40, 0.12);
    border-radius: 2px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    background: #2A1818;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    color: #FFF8F0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.code-content {
    background: #3A2828;
    color: #FFF8F0;
    padding: 16px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
}

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

/* Interactive Input */
.step-interactive {
    margin-top: 16px;
}

.step-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2A1818;
    margin-bottom: 8px;
}

.input-wrapper {
    display: flex;
    gap: 8px;
}

.step-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid rgba(58, 40, 40, 0.15);
    background: #FFF8F0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: #2A1818;
    outline: none;
    transition: border-color 0.2s ease;
}

.step-input::placeholder {
    color: rgba(74, 56, 56, 0.4);
}

.step-input:focus {
    border-color: #40C0D0;
}

.step-input.correct {
    border-color: #40C0D0;
    background: rgba(64, 192, 208, 0.05);
}

.step-input.incorrect {
    border-color: #C04060;
    background: rgba(192, 64, 96, 0.03);
}

.step-check-btn {
    padding: 10px 20px;
    background: #2A1818;
    color: #FFF8F0;
    border: none;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.step-check-btn:hover {
    background: #C04060;
}

.step-feedback {
    margin-top: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    min-height: 1.2em;
}

.step-feedback.success {
    color: #40C0D0;
}

.step-feedback.error {
    color: #C04060;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    16% { transform: translateX(-5px); }
    33% { transform: translateX(5px); }
    50% { transform: translateX(-5px); }
    66% { transform: translateX(5px); }
    83% { transform: translateX(-5px); }
}

.shake {
    animation: shake 300ms ease-in-out;
}

/* ============================================
   MIXED-MEDIA SECTION
   ============================================ */
#mixed-media {
    position: relative;
    padding: 100px 40px;
    overflow: hidden;
}

.mixed-media-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.geo-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.botanical-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: multiply;
}

.mixed-media-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.pattern-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.pattern-card {
    background: #FFFCF6;
    padding: 32px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(58, 40, 40, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pattern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(42, 24, 24, 0.1);
}

.card-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.pattern-card[data-pattern="fork-join"] .card-accent-bar {
    background: linear-gradient(90deg, #C04060, #E0C040);
}

.pattern-card[data-pattern="pipeline"] .card-accent-bar {
    background: linear-gradient(90deg, #E0C040, #40C0D0);
}

.pattern-card[data-pattern="actor"] .card-accent-bar {
    background: linear-gradient(90deg, #40C0D0, #C04060);
}

.card-title {
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card-body {
    font-weight: 300;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.card-diagram {
    width: 100%;
    padding: 16px 0;
}

.card-diagram svg {
    width: 100%;
    height: auto;
}

/* ============================================
   CONCEPTS SECTION
   ============================================ */
#concepts {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.concepts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.concept-card {
    background: #FFFCF6;
    padding: 28px;
    border: 1px solid rgba(58, 40, 40, 0.06);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(42, 24, 24, 0.08);
}

.concept-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
}

.concept-icon svg {
    width: 100%;
    height: 100%;
}

.concept-title {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.concept-body {
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
    background: #2A1818;
    color: #FFF8F0;
    padding-top: 0;
}

.footer-deco-top {
    width: 100%;
    overflow: hidden;
}

.footer-deco-top svg {
    width: 100%;
    height: 30px;
    display: block;
}

.footer-deco-top polyline {
    stroke: #FFF8F0;
    opacity: 0.15;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 48px 40px 32px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 48px;
}

.footer-brand {
    flex-shrink: 0;
}

.footer-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    color: #FFF8F0;
}

.footer-dot {
    color: #C04060;
}

.footer-tagline {
    font-weight: 300;
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 4px;
}

.footer-columns {
    display: flex;
    gap: 48px;
}

.footer-col h4 {
    color: #C04060;
    margin-bottom: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

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

.footer-col li {
    font-weight: 300;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 6px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 40px;
    border-top: 1px solid rgba(255, 248, 240, 0.08);
}

.footer-bottom p {
    font-size: 0.8rem;
    opacity: 0.4;
    font-weight: 300;
}

/* ============================================
   ANIMATIONS & SCROLL REVEALS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger delays for grid items */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Step number glow on hover */
.tutorial-step .step-number span {
    transition: text-shadow 0.3s ease;
}

.tutorial-step:hover .step-number span {
    text-shadow: 0 0 20px rgba(192, 64, 96, 0.4), 0 0 40px rgba(192, 64, 96, 0.2);
}

/* Hero fade-in */
.hero-content {
    animation: heroFadeIn 1.2s ease forwards;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Deco frame zigzag line draw */
.deco-frame-top svg polyline,
.deco-frame-bottom svg polyline {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLine 2s ease forwards 0.5s;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .concepts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .editorial-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .column-divider {
        display: none;
    }

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

    .pattern-cards {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        flex-direction: column;
    }

    .footer-columns {
        flex-wrap: wrap;
        gap: 32px;
    }

    .botanical-hero-left,
    .botanical-hero-right {
        width: 140px;
    }

    #editorial,
    #tutorial,
    #concepts {
        padding: 60px 20px;
    }

    #mixed-media {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.2rem, 12vw, 3.5rem);
    }

    .botanical-hero-left,
    .botanical-hero-right {
        display: none;
    }

    .column {
        padding: 20px;
    }

    .tutorial-step {
        padding: 24px;
    }

    .pattern-card {
        padding: 24px;
    }
}