/* ============================================
   Real Soluplus — Premium Stylesheet
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--gray-600);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- CSS Variables --- */
:root {
  --navy: #0d1b2a;
  --navy-light: #1b2d45;
  --blue: #1a3a6b;
  --red: #c41e2a;
  --red-hover: #a81822;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #e9ecef;
  --gray-600: #5a6577;
  --gray-900: #1a1a2e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 12px 32px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1200px;
  --nav-height: 80px;
}

/* --- Typography --- */
h1, h2 { font-family: 'DM Serif Display', serif; font-weight: 400; line-height: 1.15; color: var(--gray-900); }
h1 { font-size: 3.5rem; }
h2 { font-size: 2.75rem; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; color: var(--gray-900); }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--gray-600); }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section--gray { background: var(--gray-50); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* --- Section Header with Accent Line --- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header::before {
  content: ''; display: block; width: 40px; height: 3px;
  background: var(--red); margin: 0 auto 16px;
}
.section-header p { max-width: 640px; margin: 12px auto 0; }

/* --- Navigation --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(13,27,42,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: rgba(255,255,255,0.1);
}
.nav__inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav__logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem; font-weight: 400; color: var(--white);
}
.nav__logo span { color: var(--red); }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--white); }
.nav__cta {
  background: var(--red); color: var(--white) !important;
  padding: 10px 24px; border-radius: 6px; font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s;
}
.nav__cta:hover { background: var(--red-hover); transform: scale(1.02); }
.nav__hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; align-items: center; justify-content: center;
}
.nav__hamburger span {
  display: block; width: 24px; height: 2px; background: var(--white);
  position: relative; transition: all 0.3s;
}
.nav__hamburger span::before,
.nav__hamburger span::after {
  content: ''; position: absolute; width: 24px; height: 2px;
  background: var(--white); transition: all 0.3s;
}
.nav__hamburger span::before { top: -7px; }
.nav__hamburger span::after { top: 7px; }

/* Hamburger open state */
.nav--open .nav__hamburger span { background: transparent; }
.nav--open .nav__hamburger span::before { top: 0; transform: rotate(45deg); }
.nav--open .nav__hamburger span::after { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0;
  bottom: 0; background: var(--navy); padding: 24px;
  flex-direction: column; gap: 0; z-index: 99;
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.3s, transform 0.3s;
}
.nav--open { background: var(--navy) !important; backdrop-filter: none !important; transition: none !important; }
.nav--open .nav__drawer {
  display: flex; opacity: 1; transform: translateX(0);
}
.nav__drawer a {
  font-size: 1.125rem; padding: 16px 0; min-height: 56px;
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.nav__drawer a:hover { color: var(--white); }
.nav__drawer a:last-child {
  margin-top: auto; border: none;
  background: var(--red); color: var(--white);
  border-radius: 6px; justify-content: center;
  font-weight: 600; min-height: 52px;
}

/* --- Hero --- */
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center;
  margin-top: calc(-1 * var(--nav-height));
  padding-top: var(--nav-height);
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: var(--navy);
  clip-path: polygon(0 0, 65% 0, 50% 100%, 0 100%);
  opacity: 0.92;
}
.hero__overlay::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--navy) 0%, rgba(13,27,42,0.6) 100%);
}
.hero__content {
  position: relative; z-index: 1; max-width: var(--max-width);
  margin: 0 auto; padding: 80px 24px;
  width: 100%;
}
.hero__accent {
  display: block; width: 40px; height: 3px;
  background: var(--red); margin-bottom: 16px;
}
.hero__tagline {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 3px;
  color: var(--red); margin-bottom: 16px; text-transform: uppercase;
}
.hero__title {
  font-family: 'DM Serif Display', serif;
  color: var(--white); margin-bottom: 16px;
}
.hero__description {
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem; color: rgba(255,255,255,0.75);
  max-width: 540px; margin-bottom: 32px; line-height: 1.7;
}
.hero__buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero entry animation */
.hero__accent, .hero__tagline, .hero__title, .hero__description, .hero__buttons {
  opacity: 0; transform: translateY(20px);
  animation: heroFadeUp 0.7s ease-out forwards;
}
.hero__accent    { animation-delay: 0.2s; }
.hero__tagline   { animation-delay: 0.3s; }
.hero__title     { animation-delay: 0.5s; }
.hero__description { animation-delay: 0.7s; }
.hero__buttons   { animation-delay: 0.9s; }

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Hero for inner pages */
.hero--inner { min-height: 50vh; }
.hero--inner .hero__overlay {
  clip-path: none;
  background: linear-gradient(135deg, rgba(13,27,42,0.92) 0%, rgba(13,27,42,0.4) 100%);
}
.hero--inner .hero__title { font-size: 2.75rem; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9375rem; font-weight: 600; transition: all 0.2s;
  cursor: pointer; border: none; text-align: center;
}
.btn:hover { transform: scale(1.02); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-hover); }
.btn--secondary {
  background: rgba(255,255,255,0.1); color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn--secondary:hover { background: rgba(255,255,255,0.2); }
.btn--outline {
  background: transparent; color: var(--red); border: 2px solid var(--red);
}
.btn--outline:hover { background: var(--red); color: var(--white); }

/* --- Stats Bar --- */
.stats { background: var(--navy); padding: 100px 0; }
.stats__grid {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: center; gap: 0;
}
.stats__item {
  text-align: center; flex: 1;
  padding: 0 32px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stats__item:last-child { border-right: none; }
.stats__number {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem; font-weight: 800; color: var(--white);
  margin-bottom: 4px;
}
.stats__number::after {
  content: ''; display: block; width: 40px; height: 3px;
  background: var(--red); margin: 8px auto 0;
}
.stats__label {
  font-size: 0.75rem; color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 2px; margin-top: 8px;
}

/* --- Cards --- */
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.4s, transform 0.4s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card__image-wrap { overflow: hidden; }
.card__image {
  width: 100%; height: 240px; object-fit: cover;
  background: var(--gray-50);
  transition: transform 0.4s;
}
.card:hover .card__image { transform: scale(1.05); }
.card__body { padding: 28px; }
.card__title { color: var(--gray-900); margin-bottom: 8px; }
.card__text { font-size: 0.875rem; line-height: 1.6; }
.card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card__tag {
  font-size: 0.75rem; padding: 4px 12px; border-radius: 20px;
  background: var(--gray-50); color: var(--gray-600); font-weight: 500;
}

/* --- Value Props --- */
.value-props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.value-prop { padding: 0; }
.value-prop__title {
  color: var(--gray-900); margin-bottom: 8px;
  padding-left: 16px; position: relative;
}
.value-prop__title::before {
  content: ''; position: absolute; left: 0; top: 4px;
  width: 4px; height: 4px; background: var(--red);
}

/* --- Timeline --- */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px; background: var(--gray-100);
}
.timeline__item { position: relative; margin-bottom: 32px; }
.timeline__item::before {
  content: ''; position: absolute; left: -37px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--red);
}
.timeline__year {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem; font-weight: 700; color: var(--red);
}
.timeline__events { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.timeline__text { font-size: 0.9375rem; }

/* --- Product Category --- */
.product-category { margin-bottom: 64px; }
.product-category__header { margin-bottom: 32px; }
.product-category__name {
  font-family: 'DM Serif Display', serif;
  color: var(--gray-900); margin-bottom: 8px;
}

/* --- Service Section --- */
.service-section {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px;
  align-items: center; padding: 64px 0;
  border-bottom: 1px solid var(--gray-100);
}
.service-section:nth-child(even) .service-section__image { order: -1; }
.service-section__content {
  padding-left: 20px;
  border-left: 3px solid var(--red);
}
.service-section__title {
  font-family: 'DM Serif Display', serif;
  color: var(--gray-900); margin-bottom: 12px; font-size: 1.5rem;
}
.service-section__desc { margin-bottom: 20px; }
.service-section__list { display: flex; flex-direction: column; gap: 8px; }
.service-section__list li {
  font-size: 0.9375rem; color: var(--gray-600);
  padding-left: 20px; position: relative;
}
.service-section__list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}
.service-section__image {
  width: 100%; height: 300px; object-fit: cover;
  border-radius: var(--radius); background: var(--gray-50);
}

/* --- Footer --- */
.footer {
  background: var(--navy); color: var(--white);
  padding: 0 0 32px;
  border-top: 3px solid var(--red);
}
.footer__inner { padding: 80px 0 48px; }
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px;
}
.footer__brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem; font-weight: 400; margin-bottom: 12px;
}
.footer__brand span { color: var(--red); }
.footer__desc { font-size: 0.875rem; color: rgba(255,255,255,0.5); line-height: 1.6; }
.footer__heading {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 16px;
}
.footer__link {
  display: block; font-size: 0.875rem; color: rgba(255,255,255,0.6);
  padding: 4px 0; transition: color 0.2s, transform 0.2s;
}
.footer__link:hover { color: var(--white); transform: translateX(4px); }
.footer__contact-link {
  display: block; font-size: 0.9375rem; font-weight: 500;
  color: rgba(255,255,255,0.8); padding: 4px 0;
  transition: color 0.2s;
}
.footer__contact-link:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px;
  text-align: center; font-size: 0.8125rem; color: rgba(255,255,255,0.35);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal--left {
  opacity: 0; transform: translateX(-24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal--right {
  opacity: 0; transform: translateX(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.revealed {
  opacity: 1 !important; transform: translate(0) !important;
}

/* Stagger children — repeat every 3 so each row animates left-to-right */
.reveal-stagger > .reveal:nth-child(3n+1) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3n+2) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(3n+3) { transition-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--right {
    opacity: 1; transform: none; transition: none;
  }
  .hero__accent, .hero__tagline, .hero__title, .hero__description, .hero__buttons {
    opacity: 1; transform: none; animation: none;
  }
}

/* --- Products Layout with Side Nav --- */
.products-layout {
  display: grid; grid-template-columns: 200px 1fr; gap: 48px;
  align-items: start;
}
.products-nav {
  position: sticky; top: 96px;
  display: flex; flex-direction: column; gap: 4px;
}
.products-nav__link {
  font-size: 0.875rem; font-weight: 500; color: var(--gray-600);
  padding: 8px 16px; border-left: 3px solid transparent;
  transition: all 0.2s;
}
.products-nav__link:hover { color: var(--gray-900); }
.products-nav__link.active {
  color: var(--red); border-left-color: var(--red); font-weight: 600;
}

/* Mobile chip bar */
.products-chips {
  display: none; overflow-x: auto; gap: 8px;
  padding: 12px 24px; background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 64px; z-index: 50;
  -ms-overflow-style: none; scrollbar-width: none;
}
.products-chips::-webkit-scrollbar { display: none; }
.products-chips__link {
  flex-shrink: 0; padding: 8px 16px; border-radius: 20px;
  font-size: 0.8125rem; font-weight: 500;
  background: var(--gray-50); color: var(--gray-600);
  white-space: nowrap; transition: all 0.2s;
}
.products-chips__link.active {
  background: var(--navy); color: var(--white);
}

/* --- Career Positions (Expandable) --- */
.position {
  padding: 0; border: 1px solid var(--gray-100); border-radius: var(--radius);
  margin-bottom: 16px; transition: border-color 0.2s;
  overflow: hidden;
}
.position:hover { border-color: var(--blue); }
.position__header {
  padding: 24px 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.position__header-left { flex: 1; }
.position__title { color: var(--gray-900); margin-bottom: 4px; }
.position__meta { font-size: 0.875rem; color: var(--gray-600); }
.position__toggle {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-50); display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s, background 0.3s;
  flex-shrink: 0; margin-left: 16px;
}
.position__toggle::after {
  content: ''; width: 8px; height: 8px;
  border-right: 2px solid var(--gray-600); border-bottom: 2px solid var(--gray-600);
  transform: rotate(45deg); margin-top: -3px;
  transition: transform 0.3s;
}
.position--open .position__toggle { background: var(--red); }
.position--open .position__toggle::after {
  border-color: var(--white); transform: rotate(-135deg); margin-top: 3px;
}
.position__body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease-out;
}
.position__body-inner {
  padding: 0 32px 24px;
  border-top: 1px solid var(--gray-100);
}
.position__desc { margin-bottom: 16px; margin-top: 16px; }
.position__requirements li {
  font-size: 0.875rem; color: var(--gray-600);
  padding: 4px 0 4px 20px; position: relative;
}
.position__requirements li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.office { margin-bottom: 32px; }
.office__name { color: var(--gray-900); margin-bottom: 8px; font-size: 1.125rem; }
.office__detail {
  font-size: 0.9375rem; color: var(--gray-600);
  padding: 4px 0; display: flex; gap: 8px; align-items: center;
}
.office__detail a { color: var(--blue); font-weight: 500; }
.office__detail a:hover { text-decoration: underline; }
.office__map {
  width: 100%; height: 250px; border: 0; border-radius: var(--radius);
  margin-top: 16px;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1023px) {
  :root { --nav-height: 64px; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 2rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { gap: 0; }
  .value-props { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .service-section { grid-template-columns: 1fr; gap: 24px; }
  .service-section:nth-child(even) .service-section__image { order: 0; }
  .service-section__content { border-left: none; padding-left: 0; border-top: 3px solid var(--red); padding-top: 20px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Nav: show hamburger, hide links */
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav { background: var(--navy); }

  /* Products: hide side nav, show chips */
  .products-layout { grid-template-columns: 1fr; }
  .products-nav { display: none; }
  .products-chips { display: flex; top: 64px; }

  /* Reveal side slides become fade-up on tablet */
  .reveal--left, .reveal--right {
    transform: translateY(24px);
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .section { padding: 64px 0; }
  .hero { min-height: 85vh; }
  .hero--inner { min-height: 50vh; }
  .hero__content { padding: 48px 24px; }
  .hero__description { font-size: 1rem; }
  .hero__overlay { clip-path: none; background: linear-gradient(135deg, rgba(13,27,42,0.92) 0%, rgba(13,27,42,0.6) 100%); }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .value-props { grid-template-columns: 1fr; gap: 32px; }

  .stats { padding: 64px 0; }
  .stats__grid { flex-wrap: wrap; gap: 0; }
  .stats__item {
    flex: 0 0 50%; padding: 16px;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .stats__item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.15); }
  .stats__item:nth-last-child(-n+2) { border-bottom: none; }
  .stats__number { font-size: 2rem; }

  .footer__inner { padding: 48px 0 32px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }

  .btn { width: 100%; }
  .hero__buttons { flex-direction: column; }

  /* Disable card hover on touch */
  .card:hover { box-shadow: var(--shadow-sm); transform: none; }
  .card:hover .card__image { transform: none; }
}

/* --- Filter Buttons (Projects) --- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-btn {
  padding: 8px 20px; border-radius: 24px; border: 1px solid var(--gray-100);
  background: var(--gray-50); color: var(--gray-600); font-size: 0.875rem;
  font-weight: 500; cursor: pointer; transition: all 0.2s;
  font-family: 'Outfit', sans-serif;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* --- Parallax (desktop only) --- */
.hero--inner .hero__bg {
  will-change: transform;
  transition: none;
}
