/* ========================================
   Barnes Retina Institute — Styles
   Deep Navy + Warm Gold Palette
======================================== */

/* --- CSS Custom Properties --- */
:root {
  --navy-950: #050e1e;
  --navy-900: #0a1f44;
  --navy-800: #0f2d5e;
  --navy-700: #153a78;
  --navy-600: #1a4791;
  --navy-500: #1f54aa;
  --navy-100: #d0e0f5;
  --navy-50: #eaf2fb;
  
  --gold-600: #a8863a;
  --gold-500: #c8a45a;
  --gold-400: #d4b56e;
  --gold-300: #e0c88a;
  --gold-200: #ecd8a8;
  --gold-100: #f5edd4;
  --gold-50: #faf6ea;
  
  --neutral-900: #0f172a;
  --neutral-800: #1e293b;
  --neutral-700: #334155;
  --neutral-600: #475569;
  --neutral-500: #64748b;
  --neutral-400: #94a3b8;
  --neutral-300: #cbd5e1;
  --neutral-200: #e2e8f0;
  --neutral-100: #f1f5f9;
  --neutral-50: #f8fafc;
  --white: #ffffff;
  
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-sm: 0 1px 3px rgba(10, 31, 68, 0.08);
  --shadow-md: 0 4px 16px rgba(10, 31, 68, 0.10);
  --shadow-lg: 0 8px 32px rgba(10, 31, 68, 0.12);
  --shadow-xl: 0 16px 48px rgba(10, 31, 68, 0.14);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--neutral-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-600);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-500);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Shared --- */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-title-light {
  color: var(--white);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--neutral-600);
  line-height: 1.7;
}

.section-subtitle-light {
  color: var(--neutral-300);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}

.btn-primary:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--navy-900);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}

.btn-gold:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy-900);
}

.nav-logo:hover {
  color: var(--navy-900);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-logo-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-900);
}

.nav-logo-sub {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neutral-700);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--navy-900);
  background: var(--navy-50);
}

.nav-cta {
  background: var(--navy-900) !important;
  color: var(--white) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 20px !important;
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--navy-800) !important;
  color: var(--white) !important;
}

/* Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy-900);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(5, 14, 30, 0.92) 0%,
    rgba(10, 31, 68, 0.85) 50%,
    rgba(15, 45, 94, 0.78) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 820px;
  padding: 120px 24px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-400);
  background: rgba(200, 164, 90, 0.15);
  border: 1px solid rgba(200, 164, 90, 0.35);
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-headline em {
  font-style: normal;
  color: var(--gold-400);
}

.hero-subheadline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--neutral-300);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 56px;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-trust-item {
  text-align: center;
}

.hero-trust-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1.2;
}

.hero-trust-label {
  font-size: 0.8rem;
  color: var(--neutral-400);
  letter-spacing: 0.02em;
}

.hero-trust-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--neutral-400);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 2.5s ease-in-out infinite;
}

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

/* --- Services --- */
.services {
  background: var(--neutral-50);
}

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

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--neutral-200);
  transition: all var(--transition);
}

.service-card:hover {
  border-color: var(--gold-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-50);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  color: var(--navy-900);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.925rem;
  color: var(--neutral-600);
  line-height: 1.7;
}

/* --- Conditions Banner --- */
.conditions-banner {
  background: var(--navy-900);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.conditions-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 164, 90, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.conditions-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.conditions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.condition-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  color: var(--neutral-200);
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
}

.condition-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(200, 164, 90, 0.3);
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-image-main {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.about-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-accent {
  position: absolute;
  bottom: -32px;
  right: -32px;
  width: 55%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 4px solid var(--white);
}

.about-image-accent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-experience-badge {
  position: absolute;
  top: -20px;
  left: -20px;
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.about-exp-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.about-exp-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-content .section-tag {
  margin-bottom: 16px;
}

.about-lead {
  font-size: 1.05rem;
  color: var(--neutral-700);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-content p {
  font-size: 0.95rem;
  color: var(--neutral-600);
  line-height: 1.75;
  margin-bottom: 12px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neutral-700);
}

.about-feature svg {
  flex-shrink: 0;
}

/* --- Insurance / CTA --- */
.insurance {
  background: var(--navy-900);
  padding: 100px 0;
}

.insurance-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.insurance-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 32px 0 24px;
}

.insurance-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--neutral-200);
}

.insurance-note {
  font-size: 0.9rem;
  color: var(--neutral-400);
}

.insurance-note a {
  color: var(--gold-400);
  font-weight: 600;
}

.insurance-note a:hover {
  color: var(--gold-300);
}

.insurance-cta-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.insurance-cta-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-50);
  border-radius: 50%;
  margin: 0 auto 24px;
  color: var(--navy-900);
}

.insurance-cta-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 16px;
}

.insurance-cta-card p {
  font-size: 0.95rem;
  color: var(--neutral-600);
  line-height: 1.7;
  margin-bottom: 28px;
}

.insurance-cta-note {
  font-size: 0.8rem;
  color: var(--neutral-500);
  margin-top: 16px;
}

/* --- Contact --- */
.contact {
  background: var(--neutral-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 20px;
}

.contact-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-50);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.contact-details h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.contact-details p {
  font-size: 0.925rem;
  color: var(--neutral-600);
  line-height: 1.6;
}

.contact-details a {
  color: var(--navy-700);
  font-weight: 600;
}

.contact-details a:hover {
  color: var(--gold-600);
}

.contact-hint {
  font-size: 0.8rem;
  color: var(--neutral-500);
  margin-top: 4px;
  display: block;
}

.contact-map {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 420px;
  border: 1px solid var(--neutral-200);
}

/* --- Footer --- */
.footer {
  background: var(--navy-950);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-decoration: none;
}

.footer-logo-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.footer-logo-sub {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--neutral-400);
  line-height: 1.7;
  max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--neutral-400);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--gold-400);
}

.footer-contact p {
  font-size: 0.875rem;
  color: var(--neutral-400);
  line-height: 1.7;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-contact .footer-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-400);
  font-weight: 600;
}

.footer-contact .footer-phone:hover {
  color: var(--gold-300);
}

.footer-indent {
  margin-left: 24px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--neutral-500);
}

.footer-disclaimer {
  font-size: 0.75rem !important;
  color: var(--neutral-600) !important;
  max-width: 500px;
  text-align: right;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-900);
  color: var(--white);
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold-500);
  color: var(--navy-900);
  transform: translateY(-4px);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-grid {
    gap: 48px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 40px;
    gap: 8px;
    box-shadow: var(--shadow-xl);
    transition: right var(--transition);
    z-index: 999;
  }
  
  .nav-links.open {
    right: 0;
  }
  
  .nav-links a {
    font-size: 1rem;
    padding: 12px 16px;
    width: 100%;
  }
  
  .nav-cta {
    margin-left: 0 !important;
    margin-top: 12px;
    text-align: center;
    width: 100%;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-content {
    padding: 100px 24px 60px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }
  
  .hero-trust {
    gap: 20px;
  }
  
  .hero-trust-divider {
    display: none;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .conditions-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .about-image-wrap {
    max-width: 480px;
    margin: 0 auto;
  }
  
  .about-image-accent {
    right: -16px;
    bottom: -16px;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
  
  .insurance-inner {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-map {
    min-height: 300px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-disclaimer {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-headline {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .insurance-cta-card {
    padding: 32px 24px;
  }
}

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 14, 30, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}
