/* Reset and Base Styles */
:root {
  --color-bg: #fdfdfd; 
  --color-bg-alt: #f1f2f3;
  --color-text: #111111;
  --color-text-muted: #666666;
  --color-primary: #9e2b38; /* Burgundy */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --border-color: #d8d8d8;
  --transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

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

/* Logo Security */
.logo img, .footer-logo {
  user-select: none;
  -webkit-user-select: none;
}

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

html { scroll-behavior: smooth; }
.container { max-width: 1200px; margin: 0 auto; width: 90%; }
.section-padding { padding: 8rem 0; }
.bg-alt { background-color: var(--color-bg-alt); }

/* Typography */
h1, h2, h3, h4 { font-weight: 500; font-family: var(--font-heading); color: var(--color-text); }
h1 { font-size: clamp(3.5rem, 7vw, 6rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; letter-spacing: 0; margin-bottom: 0.5rem; }
em { font-style: italic; color: var(--color-primary); }

.serif-heading { font-family: var(--font-heading); font-weight: 400; }
.text-primary { color: var(--color-primary); }

/* Institutional Subtitle */
.institutional-subtitle {
  font-size: 1.25rem; color: var(--color-text-muted); font-family: var(--font-body);
  font-weight: 300; max-width: 700px; line-height: 1.8;
}

.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* Buttons */
.btn-solid, .btn-solid-dark, .btn-outline, .btn-outline-white {
  display: inline-flex; justify-content: center; align-items: center;
  padding: 1rem 2.5rem; text-decoration: none; font-weight: 500; font-size: 0.95rem;
  font-family: var(--font-body); letter-spacing: 0.02em;
  transition: var(--transition); border-radius: 4px; position: relative; overflow: hidden;
}

.btn-solid { background: #fff; color: var(--color-primary); border: 1px solid #fff; }
.btn-solid:hover { background: transparent; color: #fff; }

.btn-outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.05); }

.btn-solid-dark { background: var(--color-text); color: #fff; border: 1px solid var(--color-text); }
.btn-solid-dark:hover { background: transparent; color: var(--color-text); }

.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 0.6rem 2rem; }
.btn-outline:hover { border-color: #fff; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; padding: 1.5rem 5%;
  display: flex; justify-content: space-between; align-items: center; z-index: 1000;
  background: transparent; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-item {
  color: #fff; text-decoration: none; font-weight: 500; font-size: 1rem;
  letter-spacing: 0.02em; transition: var(--transition);
}
.navbar.scrolled {
  background: var(--color-bg); border-bottom: 1px solid var(--border-color);
}
.navbar.scrolled .nav-item { color: var(--color-text); }
.navbar.scrolled .btn-outline { border-color: var(--border-color); color: var(--color-text); }

/* Hero Section */
.hero {
  min-height: 100vh; position: relative; overflow: hidden; display: flex;
  align-items: center; color: #fff;
}
.hero-bg {
  position: absolute; top: -10%; left: -10%; width: 120%; height: 120%;
  background: linear-gradient(135deg, #9e2b38 0%, #6e1e26 100%); z-index: 0;
}
.hero-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
  background-image: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
}
.hero-container { z-index: 2; position: relative; }
.hero-content {
  max-width: 900px;
}
.hero h1 {
  color: #ffffff;
}
.hero h1 em {
  font-style: normal;
  color: #ffffff;
}
.hero p {
  font-size: 1.25rem; color: rgba(255, 255, 255, 0.9); max-width: 600px;
  font-family: var(--font-body); font-weight: 300; margin-top: 2rem;
}
.hero-cta { display: flex; gap: 1.5rem; margin-top: 3rem; }

.scroll-indicator {
  position: absolute; bottom: 3rem; right: 5%; z-index: 2;
  display: flex; align-items: center; gap: 1rem; color: rgba(255,255,255,0.8);
  font-size: 0.8rem; letter-spacing: 0.1em;
  transform: rotate(90deg); transform-origin: right bottom;
}
.scroll-indicator .line {
  width: 60px; height: 1px; background: rgba(255,255,255,0.3);
  position: relative; overflow: hidden;
}
.scroll-indicator .line::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: #fff; animation: scrollLine 2s infinite ease-in-out;
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Animations */
.reveal-line { overflow: hidden; }
.reveal-line span, .reveal-line p, .reveal-line a {
  display: block; transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-title.visible .reveal-line span,
.reveal-line.visible p, .reveal-line.visible a { transform: translateY(0); }
.fade-delay p { transition-delay: 0.2s; }
.fade-delay-2.visible a { transition-delay: 0.4s; }

.reveal-fade {
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1), transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-fade.visible { opacity: 1; transform: translateY(0); }

/* Split Header */
.split-header {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  margin-bottom: 5rem; border-top: 1px solid var(--border-color); padding-top: 3rem;
}

/* Strict Grid (Institutional Bento) */
.strict-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0; border: 1px solid var(--border-color);
}
.strict-card {
  padding: 3rem 2rem; border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color); position: relative;
  background: transparent; transition: var(--transition);
}
.strict-card:last-child { border-right: none; }
.strict-card:hover { background: var(--color-bg-alt); }

.card-num {
  font-family: var(--font-heading); font-size: 2rem; font-style: italic;
  color: var(--border-color); margin-bottom: 2rem; display: block;
}
.card-content h3 { font-family: var(--font-body); font-weight: 500; font-size: 1.25rem; letter-spacing: 0.02em; }
.card-content p { color: var(--color-text-muted); font-size: 1rem; line-height: 1.7; margin-top: 1rem; }

.hover-line {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
  background: var(--color-text); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.red-line { background: var(--color-primary); }
.strict-card:hover .hover-line { transform: scaleX(1); }

/* Services Accordion */
.accordion-section {
  background-color: var(--color-bg-alt);
  clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
  padding-top: calc(8rem + 4vw); padding-bottom: 8rem;
}
.container-split {
  display: grid; grid-template-columns: 1fr 1.8fr; gap: 4rem; align-items: flex-start;
}
.split-left { position: sticky; top: 120px; }
.split-left h2 { margin-bottom: 2rem; }

.accordion-item { border-top: 1px solid var(--border-color); }
.accordion-item:last-child { border-bottom: 1px solid var(--border-color); }

.accordion-header {
  width: 100%; text-align: left; background: none; border: none; padding: 2rem 0;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--color-text); font-family: var(--font-body); font-size: 1.25rem;
  font-weight: 500; letter-spacing: 0.02em; transition: opacity 0.2s; cursor: pointer;
}
.accordion-header:hover { opacity: 0.6; }
.accordion-icon { font-size: 2rem; font-weight: 300; font-family: var(--font-heading); }

.accordion-content {
  padding-bottom: 2rem; color: var(--color-text-muted); line-height: 1.8;
  display: none; font-size: 1.05rem; animation: fadeIn 0.4s ease; max-width: 800px;
}
.accordion-content p { margin-bottom: 1.5rem; }
.accordion-content strong { color: var(--color-text); font-weight: 600; }
.accordion-item.active .accordion-content { display: block; }

/* Workflow */
.workflow-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; border-top: 1px solid var(--border-color); padding-top: 4rem;
}
.column-title {
  letter-spacing: 0.05em; font-size: 1.1rem; color: var(--color-text-muted);
  margin-bottom: 3rem; font-family: var(--font-body); font-weight: 500;
}

.institutional-list { list-style: none; }
.institutional-list li {
  display: flex; gap: 2rem; margin-bottom: 3rem; align-items: flex-start;
}
.num-wrap {
  font-family: var(--font-heading); font-size: 1.5rem; font-style: italic;
  color: var(--color-primary); flex-shrink: 0; padding-top: 0.2rem;
}
.list-body strong {
  display: block; font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--color-text);
  font-weight: 600; letter-spacing: 0.02em;
}
.list-body p { color: var(--color-text-muted); font-size: 1rem; line-height: 1.6; }

/* Contact Section */
.contact-info {
  display: flex; justify-content: center; gap: 4rem; margin-top: 4rem; flex-wrap: wrap; letter-spacing: 0.02em; font-size: 1.05rem; font-weight: 500;
}
.contact-item a, .contact-item span { color: var(--color-text); text-decoration: none; transition: var(--transition); border-bottom: 1px solid transparent; padding-bottom: 0.2rem; }
.contact-item a:hover { border-bottom-color: var(--color-primary); color: var(--color-primary); }

/* Footer */
.footer {
  padding: 3rem 5%; border-top: 1px solid var(--border-color); background: var(--color-bg);
}
.flex-footer { display: flex; justify-content: space-between; align-items: center; }
.footer p { color: var(--color-text-muted); font-size: 0.9rem; letter-spacing: 0.05em; }
.footer-logo { opacity: 0.9; mix-blend-mode: multiply; }

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle .bar {
  height: 2px;
  width: 100%;
  background-color: #fff;
  transition: all 0.3s ease;
}
.navbar.scrolled .menu-toggle .bar {
  background-color: var(--color-text);
}
.menu-toggle.is-active .bar {
  background-color: #ffffff !important;
}
.menu-toggle.is-active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
body.no-scroll {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 900px) {
  .split-header, .workflow-grid, .container-split { grid-template-columns: 1fr; gap: 2rem; }
  .split-left { position: relative; top: 0; }
  .strict-card { border-right: none; }
  .contact-info { gap: 2rem; flex-direction: column; align-items: center; }
  .flex-footer { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 768px) {
  .navbar { border-bottom: none; }
  .section-padding { padding: 4rem 0; }
  .hero-content { padding-top: 5rem; }
  .hero-cta { flex-direction: column; gap: 1rem; width: 85%; }
  .hero-cta a { width: 100%; }
  
  .scroll-indicator { 
    right: 1.5rem; 
    bottom: 6rem; 
  }
  
  .menu-toggle { display: flex; }
  
  /* Dim background overlay */
  .menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
  }
  .menu-overlay.is-active {
    opacity: 1; visibility: visible;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 75%;
    max-width: 350px;
    height: 100vh;
    background-color: #111111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 2rem;
    gap: 3rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.4s;
    z-index: 999;
    box-shadow: none;
  }
  
  .nav-links.is-active {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }
  
  .nav-item {
    font-size: 2rem;
    color: #ffffff !important;
  }
  
  /* Mobile menu button reset */
  .btn-outline#nav-btn {
    border: none;
    color: #ffffff !important;
    font-size: 2rem;
    padding: 0;
  }
}

/* Scroll To Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(20px);
}
.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-to-top:hover {
  background-color: var(--color-text);
  color: white;
  transform: translateY(-5px);
}
