/* ============================================
   SOMNIA HEALTH PARTNERS
   Light body + Dark hero/header/footer
   Smooth animations, parallax, premium feel
   ============================================ */

:root {
  --bg-dark: #0b1221;
  --bg-dark-secondary: #0f1a2e;
  --bg-dark-card: #131f36;
  --bg-light: #ffffff;
  --bg-light-alt: #f5f7fa;
  --bg-light-card: #ffffff;
  --accent: #00b894;
  --accent-dim: rgba(0, 184, 148, 0.08);
  --accent-glow: rgba(0, 184, 148, 0.2);
  --accent-secondary: #0984e3;
  --text-white: #ffffff;
  --text-white-secondary: rgba(255, 255, 255, 0.75);
  --text-white-muted: rgba(255, 255, 255, 0.4);
  --text-dark: #1a2744;
  --text-dark-secondary: #4a5e7a;
  --text-dark-muted: #8a9ab5;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-light: #e8edf3;
  --gradient-accent: linear-gradient(135deg, #00b894 0%, #0984e3 100%);
  --gradient-dark: linear-gradient(135deg, #0b1221 0%, #162544 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.3s var(--ease-out); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* --- Navigation (Dark, Insight-style) --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.4s var(--ease-out);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled .nav-brand { color: var(--text-dark); }
.navbar.scrolled .nav-links a { color: var(--text-dark); }
.navbar.scrolled .nav-links a:hover { color: var(--accent); }
.navbar.scrolled .nav-toggle span { background: var(--text-dark); }
.navbar.scrolled .nav-cta { border-color: var(--accent) !important; color: var(--accent) !important; }
.navbar.scrolled .nav-cta:hover { background: var(--accent) !important; color: #ffffff !important; }

.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.nav-brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--text-white); }

.brand-mark {
  width: 36px; height: 36px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: var(--bg-dark);
}

.nav-links { display: flex; align-items: center; gap: 2.5rem; list-style: none; }

.nav-links a {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-white-secondary);
  transition: color 0.3s var(--ease-out);
  position: relative;
}

.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.nav-links a::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  padding: 0.6rem 1.5rem !important;
  border: 1px solid var(--accent) !important;
  border-radius: 4px;
  color: var(--accent) !important;
  font-size: 0.78rem !important;
  transition: all 0.3s var(--ease-out) !important;
}

.nav-cta:hover { background: var(--accent) !important; color: var(--bg-dark) !important; }
.nav-cta::after { display: none !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text-white); transition: all 0.3s var(--ease-out); border-radius: 2px; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section (Dark) --- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: 80px;
  background: var(--gradient-dark);
  color: var(--text-white);
}

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

.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(0, 184, 148, 0.08) 0%, transparent 55%),
              radial-gradient(ellipse at 20% 80%, rgba(9, 132, 227, 0.05) 0%, transparent 50%);
  z-index: 1;
}

.hero-bg-image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.12;
  transition: transform 0.1s linear;
}

.hero-grid-pattern {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
}

.hero-content { position: relative; z-index: 2; max-width: 800px; }

.hero-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 2rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-label::before {
  content: ''; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.03em; margin-bottom: 1.5rem;
  color: var(--text-white);
  opacity: 0; transform: translateY(30px);
  animation: fadeInUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero h1 .accent-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem; color: var(--text-white-secondary);
  max-width: 560px; line-height: 1.7; margin-bottom: 2.5rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-buttons {
  display: flex; gap: 1rem; flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out) 0.8s forwards;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.05em; border-radius: 4px;
  border: none; cursor: pointer;
  transition: all 0.3s var(--ease-out); text-transform: uppercase;
  font-family: var(--font-body);
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: #00d4a8; box-shadow: 0 0 30px var(--accent-glow); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--text-white); border: 1px solid rgba(255,255,255,0.25); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-outline-dark { background: transparent; color: var(--text-dark); border: 1px solid var(--border-light); }
.btn-outline-dark:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-full { width: 100%; justify-content: center; }

/* --- Stats Bar (Dark) --- */
.stats-bar {
  padding: 4rem 0;
  background: var(--bg-light-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-item { position: relative; }
.stat-item:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 50%; background: var(--border-light); }
.stat-number { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--accent); margin-bottom: 0.25rem; }
.stat-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dark-muted); }

/* --- Light Sections (Body content) --- */
.section {
  padding: 6rem 0;
  position: relative;
  background: var(--bg-light);
  color: var(--text-dark);
}

.section-alt {
  background: var(--bg-light-alt);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-white); }
.section-dark p { color: var(--text-white-secondary); }

.section-header { max-width: 640px; margin-bottom: 3.5rem; }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }

.text-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}

.text-label::before { content: ''; width: 20px; height: 1px; background: var(--accent); }

.text-accent { color: var(--accent); }

h2 { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1rem; color: var(--text-dark); }
h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.75rem; color: var(--text-dark); }
h4 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; color: var(--text-dark); }

/* --- Philosophy Grid (Left-aligned) --- */
.philosophy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.philosophy-content p { color: var(--text-dark-secondary); font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.5rem; }
.philosophy-image { border-radius: 8px; overflow: hidden; position: relative; box-shadow: var(--shadow-lg); }
.philosophy-image img { width: 100%; height: 400px; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.philosophy-image:hover img { transform: scale(1.03); }

/* --- Focus Cards (Light background) --- */
.focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.focus-card {
  background: var(--bg-light-card);
  border: 1px solid var(--border-light);
  border-radius: 8px; padding: 2.5rem;
  transition: all 0.4s var(--ease-out);
  position: relative; overflow: hidden;
}

.focus-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-accent); opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.focus-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.focus-card:hover::before { opacity: 1; }

.focus-card .card-number { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: rgba(0, 184, 148, 0.15); margin-bottom: 1rem; }
.focus-card h4 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text-dark); }
.focus-card p { color: var(--text-dark-secondary); font-size: 0.92rem; line-height: 1.7; margin-bottom: 1.25rem; }

.card-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.card-tag { font-size: 0.7rem; font-weight: 600; padding: 0.35rem 0.75rem; background: var(--accent-dim); color: var(--accent); border-radius: 3px; letter-spacing: 0.02em; display: inline-block; }

/* --- Approach Steps (Dark section) --- */
.approach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.approach-step {
  padding: 2rem; border: 1px solid var(--border-light);
  border-radius: 8px; transition: all 0.4s var(--ease-out);
  background: var(--bg-light-card);
}

.approach-step:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.approach-step .step-number {
  font-family: var(--font-heading); font-size: 2rem; font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1rem;
}

.approach-step h4 { margin-bottom: 0.75rem; color: var(--text-dark); }
.approach-step p { color: var(--text-dark-secondary); font-size: 0.88rem; line-height: 1.7; }

/* --- CTA Section (Dark) --- */
.cta-section {
  padding: 7rem 0; text-align: center;
  position: relative; overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-white);
}

.cta-section::before {
  content: ''; position: absolute;
  top: -50%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.4; pointer-events: none;
}

.cta-content { position: relative; z-index: 1; }
.cta-content h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; color: var(--text-white); }
.cta-content p { color: var(--text-white-secondary); font-size: 1.1rem; max-width: 500px; margin: 0 auto 2.5rem; line-height: 1.7; }

/* --- Portfolio Grid (Light) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
  background: var(--bg-light-card);
  border: 1px solid var(--border-light);
  border-radius: 8px; padding: 2rem;
  transition: all 0.4s var(--ease-out);
}

.portfolio-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.portfolio-card .card-tag { margin-bottom: 1rem; }
.portfolio-card h4 { margin-bottom: 0.75rem; font-size: 1.1rem; color: var(--text-dark); }
.portfolio-card p { color: var(--text-dark-secondary); font-size: 0.88rem; line-height: 1.7; }

/* --- Values Grid (Light) --- */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.value-card { padding: 2.5rem; border: 1px solid var(--border-light); border-radius: 8px; transition: all 0.4s var(--ease-out); background: var(--bg-light-card); }
.value-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.value-icon {
  width: 48px; height: 48px;
  background: var(--accent-dim); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem; color: var(--accent);
}

.value-card h4 { margin-bottom: 0.75rem; color: var(--text-dark); }
.value-card p { color: var(--text-dark-secondary); font-size: 0.9rem; line-height: 1.7; }

/* --- Team Grid (Light) --- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.team-card { text-align: center; padding: 2.5rem 2rem; border: 1px solid var(--border-light); border-radius: 8px; transition: all 0.4s var(--ease-out); background: var(--bg-light-card); }
.team-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.team-avatar {
  width: 80px; height: 80px;
  background: var(--gradient-accent); border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: #ffffff;
}

.team-card h4 { margin-bottom: 0.25rem; color: var(--text-dark); }
.team-card .team-role { font-size: 0.85rem; color: var(--accent); font-weight: 500; }

/* --- Contact Grid (Light) --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.contact-info h3 { font-size: 1.75rem; margin-bottom: 1rem; color: var(--text-dark); }

.contact-detail { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.contact-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}
.contact-detail h5 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dark-muted); margin-bottom: 0.25rem; }
.contact-detail p { color: var(--text-dark); font-size: 0.95rem; margin: 0; }

.contact-areas { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border-light); }
.contact-areas h5 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-dark); }

.interest-list { list-style: none; padding: 0; }
.interest-list li {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.9rem; color: var(--text-dark-secondary);
  margin-bottom: 0.6rem; padding: 0.4rem 0;
}
.interest-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  flex-shrink: 0;
}

/* --- Contact Form (Light) --- */
.contact-form-wrap {
  background: var(--bg-light-alt);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2.5rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em; color: var(--text-dark-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--bg-light); border: 1px solid var(--border-light);
  border-radius: 4px; color: var(--text-dark);
  font-size: 0.92rem; font-family: var(--font-body);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dark-muted); }

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a5e7a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}

/* --- Page Header (Dark) --- */
.page-header {
  padding: 10rem 0 4rem; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0b1221 0%, #142440 50%, #0f2b4c 100%);
  color: var(--text-white);
}

.page-header::before {
  content: ''; position: absolute;
  top: 0; right: 0; width: 50%; height: 100%;
  background: radial-gradient(ellipse at 80% 30%, rgba(0, 184, 148, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.page-header .text-label { opacity: 0; transform: translateY(20px); animation: fadeInUp 0.6s var(--ease-out) 0.1s forwards; }

.page-header h1 {
  font-family: var(--font-heading); font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
  margin-bottom: 1rem; max-width: 700px;
  color: var(--text-white);
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.6s var(--ease-out) 0.2s forwards;
}

.page-header p {
  font-size: 1.1rem; color: var(--text-white-secondary);
  max-width: 560px; line-height: 1.7;
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.6s var(--ease-out) 0.3s forwards;
}

/* --- Legal Pages --- */
.legal-content {
  padding: 4rem 0;
  max-width: 800px;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p {
  color: var(--text-dark-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-content ul {
  color: var(--text-dark-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content ul li { margin-bottom: 0.5rem; }

.legal-content strong { color: var(--text-dark); }

/* --- Footer (Dark, Insight-style) --- */
.footer { background: var(--bg-dark); border-top: 1px solid var(--border-dark); padding: 5rem 0 2rem; color: var(--text-white); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand .brand-text { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-white); }
.footer-brand p { color: var(--text-white-muted); font-size: 0.88rem; line-height: 1.7; max-width: 300px; }
.footer-col h5 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-white-muted); margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a { font-size: 0.9rem; color: var(--text-white-secondary); transition: color 0.3s var(--ease-out); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--border-dark); }
.footer-bottom p { font-size: 0.82rem; color: var(--text-white-muted); }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-size: 0.82rem; color: var(--text-white-muted); transition: color 0.3s var(--ease-out); }
.footer-legal a:hover { color: var(--accent); }

/* --- Scroll-to-top --- */
.scroll-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent); color: #ffffff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease-out); z-index: 999;
}

.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 0 20px var(--accent-glow); }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.fade-in-left.visible { opacity: 1; transform: translateX(0); }

.fade-in-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; }


/* --- Responsive --- */
@media (max-width: 1024px) {
  .philosophy-grid { grid-template-columns: 1fr; gap: 3rem; }
  .focus-grid { grid-template-columns: 1fr; }
  .approach-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .nav-links {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-dark);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 2rem; z-index: 998;
  }
  .nav-links.active { display: flex; }
  .nav-links a { font-size: 1.2rem; }
  .nav-toggle { display: flex; z-index: 999; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .stat-item:not(:last-child)::after { display: none; }
  .approach-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .section { padding: 4rem 0; }
  .page-header { padding: 8rem 0 3rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 100px; }
}
