:root {
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-light-gray: #f1f5f9;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-dark: #0f172a;
    
    --accent-blue: #0ea5e9;
    --accent-blue-dark: #0284c7;
    --accent-blue-light: #e0f2fe;
    
    --accent-gold: #f59e0b;
    --accent-gold-dark: #d97706;
    
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); color: var(--text-main); background-color: var(--bg-white); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.2; color: var(--text-dark); }
a { color: var(--accent-blue); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-blue-dark); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.bg-light-gray { background-color: var(--bg-light-gray); }
.section-header { margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-header .subtitle { font-size: 1.125rem; color: var(--text-muted); }
.text-center { text-align: center; }

/* Skip Link Accessibility */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--accent-blue); color: white; padding: 8px; z-index: 10000; transition: top 0.2s; }
.skip-link:focus { top: 0; }

*:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

/* CINEMATIC INTRO */
.cinematic-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; background: var(--bg-white); display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s ease; pointer-events: none; }
.intro-eyelid { position: absolute; left: 0; right: 0; height: 50vh; background: #0f172a; z-index: 2; transition: transform 2s cubic-bezier(0.25, 1, 0.5, 1); }
.intro-eyelid.upper { top: 0; transform-origin: top; animation: openUpper 2.5s forwards; }
.intro-eyelid.lower { bottom: 0; transform-origin: bottom; animation: openLower 2.5s forwards; }
.intro-eye { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 100px; border-radius: 50%; background: #ffffff; overflow: hidden; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 50px rgba(14, 165, 233, 0.3); z-index: 1; }
.intro-iris { width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, #0ea5e9 0%, #0284c7 100%); display: flex; justify-content: center; align-items: center; }
.intro-pupil { width: 30px; height: 30px; border-radius: 50%; background: #0f172a; animation: pulsePupil 2s infinite alternate; }
.intro-text { position: absolute; bottom: 20%; text-align: center; z-index: 3; animation: fadeOut 2.5s forwards; }
.intro-text h2 { color: #ffffff; margin-bottom: 0.5rem; }
.intro-text p { color: #94a3b8; }

@keyframes openUpper { 0% { transform: translateY(0); } 20% { transform: translateY(0); } 100% { transform: translateY(-100%); } }
@keyframes openLower { 0% { transform: translateY(0); } 20% { transform: translateY(0); } 100% { transform: translateY(100%); } }
@keyframes pulsePupil { 0% { transform: scale(1); } 100% { transform: scale(1.2); } }
@keyframes fadeOut { 0% { opacity: 1; } 60% { opacity: 1; } 100% { opacity: 0; } }

/* HEADER */
.main-header { padding: 4rem 0 3rem; text-align: center; border-bottom: 1px solid #e2e8f0; }
.logo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--accent-gold-dark); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 2px; }
.fw-light { font-weight: 300; }
.main-header h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.main-header p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.btn-outline { background: transparent; border: 1px solid #e2e8f0; padding: 0.5rem 1rem; border-radius: var(--radius-md); font-family: var(--font-sans); cursor: pointer; color: var(--text-main); font-weight: 500; transition: all 0.2s; }
.btn-outline:hover { background: var(--bg-light); border-color: var(--text-muted); }

/* VISION SIMULATOR */
.vision-simulator { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.eye-diagram-container { background: var(--bg-light); border-radius: var(--radius-xl); padding: 1rem; border: 1px solid #e2e8f0; position: relative; }
.eye-diagram { width: 100%; height: auto; display: block; }

/* SVG Light Journey Animations */
.beam, .beam-step-3-flash, .signal { opacity: 0; transition: opacity 0.3s ease; }
#anim-eye-structure path, #anim-eye-structure circle, #anim-eye-structure ellipse { transition: all 0.5s ease; }

[data-current-step="1"] .beam-step-1 { opacity: 1; stroke-dasharray: 500; stroke-dashoffset: 500; animation: drawBeam 1s forwards; }
[data-current-step="1"] .anim-cornea { stroke: var(--accent-blue-dark); stroke-width: 10; fill: var(--accent-blue-light); }

[data-current-step="2"] .beam-step-1 { opacity: 1; }
[data-current-step="2"] .beam-step-2 { opacity: 1; stroke-dasharray: 400; stroke-dashoffset: 400; animation: drawBeam 1s forwards; }
[data-current-step="2"] .anim-cristalino { fill: #fef3c7; stroke: var(--accent-gold-dark); stroke-width: 4; }

[data-current-step="3"] .beam-step-1, [data-current-step="3"] .beam-step-2 { opacity: 1; }
[data-current-step="3"] .beam-step-3-flash { animation: flashPulse 1s ease-out forwards; }
[data-current-step="3"] .anim-retina { stroke: var(--accent-gold); stroke-width: 10; }
[data-current-step="3"] .anim-macula { fill: var(--accent-gold-dark); r: 25; }

[data-current-step="4"] .signal { opacity: 1; animation: dashSignal 1.5s linear infinite; }
[data-current-step="4"] .anim-nervo { fill: var(--accent-blue-light); stroke: var(--accent-blue-dark); stroke-width: 5; }

@keyframes drawBeam { to { stroke-dashoffset: 0; } }
@keyframes flashPulse { 0% { opacity: 0; transform: scale(0.5); transform-origin: 570px 300px; } 50% { opacity: 1; transform: scale(1.5); } 100% { opacity: 0.6; transform: scale(1); } }
@keyframes dashSignal { to { stroke-dashoffset: -40; } }

.vision-steps { display: flex; flex-direction: column; gap: 1rem; }
.step-card { background: var(--bg-white); border: 1px solid #e2e8f0; padding: 1.5rem; border-radius: var(--radius-lg); transition: all 0.3s ease; cursor: pointer; text-align: left; }
.step-card:hover { transform: translateX(5px); box-shadow: var(--shadow-sm); border-color: var(--accent-blue-light); }
.step-card.active { border-color: var(--accent-blue); box-shadow: var(--shadow-md); background: #f0f9ff; }
.step-icon { width: 32px; height: 32px; background: var(--text-muted); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 0.5rem; transition: background 0.3s; }
.step-card.active .step-icon { background: var(--accent-blue); }

/* INTERACTIVE SIMULATORS & SURGERIES */
.simulators-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.controls-panel h3 { font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--text-dark); border-bottom: 2px solid var(--accent-blue-light); padding-bottom: 0.5rem; }
.slider-group { margin-bottom: 1.5rem; }
.slider-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.slider-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
input[type="range"] { width: 100%; cursor: pointer; accent-color: var(--accent-blue); }
.control-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

.surgery-buttons { display: flex; flex-direction: column; gap: 0.75rem; }
.btn-surgery { background: var(--bg-white); border: 1px solid var(--accent-blue); color: var(--accent-blue-dark); padding: 0.75rem 1rem; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-surgery:hover { background: var(--accent-blue); color: #fff; }

.visual-panel { background: var(--bg-white); border: 1px solid #e2e8f0; border-radius: var(--radius-xl); padding: 1.5rem; box-shadow: var(--shadow-md); }
.sim-scene { position: relative; width: 100%; }
.sim-message { position: absolute; bottom: 10px; left: 10px; right: 10px; background: rgba(255,255,255,0.9); padding: 0.5rem; border-radius: var(--radius-md); font-size: 0.85rem; text-align: center; font-weight: 500; border: 1px solid #e2e8f0; }

/* ATLAS V2 */
.atlas-categories { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 3rem; }
.cat-btn { background: #fff; border: 1px solid #e2e8f0; padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; font-weight: 500; transition: all 0.2s; color: var(--text-muted); }
.cat-btn:hover { border-color: var(--accent-blue); color: var(--text-main); }
.cat-btn.active { background: var(--text-dark); color: #fff; border-color: var(--text-dark); }

.atlas-container { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
.atlas-svg-col { background: var(--bg-light); border-radius: var(--radius-xl); padding: 2rem; border: 1px solid #e2e8f0; }
.eye-part { transition: all 0.3s ease; }
.eye-parts-group.has-selection .eye-part:not(.selected) { opacity: 0.2; }
.eye-parts-group.has-selection .eye-part.selected { stroke-width: calc(inherit + 4px); filter: drop-shadow(0 0 5px rgba(14,165,233,0.5)); }

.atlas-list-wrapper { background: var(--bg-light); padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid #e2e8f0; margin-bottom: 1.5rem; }
.atlas-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.atlas-btn { background: #fff; border: 1px solid #cbd5e1; color: var(--text-main); padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.atlas-btn:hover { border-color: var(--accent-blue); background: var(--accent-blue-light); }
.atlas-btn.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); font-weight: 600; box-shadow: 0 4px 6px rgba(14,165,233,0.2); }

.atlas-content-box { background: var(--bg-white); border: 1px solid #e2e8f0; padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-height: 400px; animation: fadeIn 0.4s ease-out; }
.badge-cat { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: var(--accent-blue-dark); letter-spacing: 1px; display: block; margin-bottom: 0.5rem; }
.atlas-content-box h3 { font-size: 1.75rem; color: var(--text-dark); margin-bottom: 1rem; }
.atlas-main-desc { font-size: 1rem; color: var(--text-main); margin-bottom: 2rem; }

/* WOW FACTS ACCORDION */
.atlas-wow-box { background: #fffbeb; border-left: 4px solid var(--accent-gold); padding: 1.5rem; border-radius: 0 8px 8px 0; }
.atlas-wow-box > strong { color: var(--accent-gold-dark); font-family: var(--font-display); font-size: 1.25rem; display: block; margin-bottom: 1rem; }
.wow-fact-item { margin-bottom: 0.5rem; border-bottom: 1px solid rgba(217, 119, 6, 0.2); padding-bottom: 0.5rem; }
.wow-fact-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.wow-fact-toggle { width: 100%; text-align: left; background: none; border: none; font-weight: 600; color: var(--text-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; font-family: var(--font-sans); font-size: 0.95rem; }
.wow-fact-toggle:hover { color: var(--accent-gold-dark); }
.wow-fact-desc { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.wow-fact-toggle[aria-expanded="true"] + .wow-fact-desc { max-height: 500px; }
.wow-fact-desc p { padding: 0.5rem 0 1rem 1rem; font-size: 0.85rem; color: var(--text-main); border-left: 2px solid rgba(217, 119, 6, 0.4); margin-left: 5px; }

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

/* DOCTORS CLUSTERS */
.doctors-clusters { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.doc-cluster { background: var(--bg-white); padding: 2rem; border-radius: var(--radius-lg); border: 1px solid #e2e8f0; box-shadow: var(--shadow-sm); }
.cluster-title { font-size: 1.25rem; color: var(--accent-blue-dark); border-bottom: 2px solid var(--accent-blue-light); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.cluster-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.doctor-card { display: block; background: var(--bg-light); border: 1px solid #e2e8f0; border-radius: var(--radius-md); padding: 1.5rem; transition: all 0.2s; text-decoration: none; position: relative; }
.doctor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-blue); }
.doctor-pill h4 { font-size: 1.125rem; color: var(--text-dark); margin-bottom: 0.25rem; }
.specialty { font-size: 0.85rem; color: var(--text-main); font-weight: 500; margin-bottom: 0.25rem; }
.credentials { font-size: 0.75rem; color: var(--text-muted); }
.cta { display: block; margin-top: 1rem; font-size: 0.85rem; font-weight: 600; color: var(--accent-blue); }

/* FAQ SECTION */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 1rem; border: 1px solid #e2e8f0; border-radius: var(--radius-md); background: var(--bg-white); }
.faq-question { width: 100%; text-align: left; padding: 1.25rem 1.5rem; background: none; border: none; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--text-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: "+"; font-size: 1.5rem; color: var(--accent-blue); transition: transform 0.3s ease; }
.faq-question[aria-expanded="true"]::after { transform: rotate(45deg); color: var(--accent-gold-dark); }
.faq-answer { padding: 0 1.5rem; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-muted); }
.faq-answer.open { padding: 0 1.5rem 1.25rem 1.5rem; max-height: 500px; }

/* FOOTER */
.main-footer { background: var(--bg-light); border-top: 1px solid #e2e8f0; color: var(--text-muted); text-align: center; padding: 3rem 0; font-size: 0.875rem; }
.references-list ul { list-style: none; padding: 0; }
.references-list li { margin-bottom: 0.25rem; }

/* REDUCED MOTION FALLBACK */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .cinematic-overlay { display: none !important; }
}

@media (max-width: 992px) {
    .vision-simulator, .simulators-grid, .atlas-container { grid-template-columns: 1fr; }
}
