/* Kabo Group - Main Stylesheet */

/* CSS Variables */
:root {
  --primary-blue: #1252a6;
  --dark-text: #2f2b36;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --medium-gray: #666;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --section-padding: 80px 0;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
}

p {
  margin-bottom: 1rem;
}

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

/* Skip to content (accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-blue);
  color: var(--white);
  padding: 8px 16px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  z-index: 1000;
  padding: 16px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.header.scrolled {
  border-bottom-color: #eee;
}

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

.logo img {
  height: 40px;
  width: auto;
}

/* Hamburger Menu */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--dark-text);
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--white);
  padding: 100px 40px 40px;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.nav.active {
  right: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-link {
  font-size: 1.25rem;
  color: var(--dark-text);
  transition: color 0.3s ease;
  display: block;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-blue);
}

.nav-link.active {
  border-bottom-color: var(--primary-blue);
}

/* Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-logo {
  max-width: 400px;
  margin-bottom: 24px;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--medium-gray);
  font-weight: 300;
}

/* Section Styles */
.section {
  padding: var(--section-padding);
}

.section-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--medium-gray);
  margin-bottom: 16px;
}

/* Mission Section */
.mission {
  background: var(--white);
  padding: 100px 0;
}

.mission-content {
  max-width: 800px;
}

.mission h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.4;
  margin-bottom: 2rem;
  font-weight: 400;
}

.mission p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--dark-text);
}

/* Business Cards - Zig Zag Layout */
.businesses-zigzag {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.business-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.business-row.reverse {
  direction: rtl;
}

.business-row.reverse > * {
  direction: ltr;
}

.business-row-image {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 1;
}

.business-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.business-row:hover .business-row-image img {
  transform: scale(1.08);
}

/* Project Eleven special background */
.project-eleven-bg {
  background: linear-gradient(135deg, #1252a6 0%, #7b62df 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.business-row:hover .project-eleven-bg {
  transform: scale(1.02);
}

.project-eleven-number {
  color: white;
  font-size: 6rem;
  font-weight: 200;
  transition: transform 0.6s ease;
}

.business-row:hover .project-eleven-number {
  transform: scale(1.1);
}

.business-row-content {
  padding: 20px 0;
}

.business-row-content h3 {
  font-size: 2rem;
  margin-bottom: 16px;
  font-weight: 400;
}

.business-row-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--dark-text);
  margin-bottom: 24px;
}

.business-row-link {
  font-size: 0.9rem;
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
}

.business-row:hover .business-row-link {
  gap: 12px;
}

/* Mobile responsive for zig-zag */
@media (max-width: 768px) {
  .businesses-zigzag {
    gap: 50px;
  }

  .business-row,
  .business-row.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    direction: ltr;
  }

  .business-row-image {
    aspect-ratio: 4/3;
  }

  .business-row-content h3 {
    font-size: 1.5rem;
  }

  .project-eleven-number {
    font-size: 4rem;
  }
}

/* Legacy business cards (keep for compatibility) */
.businesses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.business-card {
  display: flex;
  flex-direction: column;
}

.business-card-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 24px;
}

.business-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  font-weight: 400;
}

.business-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--dark-text);
}

/* Values Section */
.values {
  background: var(--primary-blue);
  color: var(--white);
  padding: 100px 0;
}

.values-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  margin-bottom: 40px;
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
}

.value-item {
  font-size: 1rem;
  line-height: 1.7;
}

.value-item strong {
  font-weight: 500;
}

/* History Section */
.history {
  background: var(--white);
  padding: 100px 0;
}

.history-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.history-content--no-image {
  grid-template-columns: 1fr;
  max-width: 800px;
}

.history-text h2 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--medium-gray);
  margin-bottom: 40px;
}

.history-text p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.history-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-blue);
  font-size: 0.875rem;
  margin-top: 16px;
}

.history-link:hover {
  text-decoration: underline;
}

.history-image {
  position: relative;
}

.history-image img {
  width: 100%;
  max-width: 300px;
}

/* Partners Section */
.partners {
  padding: 80px 0;
  border-top: 1px solid #eee;
}

.partners-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--medium-gray);
  margin-bottom: 16px;
}

.partners-subtitle {
  font-size: 1rem;
  color: var(--dark-text);
  margin-bottom: 40px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.partner-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.partner-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.partner-card img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .partner-card {
    min-height: 100px;
    padding: 20px 16px;
  }
}

/* Footer */
.footer {
  background: var(--white);
  padding: 60px 0 40px;
  border-top: 1px solid #eee;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-logo img {
  height: 80px;
  width: auto;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--dark-text);
  transition: color 0.3s ease;
  padding: 4px 0;
}

.footer-nav a:hover {
  color: var(--primary-blue);
}

.footer-nav a.active {
  border-left: 2px solid var(--primary-blue);
  padding-left: 12px;
  margin-left: -14px;
}

.footer-contact {
  text-align: right;
}

.footer-contact a,
.footer-contact p {
  font-size: 0.875rem;
  color: var(--dark-text);
  margin-bottom: 4px;
  display: block;
}

.footer-contact a:hover {
  color: var(--primary-blue);
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  justify-content: flex-end;
}

.footer-social a {
  color: var(--primary-blue);
  font-size: 1.25rem;
}

/* Page Header */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
}

.page-header .section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--medium-gray);
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: -2px;
}

/* Page Content */
.page-content {
  padding: 60px 0;
}

.page-content p {
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Timeline */
.timeline {
  padding: 80px 0;
}

.timeline-list {
  max-width: 600px;
  margin: 0 auto;
}

.timeline-item {
  margin-bottom: 40px;
  padding-left: 0;
}

.timeline-year {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark-text);
}

.timeline-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--dark-text);
}

/* Team Section */
.team {
  padding: 100px 0;
}

.team h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  margin-bottom: 60px;
}

.team-department {
  margin-bottom: 60px;
}

.team-department h3 {
  font-size: 1.25rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 40px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.team-member {
  text-align: center;
}

.team-member h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.team-member p {
  font-size: 0.875rem;
  color: var(--medium-gray);
  margin-bottom: 0;
}

/* Image Gallery */
.gallery {
  padding: 60px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  font-size: 0.75rem;
  color: var(--medium-gray);
  margin-top: 8px;
}

/* Sub-brands Section */
.sub-brands {
  padding: 60px 0;
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

.sub-brand {
  text-align: center;
}

.sub-brand-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto 12px;
}

.sub-brand-icon.retail { background: var(--primary-blue); }
.sub-brand-icon.dispensers { background: #4CAF50; }
.sub-brand-icon.logistics { background: #FF9800; }

.sub-brand span {
  font-size: 0.875rem;
  color: var(--dark-text);
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--dark-text);
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--primary-blue);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-bottom-color: var(--primary-blue);
}

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

.submit-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--dark-text);
  cursor: pointer;
  padding: 12px 0;
  transition: color 0.3s ease;
}

.submit-btn:hover {
  color: var(--primary-blue);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form status messages */
.form-status {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form-status.error {
  display: block;
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* Responsive */
@media (max-width: 768px) {
  .history-content {
    grid-template-columns: 1fr;
  }

  .history-image {
    order: -1;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: left;
  }

  .footer-contact {
    text-align: left;
  }

  .footer-social {
    justify-content: flex-start;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sub-brands {
    gap: 40px;
  }
}

@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    gap: 32px;
  }

  .nav-link {
    font-size: 0.875rem;
    padding: 4px 0;
  }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

/* Base animation states - elements start hidden */
[data-animate] {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Fade up animation */
[data-animate="fade-up"] {
  transform: translateY(60px);
}

[data-animate="fade-up"].animated {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left */
[data-animate="fade-left"] {
  transform: translateX(-80px);
}

[data-animate="fade-left"].animated {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
[data-animate="fade-right"] {
  transform: translateX(80px);
}

[data-animate="fade-right"].animated {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up animation */
[data-animate="scale-up"] {
  transform: scale(0.9);
}

[data-animate="scale-up"].animated {
  opacity: 1;
  transform: scale(1);
}

/* Fade in only */
[data-animate="fade-in"] {
  transform: none;
}

[data-animate="fade-in"].animated {
  opacity: 1;
}

/* Stagger delays for sequential animations */
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }
[data-delay="6"] { transition-delay: 0.6s; }

/* Hero specific animations */
.hero-logo {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 1s ease forwards;
  animation-delay: 0.3s;
}

.hero-tagline {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 1s ease forwards;
  animation-delay: 0.6s;
}

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

/* Page header animations */
.page-header h1 {
  opacity: 0;
  transform: translateY(40px);
  animation: heroFadeIn 0.8s ease forwards;
  animation-delay: 0.2s;
}

.page-header .section-label {
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
  animation-delay: 0.1s;
}

/* Image hover enhancements - zoom effect */
.business-card-image,
.aksara-gallery-item img,
.history-image img,
.aksara-image img,
.gallery-item img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
}

/* Business card images */
.business-card {
  overflow: hidden;
}

.business-card-image {
  transform-origin: center center;
}

.business-card:hover .business-card-image {
  transform: scale(1.08);
}

/* Aksara gallery images */
.aksara-gallery-item {
  overflow: hidden;
  border-radius: 2px;
}

.aksara-gallery-item img {
  transform-origin: center center;
}

.aksara-gallery-item:hover img {
  transform: scale(1.06);
}

/* History section image */
.history-image {
  overflow: hidden;
  border-radius: 2px;
}

.history-image img {
  transform-origin: center center;
}

.history-image:hover img {
  transform: scale(1.05);
}

/* Aksara page main image */
.aksara-image {
  overflow: hidden;
  border-radius: 2px;
}

.aksara-image img {
  transform-origin: center center;
}

.aksara-image:hover img {
  transform: scale(1.05);
}

/* Partner logos zoom */
.partners-logos img {
  transform-origin: center center;
}

/* Fueltech card image */
.fueltech-card-image {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* General gallery items */
.gallery-item {
  overflow: hidden;
  border-radius: 2px;
}

.gallery-item img {
  transform-origin: center center;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Parallax-like effect for certain elements */
@media (min-width: 769px) {
  .history-image {
    transition: transform 0.3s ease;
  }
}

/* Values section - items slide in sequentially */
.values .value-item {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.values .value-item.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Timeline items animation */
.timeline-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Team members fade in */
.team-member {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.team-member.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Partners logos slide in */
.partner-card.animated {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Form fields animation */
.form-group {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.form-group.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Fueltech divisions */
.fueltech-division {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fueltech-division.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }

  .hero-logo,
  .hero-tagline,
  .page-header h1,
  .page-header .section-label {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
