/* ============================================================
   M2STrinity — Modern Professional Stylesheet
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Palette — deep navy foundation with warm slate accents */
  --navy-900: #0c1829;
  --navy-800: #132238;
  --navy-700: #1b2f4a;
  --navy-600: #264069;
  --navy-500: #335c8e;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --accent: #9a7b4f; /* muted brass / warm gold */
  --accent-hover: #7d6340;
  --white: #ffffff;
  --black: #000000;

  /* Typography */
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;

  /* Spacing & Sizes */
  --header-h: 72px;
  --section-py: clamp(80px, 10vw, 130px);
  --container-w: 1200px;
  --radius: 12px;
  --radius-sm: 8px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.4s;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--slate-600);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  font-family: inherit;
}
address {
  font-style: normal;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}
#header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--slate-200);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  transition: opacity var(--duration) var(--ease);
}
.logo:hover .logo-img {
  opacity: 0.85;
}

/* Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links li a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy-700);
  border-radius: 6px;
  transition:
    color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--navy-900);
  background: var(--slate-100);
}
.nav-cta {
  background: var(--navy-700) !important;
  color: var(--white) !important;
  border-radius: 6px !important;
}
.nav-cta:hover {
  background: var(--navy-900) !important;
}

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--navy-700);
  border-radius: 2px;
  transition:
    transform 0.35s var(--ease),
    opacity 0.25s var(--ease);
  transform-origin: center;
}
.burger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  padding: var(--header-h) 24px 60px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    var(--navy-900) 0%,
    var(--navy-700) 60%,
    var(--navy-600) 100%
  );
  z-index: 0;
}
/* Subtle geometric pattern overlay */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.04) 0%,
      transparent 50%
    );
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 24, 41, 0.4) 0%,
    rgba(12, 24, 41, 0.15) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  color: var(--slate-200);
  margin-bottom: 40px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(154, 123, 79, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  position: relative;
}
.scroll-indicator span::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(10px);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================================
   SECTION SYSTEM
   ============================================================ */
.section {
  padding: var(--section-py) 0;
}
.section--alt {
  background: var(--slate-50);
}
.section--dark {
  background: var(--navy-900);
  color: var(--slate-200);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-tag--light {
  color: var(--accent);
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.section-title--light {
  color: var(--white);
}
.section-rule {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 20px;
  border-radius: 2px;
}
.section-rule--light {
  background: var(--accent);
}
.section-subtitle {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--slate-400);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}
.about-text p {
  font-size: 1.05rem;
  margin-bottom: 18px;
  color: var(--slate-600);
}
.about-text p:last-child {
  margin-bottom: 0;
}

/* Founder Card */
.founder-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.founder-accent {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(to bottom, var(--accent), var(--navy-600));
}
.founder-body {
  padding: 36px 36px 36px 42px;
}
.founder-body h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--navy-800);
  margin-bottom: 16px;
}
.founder-body p {
  margin-bottom: 14px;
  font-size: 0.98rem;
  color: var(--slate-600);
}
.founder-body p:last-child {
  margin-bottom: 0;
}

/* Mission & Vision */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.mv-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
  text-align: center;
  border-top: 3px solid var(--navy-600);
  transition:
    transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}
.mv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}
.mv-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--accent);
  font-size: 1.3rem;
}
.mv-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy-800);
  margin-bottom: 12px;
}
.mv-card p {
  font-size: 0.95rem;
  color: var(--slate-600);
}

/* ============================================================
   CARDS GRID (Services, Solutions, Achievements)
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  transition:
    transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color var(--duration) var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}
.card:hover::before {
  border-color: var(--slate-200);
}
.card--featured {
  border-top: 3px solid var(--accent);
}
.card-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--navy-600);
  font-size: 1.5rem;
  transition:
    background var(--duration) var(--ease),
    color var(--duration) var(--ease);
}
.card:hover .card-icon {
  background: var(--navy-700);
  color: var(--white);
}
.card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy-800);
  margin-bottom: 14px;
}
.card p {
  font-size: 0.95rem;
  color: var(--slate-600);
  line-height: 1.65;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding: 48px 40px;
  background: var(--navy-800);
  border-radius: var(--radius);
}
.stat {
  text-align: center;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--slate-400);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.contact-item i {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 4px;
}
.contact-item a,
.contact-item address {
  color: var(--slate-200);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: color var(--duration) var(--ease);
  overflow-wrap: anywhere;
}
.contact-item a:hover {
  color: var(--accent);
}

.contact-direct {
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--slate-200);
}
.contact-direct h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--white);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.privacy-link,
.privacy-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-content {
  max-width: 800px;
  overflow-wrap: anywhere;
}
.privacy-content h3 {
  margin-bottom: 12px;
  color: var(--navy-800);
}
.privacy-content p + h3 {
  margin-top: 28px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--navy-900);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  height: 36px;
  width: auto;
  opacity: 0.55;
  filter: brightness(0) invert(1);
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--slate-400);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal.visible {
  animation: reveal-in 0.7s var(--ease);
}
@keyframes reveal-in {
  from {
    transform: translateY(20px);
  }
  to {
    transform: translateY(0);
  }
}

/* Staggered children in grids */
.cards-grid .card.reveal:nth-child(2) {
  animation-delay: 0.12s;
}
.cards-grid .card.reveal:nth-child(3) {
  animation-delay: 0.24s;
}
.mv-grid .mv-card.reveal:nth-child(2) {
  animation-delay: 0.12s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  /* Mobile nav */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 80vw);
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(var(--header-h) + 24px) 24px 24px;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    z-index: 999;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links li a {
    display: block;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .burger {
    display: flex;
    z-index: 1001;
  }

  html:not(.nav-ready) #header {
    position: static;
    height: auto;
  }
  html:not(.nav-ready) .header-inner {
    flex-direction: column;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  html:not(.nav-ready) .nav-links {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    box-shadow: none;
    transform: none;
  }
  html:not(.nav-ready) .burger {
    display: none;
  }

  /* Mobile overlay */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }
  .nav-backdrop.active {
    opacity: 1;
    pointer-events: all;
  }

  .hero-content h1 {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .mv-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .stats-bar {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .card {
    padding: 32px 24px;
  }
  .founder-body {
    padding: 28px 24px 28px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
