/* ============================================
   INTERACTIVE HERO BLOCK
   ============================================ */

/* Text selection color */
::selection {
    background-color: #3C2A21;
    color: #F8F0E5;
}

::-moz-selection {
    background-color: #3C2A21;
    color: #F8F0E5;

    text-shadow: none;
}

/* Hero Container */
.hero-interactive {
    min-height: 100vh;
    height: 100vh;
    max-height: 100vh;
    background-color: #F8F0E5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    clear: both;
    isolation: isolate;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Prevent conflicts with other sections */
.hero-interactive * {
    box-sizing: border-box;
}

.hero__content {
    max-width: 1200px;
    width: 100%;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
}

/* ============================================
   MODE A: Motivational Title
   ============================================ */

.hero__mode-a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Title with grow from floor animation */
.hero__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oswald', 'Anton', sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 6vw, 72px);
    line-height: 1.2;
    letter-spacing: 0.05em;
    color: #3C2A21;
    margin: -30px 0 210px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-transform: uppercase;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.hero__title-line {
    display: block;
    opacity: 0;
    transform: translateY(30%) scaleY(0.85);
    animation: growFromFloor 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    text-shadow: 2px 4px 12px rgba(60, 42, 33, 0.15);
    width: 100%;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    color: #3C2A21;
}

.hero__title-line[data-line="1"] {
    animation-delay: 0s;
}

.hero__title-line[data-line="2"] {
    animation-delay: 0.1s;
}

@keyframes growFromFloor {
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

.hero__title:hover {
    transform: scale(1.01);
    transition: transform 0.3s ease;
}

.hero__title:hover .hero__title-line {
    text-shadow: 3px 6px 16px rgba(60, 42, 33, 0.25);
}

/* Subtitle */
.hero__subtitle {
    font-size: clamp(14px, 2vw, 16px);
    color: #3C2A21;
    line-height: 1.6;
    max-width: 700px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 0 20px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease-out 0.8s forwards;
    font-weight: 300;
    position: relative;
    z-index: 1;
    transition: opacity 0.45s ease-out;
}

@keyframes fadeInUp {
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* CTA Button */
.hero__cta {
    background-color: #3C2A21;
    color: #F8F0E5;
    border: none;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease-out 1s forwards;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.45s ease-out;
    box-shadow: 0 4px 12px rgba(60, 42, 33, 0.2);
    position: relative;
    z-index: 1;
    margin: 0;
}

.hero__cta:hover {
    background-color: #2a1a14;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(60, 42, 33, 0.3);
}

.hero__cta:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.hero__toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    height: 120px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 200;
    padding: 0;
    outline: none;
    margin: 0;
    box-sizing: border-box;
}

.hero__toggle:focus-visible {
    outline: 2px solid #4A90E2;
    outline-offset: 4px;
    border-radius: 60px;
}

.hero__toggle-track {
    width: 100%;
    height: 100%;
    background-color: #F8F0E5;
    border: 2px solid rgba(60, 42, 33, 0.1);
    border-radius: 60px;
    position: relative;
    display: block;
    box-shadow: 
        0 8px 25px rgba(60, 42, 33, 0.2),
        0 2px 8px rgba(60, 42, 33, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.hero__toggle:hover .hero__toggle-track {
    box-shadow: 
        0 10px 30px rgba(60, 42, 33, 0.25),
        0 3px 10px rgba(60, 42, 33, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    background-color: #FFFFFF;
}

.hero__toggle[aria-checked="true"] .hero__toggle-track {
    background-color: #F0F0F0;
    border-color: rgba(60, 42, 33, 0.15);
}

.hero__toggle-thumb {
    position: absolute;
    width: 92px;
    height: 92px;
    background-color: #4A90E2;
    border-radius: 50%;
    top: 14px;
    left: 14px;
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.35s ease;
    box-shadow: 
        0 4px 12px rgba(74, 144, 226, 0.4),
        0 2px 6px rgba(74, 144, 226, 0.3);
}

.hero__toggle[aria-checked="true"] .hero__toggle-thumb {
    transform: translateX(240px);
    background-color: #22C55E;
    box-shadow: 
        0 4px 12px rgba(34, 197, 94, 0.4),
        0 2px 6px rgba(34, 197, 94, 0.3);
}

/* ============================================
   MODE B: Ribbon Background
   ============================================ */

.hero__mode-b {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    background-color: #2A1A14;
    overflow: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transform: translateX(-50%);
    transform-origin: center center;
    transition: opacity 0.45s ease-out, width 0s 0.6s;
    min-width: 0;
}

/* Reverse animation when switching back */
.hero-interactive:not(.is-mode-b) .hero__mode-b {
    animation: shrinkHorizontal 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes shrinkHorizontal {
    0% {
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        opacity: 1;
    }
    100% {
        width: 0;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
    }
}

.hero-interactive.is-mode-b .hero__mode-b {
    opacity: 1;
    pointer-events: auto;
    animation: stretchHorizontal 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes stretchHorizontal {
    0% {
        width: 0;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        opacity: 1;
    }
}

/* Mode B Title */
.hero__mode-b-title {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    text-align: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out 0.3s, transform 0.6s ease-out 0.3s;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    box-sizing: border-box;
}

.hero-interactive.is-mode-b .hero__mode-b-title {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.hero__ribbon-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oswald', 'Anton', sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1.1;
    letter-spacing: 0.08em;
    color: #F8F0E5;
    text-transform: uppercase;
    margin: 0 0 15px;
    text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.5);
}

.hero__ribbon-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oswald', 'Anton', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 56px);
    line-height: 1.2;
    letter-spacing: 0.05em;
    color: #F8F0E5;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.9;
    text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.5);
}

/* Ribbon Container */
.hero__ribbon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150vw;
    height: 150vh;
    overflow: hidden;
    transform: translate(-50%, -50%) rotate(-25deg);
    transform-origin: center center;
    will-change: transform;
    margin: 0;
    padding: 0;
}

.ribbon-layer {
    position: absolute;
    width: 150vw;
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    will-change: transform;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    margin: 0;
    padding: 60px 0;
    align-items: start;
    row-gap: 120px;
    column-gap: 150px;
}

.ribbon-tile {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oswald', 'Anton', sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 8vw, 120px);
    line-height: 1.4;
    letter-spacing: 0.08em;
    color: #F8F0E5;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.2;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    width: 100%;
    text-align: center;
    display: block;
    margin: 0;
    padding: 20px 0;
    min-height: 2em;
    box-sizing: border-box;
}

/* Alternate tiles to create two-row layout */
.ribbon-tile:nth-child(odd) {
    grid-column: 1;
    justify-self: start;
}

.ribbon-tile:nth-child(even) {
    grid-column: 2;
    justify-self: end;
}

/* Ribbon Animation */
.ribbon-layer--1 {
    animation: ribbonScroll 40s linear infinite;
    transform: translateX(-50%) translateY(0);
}

.ribbon-layer--2 {
    animation: ribbonScroll 55s linear infinite reverse;
    transform: translateX(-50%) translateY(0);
    margin-top: 100vh;
}

@keyframes ribbonScroll {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    100% {
        transform: translateX(-50%) translateY(-100%);
    }
}

/* Ribbon Stretch Animation on Mode Switch */
.hero-interactive.is-mode-b .hero__ribbon {
    animation: ribbonStretch 0.45s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes ribbonStretch {
    0% {
        transform: translate(-50%, -50%) rotate(-25deg) scaleX(0.3);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) rotate(-25deg) scaleX(1);
        opacity: 1;
    }
}

/* Decorative Elements - Hidden */
.hero__decorative {
    display: none;
}

.hero__decorative-item {
    display: none;
}

.hero__decorative-item--statue {
    display: none;
}

.hero__decorative-item--portrait {
    display: none;
}

/* ============================================
   MODE SWITCH ANIMATIONS
   ============================================ */

/* Hide Mode A when switching to Mode B */
.hero-interactive.is-mode-b .hero__mode-a {
    opacity: 0;
    transform: scale(0.98) translateY(-10px);
    pointer-events: none;
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
    z-index: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.hero-interactive.is-mode-b .hero__title {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.hero-interactive.is-mode-b .hero__title-line {
    animation: none;
}

.hero-interactive.is-mode-b .hero__subtitle {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0) !important;
    transition: opacity 0.45s ease-out, visibility 0s 0.45s;
}

.hero-interactive.is-mode-b .hero__cta {
    opacity: 0 !important;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(0) !important;
    transition: opacity 0.45s ease-out, visibility 0s 0.45s;
}

.hero-interactive.is-mode-b .hero__content {
    z-index: 1;
}

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

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
    .hero__content {
        padding: 30px 20px;
    }
    
    .hero__title {
        font-size: clamp(28px, 5vw, 56px);
        margin-bottom: 30px;
        letter-spacing: 0.04em;
    }
    
    .hero__subtitle {
        margin-bottom: 25px;
        font-size: clamp(14px, 1.8vw, 15px);
    }
    
    .hero__toggle {
        width: 300px;
        height: 100px;
    }
    
    .hero__toggle-thumb {
        width: 76px;
        height: 76px;
        top: 12px;
        left: 12px;
    }
    
    .hero__toggle[aria-checked="true"] .hero__toggle-thumb {
        transform: translateX(200px);
    }
    
    .ribbon-tile {
        font-size: clamp(40px, 6vw, 90px);
        letter-spacing: 0.06em;
        opacity: 0.2;
    }
    
    .hero__ribbon-title {
        font-size: clamp(32px, 5vw, 64px);
    }
    
    .hero__ribbon-subtitle {
        font-size: clamp(22px, 3.5vw, 44px);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .hero__content {
        padding: 30px 15px;
    }
    
    .hero__title {
        font-size: clamp(24px, 8vw, 48px);
        letter-spacing: 0.03em;
        margin-bottom: 25px;
        padding: 0 15px;
    }
    
    .hero__title-line {
        font-size: inherit;
    }
    
    .hero__subtitle {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 25px;
        padding: 0 15px;
    }
    
    .hero__cta {
        padding: 14px 28px;
        font-size: 13px;
    }
    
    .hero__toggle {
        width: 220px;
        height: 70px;
    }
    
    .hero__toggle-track {
        border-radius: 35px;
    }
    
    .hero__toggle-thumb {
        width: 54px;
        height: 54px;
        top: 8px;
        left: 8px;
    }
    
    .hero__toggle[aria-checked="true"] .hero__toggle-thumb {
        transform: translateX(150px);
    }
    
    .ribbon-tile {
        font-size: clamp(32px, 5vw, 70px);
        letter-spacing: 0.04em;
        opacity: 0.2;
        gap: 30px;
    }
    
    .hero__mode-b-title {
        top: 12%;
        padding: 0 15px;
    }
    
    .hero__ribbon-title {
        font-size: clamp(24px, 4vw, 48px);
        margin-bottom: 10px;
    }
    
    .hero__ribbon-subtitle {
        font-size: clamp(18px, 3vw, 36px);
    }
    
    .hero__decorative-item--statue {
        width: 100px;
        height: 150px;
        top: 5%;
        left: 5%;
    }
    
    .hero__decorative-item--portrait {
        width: 90px;
        height: 120px;
        bottom: 10%;
        left: 5%;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .hero__title-line,
    .hero__subtitle,
    .hero__cta,
    .hero__toggle-thumb,
    .hero__mode-a,
    .hero__mode-b,
    .hero__ribbon,
    .hero__decorative-item {
        animation: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    .ribbon-layer--1,
    .ribbon-layer--2 {
        animation: none !important;
    }
    
    .hero__title-line {
        opacity: 1;
        transform: none;
    }
    
    .hero__subtitle,
    .hero__cta {
        opacity: 0.9;
        transform: none;
    }
}

