/* ========================================
   HC VISION PAGE - Beautiful Vision Content Styles
   ======================================== */

/* Universal Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Disable double-tap zoom on mobile */
html, body {
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Allow text selection for content and input fields */
input, textarea, select, p, h1, h2, h3, h4, h5, h6, span, a {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

html.theme-dark ::-webkit-scrollbar-track {
    background: #111;
}

html.theme-dark ::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 6px;
}

html.theme-dark ::-webkit-scrollbar-thumb:hover {
    background: #00b8e6;
}

html.theme-light ::-webkit-scrollbar-track {
    background: #f0f0f0;
}

html.theme-light ::-webkit-scrollbar-thumb {
    background: #1F75FE;
    border-radius: 6px;
}

html.theme-light ::-webkit-scrollbar-thumb:hover {
    background: #1565D8;
}

/* ========================================
   PARTICLES BACKGROUND
   ======================================== */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

html.theme-dark #particles-js {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
}

html.theme-light #particles-js {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 50%, #f8f8f8 100%);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 120px;
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CPU Animation */
.hero-animation {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
    animation: slideInFromTop 0.8s ease-out;
    animation-fill-mode: both;
}

html.theme-light .hero-animation {
    filter: drop-shadow(0 0 30px rgba(31, 117, 254, 0.3));
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated Text Output */
.output {
    margin: 40px 0;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.output h1 {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    letter-spacing: 0.5px;
    white-space: pre-wrap;
    word-break: keep-all;
    overflow-wrap: normal;
    word-wrap: normal;
    hyphens: none;
}

/* Prevent individual character spans from breaking across lines */
.output h1 .char-fade {
    white-space: nowrap;
}

html.theme-dark .output h1 {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

html.theme-light .output h1 {
    color: #1F75FE;
    text-shadow: 0 0 20px rgba(31, 117, 254, 0.3);
}

/* Vision Button */
.vision-button-wrapper {
    margin-top: 50px;
    animation: slideInFromBottom 0.8s ease-out 0.3s;
    animation-fill-mode: both;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vision-button {
    display: inline-block;
    padding: 16px 48px;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html.theme-dark .vision-button {
    background: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%);
    color: #000000;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

html.theme-light .vision-button {
    background: linear-gradient(135deg, #1F75FE 0%, #1565D8 100%);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(31, 117, 254, 0.4);
}

.vision-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.5s ease;
}

.vision-button:hover::before {
    left: 100%;
}

.vision-button:hover {
    transform: translateY(-3px);
}

html.theme-dark .vision-button:hover {
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.6);
}

html.theme-light .vision-button:hover {
    box-shadow: 0 15px 40px rgba(31, 117, 254, 0.6);
}

.vision-button:active {
    transform: translateY(-1px);
}

/* ========================================
   VISION SECTION - Main Content Area
   ======================================== */

.vision-section {
    position: relative;
    width: 100%;
    padding: 100px 0;
    z-index: 10;
    overflow: hidden;
}

/* Dark Theme Vision Section */
html.theme-dark .vision-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
}

/* Light Theme Vision Section */
html.theme-light .vision-section {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8f0 50%, #f8f8f8 100%);
}

.vision-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========================================
   VISION QUOTE - Opening Statement
   ======================================== */

.vision-quote {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    padding: 60px 20px;
    margin: 0 0 60px 0;
    position: relative;
    font-family: 'Georgia', serif;
    animation: fadeInUp 1s ease-out;
}

/* Dark Theme Quote */
html.theme-dark .vision-quote {
    color: #00d4ff;
}

/* Light Theme Quote */
html.theme-light .vision-quote {
    color: #1F75FE;
}

.vision-quote::before {
    content: '"';
    font-size: clamp(80px, 15vw, 140px);
    position: absolute;
    left: -10px;
    top: -20px;
    font-family: Georgia, serif;
    line-height: 1;
    z-index: -1;
    opacity: 0.15;
}

/* Dark Theme Quote Mark */
html.theme-dark .vision-quote::before {
    color: #00d4ff;
}

/* Light Theme Quote Mark */
html.theme-light .vision-quote::before {
    color: #1F75FE;
}

/* ========================================
   VISION DIVIDER - Elegant Separator
   ======================================== */

.vision-divider {
    width: 100px;
    height: 3px;
    margin: 40px auto;
    border-radius: 2px;
    animation: expandWidth 1s ease-out;
}

/* Dark Theme Divider */
html.theme-dark .vision-divider {
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
}

/* Light Theme Divider */
html.theme-light .vision-divider {
    background: linear-gradient(90deg, transparent, #1F75FE, transparent);
}

/* ========================================
   VISION CONTENT BLOCKS - Main Text Areas
   ======================================== */

.vision-content-block {
    margin: 30px 0;
    padding: 40px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.vision-content-block:nth-child(2) { animation-delay: 0.1s; }
.vision-content-block:nth-child(3) { animation-delay: 0.2s; }
.vision-content-block:nth-child(4) { animation-delay: 0.3s; }
.vision-content-block:nth-child(5) { animation-delay: 0.4s; }

/* Dark Theme Content Blocks */
html.theme-dark .vision-content-block {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #00d4ff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

html.theme-dark .vision-content-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

html.theme-dark .vision-content-block:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(10px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
}

html.theme-dark .vision-content-block:hover::before {
    opacity: 1;
}

/* Light Theme Content Blocks */
html.theme-light .vision-content-block {
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #1F75FE;
    box-shadow: 0 4px 20px rgba(31, 117, 254, 0.1);
}

html.theme-light .vision-content-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 117, 254, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

html.theme-light .vision-content-block:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(10px);
    box-shadow: 0 10px 40px rgba(31, 117, 254, 0.2);
}

html.theme-light .vision-content-block:hover::before {
    opacity: 1;
}

.vision-content-block p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    line-height: 1.8;
    margin: 0;
    position: relative;
    z-index: 1;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark Theme Text */
html.theme-dark .vision-content-block p {
    color: rgba(255, 255, 255, 0.9);
}

/* Light Theme Text */
html.theme-light .vision-content-block p {
    color: rgba(0, 0, 0, 0.85);
}

/* ========================================
   VISION HIGHLIGHT - Emphasized Text
   ======================================== */

.vision-highlight {
    font-weight: 600;
    position: relative;
    padding: 0 4px;
    transition: all 0.3s ease;
}

/* Dark Theme Highlight */
html.theme-dark .vision-highlight {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Light Theme Highlight */
html.theme-light .vision-highlight {
    color: #1F75FE;
    text-shadow: 0 0 10px rgba(31, 117, 254, 0.2);
}

/* ========================================
   VISION SECTION TITLES - Section Headers
   ======================================== */

.vision-section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 300;
    margin: 80px 0 40px 0;
    text-align: center;
    letter-spacing: 3px;
    position: relative;
    animation: fadeInUp 1s ease-out;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* Dark Theme Section Title */
html.theme-dark .vision-section-title {
    color: #ffffff;
}

/* Light Theme Section Title */
html.theme-light .vision-section-title {
    color: #000000;
}

.vision-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Dark Theme Title Underline */
html.theme-dark .vision-section-title::after {
    background: #00d4ff;
}

/* Light Theme Title Underline */
html.theme-light .vision-section-title::after {
    background: #1F75FE;
}

/* ========================================
   VISION SIGNATURE - Closing Statement
   ======================================== */

.vision-signature {
    text-align: center;
    margin-top: 100px;
    padding: 40px 20px;
    animation: fadeIn 2s ease-out;
}

.signature-text {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    margin-bottom: 15px;
}

/* Dark Theme Signature Text */
html.theme-dark .signature-text {
    color: rgba(255, 255, 255, 0.7);
}

/* Light Theme Signature Text */
html.theme-light .signature-text {
    color: rgba(0, 0, 0, 0.6);
}

.signature-name {
    font-family: 'Brush Script MT', cursive, 'Georgia', serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
}

/* Dark Theme Signature Name */
html.theme-dark .signature-name {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* Light Theme Signature Name */
html.theme-light .signature-name {
    color: #1F75FE;
    text-shadow: 0 0 20px rgba(31, 117, 254, 0.3);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

/* ========================================
   BACK BUTTON - Bottom Navigation
   ======================================== */

.back-button-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    pointer-events: none;
    z-index: 100;
}

.back-button {
    /* Reset button styles */
    background: none;
    border: none;
    outline: none;
    
    /* Text styling */
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 600;
    letter-spacing: 2px;
    
    /* Layout */
    padding: 12px 32px;
    cursor: pointer;
    pointer-events: auto;
    
    /* Professional subtle effects */
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Invisible background that appears on hover */
    border-radius: 8px;
}

/* Dark Theme Back Button */
html.theme-dark .back-button {
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Light Theme Back Button */
html.theme-light .back-button {
    color: #000000;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Pseudo-element for the hover/active background */
.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: -1;
    transform: scale(0.9);
}

/* Dark Theme Button Background */
html.theme-dark .back-button::before {
    background: rgba(255, 255, 255, 0.08);
}

/* Light Theme Button Background */
html.theme-light .back-button::before {
    background: rgba(0, 0, 0, 0.04);
}

/* Hover state - elegant elevation */
.back-button:hover {
    transform: translateY(-2px);
}

html.theme-dark .back-button:hover {
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.15);
}

html.theme-light .back-button:hover {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.back-button:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Active/Click state - subtle press */
.back-button:active {
    transform: translateY(1px);
}

html.theme-dark .back-button:active {
    text-shadow: 0 0.5px 1px rgba(255, 255, 255, 0.2);
}

html.theme-light .back-button:active {
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.2);
}

.back-button:active::before {
    opacity: 1;
    transform: scale(0.95);
}

html.theme-dark .back-button:active::before {
    background: rgba(255, 255, 255, 0.12);
}

html.theme-light .back-button:active::before {
    background: rgba(0, 0, 0, 0.06);
}

/* Unique ripple effect on click */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.back-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

html.theme-dark .back-button::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

html.theme-light .back-button::after {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
}

.back-button:active::after {
    animation: ripple 0.6s ease-out;
}

/* Scroll-activated hover state - applies hover styles when user scrolls (all screens including mobile) */
.back-button.scrolled {
    transform: translateY(-2px) !important;
}

html.theme-dark .back-button.scrolled {
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.15) !important;
}

html.theme-light .back-button.scrolled {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
}

.back-button.scrolled::before {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* ========================================
   RESPONSIVE DESIGN - Mobile & Tablet
   ======================================== */

@media (max-width: 1024px) {
    .vision-container {
        padding: 0 30px;
    }
    
    .vision-content-block {
        padding: 30px;
    }
    
    .vision-section-title {
        margin: 60px 0 30px 0;
    }
}

@media (max-width: 768px) {
    /* Hero Section Mobile - Match hc_chip.html */
    .hero-section {
        padding: 60px 20px 100px;
    }
    
    .hero-animation {
        width: 150px;
        height: 150px;
        margin-bottom: 30px;
    }
    
    .output {
        min-height: 150px;
    }
    
    .output h1 {
        font-size: clamp(22px, 6vw, 32px);
    }
    
    .vision-button {
        padding: 14px 40px;
        font-size: 16px;
    }
    
    .vision-section {
        padding: 80px 0;
    }
    
    .vision-container {
        padding: 0 20px;
    }
    
    .vision-quote {
        padding: 40px 15px;
        margin-bottom: 40px;
    }
    
    .vision-quote::before {
        left: 0;
        top: -10px;
    }
    
    .vision-content-block {
        padding: 25px;
        margin: 20px 0;
    }
    
    .vision-content-block:hover {
        transform: translateX(5px);
    }
    
    .vision-section-title {
        margin: 50px 0 25px 0;
        letter-spacing: 2px;
    }
    
    .vision-signature {
        margin-top: 60px;
        padding: 30px 15px;
    }
    
    .back-button-container {
        padding: 16px;
        padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    }
    
    .back-button {
        font-size: clamp(13px, 3.5vw, 16px);
        padding: 10px 28px;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    /* Hero Section Small Mobile - Match hc_chip.html */
    .hero-section {
        padding: 50px 15px 90px;
    }
    
    .hero-animation {
        width: 120px;
        height: 120px;
    }
    
    .output {
        min-height: 120px;
    }
    
    .vision-button {
        padding: 12px 32px;
        font-size: 14px;
        letter-spacing: 1.5px;
    }
    
    .vision-section {
        padding: 60px 0;
    }
    
    .vision-container {
        padding: 0 16px;
    }
    
    .vision-quote {
        padding: 30px 10px;
        margin-bottom: 30px;
    }
    
    .vision-content-block {
        padding: 20px;
        border-left-width: 3px;
    }
    
    .vision-section-title {
        margin: 40px 0 20px 0;
        letter-spacing: 1.5px;
    }
    
    .vision-signature {
        margin-top: 50px;
        padding: 25px 10px;
    }
    
    .back-button-container {
        padding: 14px;
        padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
    }
    
    .back-button {
        font-size: clamp(12px, 3.2vw, 14px);
        padding: 9px 24px;
        letter-spacing: 1.2px;
    }
}

/* ========================================
   PWA OPTIMIZATIONS
   ======================================== */

@media (display-mode: standalone) {
    .hero-section {
        padding-top: max(80px, env(safe-area-inset-top, 80px));
    }
    
    .vision-section {
        padding-top: max(100px, env(safe-area-inset-top, 100px));
        padding-bottom: max(100px, env(safe-area-inset-bottom, 100px));
    }
    
    .back-button-container {
        padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
    }
    
    .back-button {
        font-size: clamp(15px, 3vw, 19px);
        padding: 13px 36px;
    }
}

/* ========================================
   ACCESSIBILITY & REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .vision-content-block,
    .vision-quote,
    .vision-section-title,
    .vision-signature {
        animation: none;
    }
    
    .vision-content-block:hover {
        transform: none;
    }
    
    .back-button {
        transition: none;
    }
    
    .back-button:hover {
        transform: none;
    }
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */

@media (prefers-contrast: high) {
    html.theme-dark .vision-content-block {
        border-left-width: 5px;
    }
    
    html.theme-light .vision-content-block {
        border-left-width: 5px;
    }
    
    html.theme-dark .vision-highlight {
        text-shadow: none;
        text-decoration: underline;
    }
    
    html.theme-light .vision-highlight {
        text-shadow: none;
        text-decoration: underline;
    }
}
