/* ========================================
   MEDCENTRIC — Design System
   Reference: aznga.com (colors, structure)
   Motion: journey-digital.com (animations)
   ======================================== */

:root {
  --color-primary: #E31837;
  --color-primary-dark: #c81430;
  --color-secondary: #1A1A2E;
  --color-bg: #FFFFFF;
  --color-bg-soft: #F7F7F8;
  --color-bg-dark: #1A1A2E;
  --color-bg-darker: #0F0F1A;
  --color-surface: #FFFFFF;
  --color-text: #1A1A2E;
  --color-text-light: #FFFFFF;
  --color-text-muted: #6B7280;
  --color-border: rgba(26,26,46,0.08);

  --font-heading: 'Montserrat', 'Helvetica Neue', sans-serif;
  --font-body: 'Open Sans', 'Helvetica', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --section-padding: clamp(80px, 10vh, 140px);
  --container-max: 1200px;
  --container-pad: clamp(24px, 4vw, 64px);
  --grid-gap: 32px;
  --nav-height: 80px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-hover: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--color-text); background: var(--color-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease-hover), opacity 0.3s var(--ease-hover); }

h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 900; }
h2 { font-size: clamp(32px, 4.5vw, 56px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }

/* LAYOUT */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); }
.section { padding: var(--section-padding) 0; }
.section--dark { background: var(--color-bg-dark); color: var(--color-text-light); }
.section--darker { background: var(--color-bg-darker); color: var(--color-text-light); }
.section--soft { background: var(--color-bg-soft); }
.section--white { background: var(--color-bg); }
.section--red { background: var(--color-primary); color: var(--color-text-light); }

/* ========================================
   HEADER
   ======================================== */
.header {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height);
  z-index: 1000; transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.header.scrolled {
  background: rgba(26,26,46,0.96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.header-inner {
  max-width: var(--container-max); margin: 0 auto;
  padding: 0 var(--container-pad); height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo {
  font-family: var(--font-heading); font-size: 24px; font-weight: 900;
  color: var(--color-text-light); letter-spacing: -0.02em;
}
.header-logo span { color: var(--color-primary); }

.header-nav { display: flex; align-items: center; gap: 36px; }
.header-nav a {
  font-family: var(--font-heading); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.8); position: relative;
  transition: color 0.3s var(--ease-hover);
}
.header-nav a:hover { color: var(--color-text-light); }
.header-nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 100%; height: 1.5px; background: var(--color-primary);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.header-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-nav a.active { color: var(--color-text-light); }
.header-nav a.active::after { transform: scaleX(1); }

.header-cta {
  color: var(--color-text-light) !important;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 28px; letter-spacing: 0.08em;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.header-cta:hover {
  background: var(--color-primary); border-color: var(--color-primary);
  transform: translateY(-1px);
}
.header-cta::after { display: none !important; }

/* Mobile Toggle */
.mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; z-index: 1001;
}
.mobile-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--color-text-light);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   HERO
   ======================================== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding-top: var(--nav-height);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(160deg, #0F0F1A 0%, #1A1A2E 35%, #1e2040 65%, #0F0F1A 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(227,24,55,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(30,32,64,0.4) 0%, transparent 60%);
}
.hero-image-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.hero-image-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(15,15,26,0.92) 0%, rgba(26,26,46,0.85) 50%, rgba(15,15,26,0.95) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 700px; padding: 0 var(--container-pad);
}
.hero h1 { color: var(--color-text-light); margin-bottom: 12px; font-weight: 900; }
.hero-tagline {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--color-text-light); font-size: clamp(24px, 3.5vw, 44px);
  display: block; margin-bottom: 28px; line-height: 1.2;
}
.hero-subtitle {
  font-size: 17px; color: rgba(255,255,255,0.65);
  max-width: 480px; margin-bottom: 36px; line-height: 1.7;
}
.hero-phone {
  font-family: var(--font-heading); font-size: clamp(22px, 3vw, 36px);
  font-weight: 800; color: var(--color-primary); margin-bottom: 36px;
  letter-spacing: -0.01em;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 16px 36px; border: none; cursor: pointer;
  transition: all 0.35s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--outlined {
  background: transparent; color: var(--color-text-light);
  border: 1px solid rgba(255,255,255,0.35);
}
.btn--outlined:hover { background: var(--color-primary); border-color: var(--color-primary); }

.btn--primary {
  background: var(--color-primary); color: var(--color-text-light);
  border: 1px solid var(--color-primary);
}
.btn--primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }

.btn--dark {
  background: var(--color-bg-dark); color: var(--color-text-light);
  border: 1px solid var(--color-bg-dark);
}
.btn--dark:hover { background: #2a2a3e; border-color: #2a2a3e; }

/* ========================================
   INTRO / TAGLINE SECTIONS
   ======================================== */
.intro-block { max-width: 900px; }
.intro-label {
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: 16px;
}
.intro-text {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(22px, 3vw, 36px); line-height: 1.35;
}
.intro-divider {
  border: none; border-top: 1px solid var(--color-border);
  margin: 48px 0;
}

/* ========================================
   SERVICES GRID
   ======================================== */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.service-card {
  background: var(--color-surface); padding: 36px 28px;
  border: 1px solid var(--color-border);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.06);
  border-color: rgba(227,24,55,0.15);
}
.service-icon {
  width: 44px; height: 44px; margin-bottom: 20px;
  color: var(--color-primary);
}
.service-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: 0; }
.service-card p { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }

/* ========================================
   STATS
   ======================================== */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--color-primary); color: var(--color-text-light);
}
.stat-item {
  padding: 48px 32px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-heading); font-size: clamp(36px, 5vw, 56px);
  font-weight: 900; line-height: 1; margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 13px; font-weight: 400; opacity: 0.85;
  letter-spacing: 0.02em;
}

/* ========================================
   STEPS / PROCESS
   ======================================== */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.step-card { position: relative; }
.step-image {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  margin-bottom: 24px; filter: grayscale(20%);
  transition: filter 0.4s var(--ease);
}
.step-card:hover .step-image { filter: grayscale(0%); }
.step-number {
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: 10px;
}
.step-card h3 { font-size: 20px; margin-bottom: 8px; }
.step-card p { font-size: 15px; color: var(--color-text-muted); line-height: 1.6; }

/* ========================================
   TEAM
   ======================================== */
.team-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 48px; max-width: 600px; margin: 0 auto;
}
.team-member { text-align: center; }
.team-photo {
  width: 160px; height: 160px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 20px;
  border: 3px solid var(--color-bg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.team-member:hover .team-photo {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.team-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.team-role { font-size: 14px; color: var(--color-text-muted); }

/* ========================================
   IMAGE DIVIDER
   ======================================== */
.image-divider {
  width: 100%; height: 50vh; min-height: 300px;
  object-fit: cover; display: block;
}
.parallax-section {
  height: 50vh; min-height: 300px;
  background-attachment: fixed; background-size: cover; background-position: center;
  position: relative;
}
.parallax-section::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(15,15,26,0.4);
}

/* ========================================
   ALTERNATING CONTENT ROWS
   ======================================== */
.content-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.content-row--reverse .content-row__text { order: 2; }
.content-row--reverse .content-row__media { order: 1; }
.content-row__number {
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: 12px;
}
.content-row__media img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
}
.content-row__media--icon {
  background: var(--color-bg-soft); padding: 64px;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4/3;
}
.content-row__media--icon svg {
  width: 80px; height: 80px; color: var(--color-primary);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section { text-align: left; }
.cta-section h2 {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--color-text-light);
  font-size: clamp(32px, 5vw, 56px); line-height: 1.15;
  margin-bottom: 16px;
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
}
.contact-detail { margin-bottom: 36px; }
.contact-detail-label {
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: 8px;
}
.contact-form {
  background: var(--color-bg-soft); padding: 44px;
  display: flex; flex-direction: column; gap: 20px;
}
.contact-form label {
  display: block; font-family: var(--font-heading);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 8px; color: var(--color-text);
}
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 14px 16px;
  font-family: var(--font-body); font-size: 15px;
  border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text);
  outline: none; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(227,24,55,0.08);
}
.contact-form textarea { resize: vertical; }

/* ========================================
   FEATURE GRID
   ======================================== */
.feature-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.feature-item {
  background: var(--color-surface); border: 1px solid var(--color-border);
  padding: 36px; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.feature-item h4 {
  font-size: 18px; font-weight: 700; margin-bottom: 10px;
  letter-spacing: 0;
}
.feature-item p { font-size: 15px; color: var(--color-text-muted); line-height: 1.6; }

/* ========================================
   CHECKLIST
   ======================================== */
.checklist { list-style: none; }
.checklist li {
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 16px; line-height: 1.7; margin-bottom: 20px;
}
.checklist-icon {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px;
  color: var(--color-primary);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--color-bg-dark); color: var(--color-text-light);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-logo {
  font-family: var(--font-heading); font-size: 28px;
  font-weight: 900; margin-bottom: 16px;
}
.footer-logo span { color: var(--color-primary); }
.footer-desc {
  font-size: 14px; color: rgba(255,255,255,0.5);
  line-height: 1.7; max-width: 320px;
}
.footer-col h5 {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 16px; color: rgba(255,255,255,0.7);
}
.footer-col a {
  display: block; font-size: 14px; color: rgba(255,255,255,0.5);
  margin-bottom: 10px; transition: color 0.3s var(--ease-hover);
}
.footer-col a:hover { color: var(--color-text-light); }
.footer-divider {
  border: none; border-top: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
}
.footer-bottom {
  display: flex; justify-content: space-between;
  align-items: center; gap: 24px; flex-wrap: wrap;
}
.footer-legal { font-size: 11px; color: rgba(255,255,255,0.35); line-height: 1.6; }
.footer-disclaimer {
  font-size: 11px; color: rgba(255,255,255,0.25);
  line-height: 1.6; margin-top: 16px; max-width: 900px;
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .reveal { animation: fadeUp 0.9s var(--ease) both; }
.hero .reveal-d1 { animation-delay: 0.12s; }
.hero .reveal-d2 { animation-delay: 0.24s; }
.hero .reveal-d3 { animation-delay: 0.36s; }
.hero .reveal-d4 { animation-delay: 0.48s; }

.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }
.reveal-d7 { transition-delay: 0.56s; }

/* Counter animation */
@keyframes countUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ========================================
   RESPONSIVE — TABLET (1024)
   ======================================== */
@media (max-width: 1024px) {
  .header-nav {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100vh; background: var(--color-bg-dark);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 28px; z-index: 999;
  }
  .header-nav.open { display: flex; }
  .header-nav a { font-size: 18px; color: var(--color-text-light); }
  .header-cta { font-size: 16px !important; padding: 14px 32px; }
  .mobile-toggle { display: flex; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.15); }
  .steps-grid { grid-template-columns: 1fr; max-width: 500px; }
  .content-row { grid-template-columns: 1fr; gap: 32px; }
  .content-row--reverse .content-row__text { order: 1; }
  .content-row--reverse .content-row__media { order: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .team-grid { max-width: 400px; }
  .parallax-section { background-attachment: scroll; }
}

/* ========================================
   RESPONSIVE — MOBILE (640)
   ======================================== */
@media (max-width: 640px) {
  :root {
    --section-padding: 56px;
    --container-pad: 20px;
  }
  .hero h1 { font-size: clamp(32px, 8vw, 44px); }
  .hero-tagline { font-size: clamp(20px, 5vw, 28px); }
  .hero-phone { font-size: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .stat-item:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
