/* ========================================
   K Nugraha N Teknik — Design System
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --primary: #1e3a8a;
  --primary-dark: #172554;
  --primary-medium: #1e40af;
  --primary-light: #3b82f6;
  --primary-surface: #eff6ff;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Accent */
  --accent-yellow: #f59e0b;
  --accent-green: #0f766e;
  --cta-dark: #0c4a46;

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;
  --container-padding: 0 24px;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  line-height: 1.6;
  background: var(--white);
  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;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
}

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

/* --- Section Label (small uppercase) --- */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.section-label--blue {
  color: var(--primary-light);
}

.section-label--white {
  color: rgba(255,255,255,0.7);
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: var(--transition);
}

.header--transparent {
  background: transparent;
}

.header--scrolled {
  background: var(--primary-dark);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header__logo {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__logo-img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav-link {
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
}

.header__nav-link:hover,
.header__nav-link--active {
  color: var(--white);
}

.header__nav-link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

.header__cta {
  background: var(--primary-light);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
}

.header__cta:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

/* Hamburger */
.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.header__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary-dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23,37,84,0.92) 0%, rgba(30,58,138,0.75) 50%, rgba(30,64,175,0.6) 100%);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  padding-top: 72px;
}

.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 600px;
}

.hero__desc {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
  cursor: pointer;
}

.btn--primary {
  background: var(--primary-light);
  color: var(--white);
}

.btn--primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}

.btn--outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.btn--green {
  background: var(--white);
  color: var(--cta-dark);
}

.btn--green:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--dark {
  background: var(--primary-dark);
  color: var(--white);
}

.btn--dark:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
  padding: var(--section-padding);
  background: var(--white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 24px;
}

.about__text {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 40px;
}

.about__stats {
  display: flex;
  gap: 48px;
}

.about__stat-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.about__stat-label {
  font-size: 0.78rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.about__image-wrapper {
  position: relative;
}

.about__image-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about__image-main img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.about__image-float {
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--white);
}

.about__image-float img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.about__image-caption {
  background: var(--white);
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-600);
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
  padding: var(--section-padding);
  background: var(--gray-50);
}

.services__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 56px;
  gap: 40px;
}

.services__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.15;
  max-width: 480px;
}

.services__subtitle {
  color: var(--gray-500);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 360px;
  padding-top: 8px;
}

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

.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  background: var(--primary-surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.3rem;
  color: var(--primary);
  transition: var(--transition);
}

.service-card:hover .service-card__icon {
  background: var(--primary);
  color: var(--white);
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.service-card__desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ========================================
   QUALITY VALUES (Engineering DNA)
   ======================================== */
.values {
  padding: 64px 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.values__header {
  margin-bottom: 48px;
}

.values__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.values__grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  flex: 1;
}

.value-item__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  border: 2px solid var(--gray-200);
  transition: var(--transition);
}

.value-item:hover .value-item__icon {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: scale(1.1);
}

.value-item__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products {
  padding: var(--section-padding);
  background: var(--white);
}

.products__header {
  text-align: center;
  margin-bottom: 56px;
}

.products__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--gray-900);
}

.products__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 320px 280px;
  gap: 20px;
}

.product-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.product-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  z-index: 2;
  color: var(--white);
}

.product-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-card__desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

/* Large card spans full left column */
.product-card--large {
  grid-row: 1 / 3;
}

/* Small cards on right column */
.product-card--small {
  /* default sizing */
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq {
  padding: var(--section-padding);
  background: var(--gray-50);
}

.faq__header {
  text-align: center;
  margin-bottom: 56px;
}

.faq__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--gray-900);
}

.faq__list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-item__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.faq-item__question:hover {
  color: var(--primary);
}

.faq-item__icon {
  font-size: 1.3rem;
  color: var(--gray-400);
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-item__icon {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-item__answer {
  max-height: 300px;
  padding-bottom: 24px;
}

.faq-item__answer p {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ========================================
   CTA BANNER
   ======================================== */
.cta-banner {
  padding: 80px 0;
  background: var(--cta-dark);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.cta-banner__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.cta-banner__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  max-width: 440px;
}

.cta-banner__subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem;
  margin-top: 12px;
  line-height: 1.7;
  max-width: 440px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 64px 0 32px;
  background: var(--gray-900);
  color: rgba(255,255,255,0.7);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__logo-img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer__brand-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
  font-size: 0.9rem;
}

.footer__social a:hover {
  background: var(--primary-light);
  color: var(--white);
}

.footer__col-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-up:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-up:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .fade-up:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .fade-up:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .fade-up:nth-child(6) { transition-delay: 0.5s; }

/* ========================================
   MOBILE MENU OVERLAY
   ======================================== */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--primary-dark);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--primary-light);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .about__grid {
    gap: 40px;
  }

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

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 72px 0;
  }

  /* Header Mobile */
  .header__nav {
    display: none;
  }

  .header__cta {
    display: none;
  }

  .header__hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 85vh;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__image-float {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: -50px;
    margin-left: 20px;
    width: 220px;
  }

  /* Services */
  .services__header {
    flex-direction: column;
    gap: 16px;
  }

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

  /* Values */
  .values__grid {
    flex-wrap: wrap;
    justify-content: center;
  }

  .value-item {
    flex: 0 0 calc(33.333% - 16px);
  }

  /* Products */
  .products__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .product-card--large {
    grid-row: auto;
  }

  .product-card {
    height: 260px;
  }

  /* CTA */
  .cta-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2rem;
  }

  .about__stats {
    gap: 32px;
  }

  .about__stat-number {
    font-size: 2rem;
  }

  .values__grid {
    gap: 16px;
  }

  .value-item {
    flex: 0 0 calc(50% - 12px);
  }
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}

/* Pulse ring animation */
.whatsapp-float__pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.35);
  animation: wa-pulse 2s ease-out infinite;
  pointer-events: none;
}

@keyframes wa-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Tooltip */
.whatsapp-float__tooltip {
  position: absolute;
  right: 72px;
  background: var(--gray-800);
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow-md);
}

.whatsapp-float__tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent var(--gray-800);
}

.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
  transform: translateX(0);
}
