/* ============================================
   KeepLab — Institutional Website
   Colors: Navy #004071 · Orange #F38118
   ============================================ */

:root {
  --blue: #004071;
  --blue-dark: #002d52;
  --blue-light: #005a9e;
  --orange: #F38118;
  --orange-light: #ff9a3c;
  --orange-dark: #d96e0a;
  --grey: #555555;
  --grey-light: #8a8a8a;
  --white: #ffffff;
  --off-white: #f7f9fc;
  --dark: #0a1628;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 64, 113, 0.12);
  --shadow-lg: 0 20px 60px rgba(0, 64, 113, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Loader ---- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-shield {
  animation: pulse 1.2s ease-in-out infinite;
}

.loader__icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.8; }
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.header.scrolled {
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.97);
  padding: 8px 16px;
  border-radius: 10px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.nav__logo:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.nav__logo-img {
  height: 40px;
  width: auto;
  max-width: 175px;
  object-fit: contain;
  object-position: left center;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width var(--transition), left var(--transition);
}

.nav__link:hover {
  color: var(--white);
}

.nav__link:hover::after {
  width: 60%;
  left: 20%;
}

.nav__link--cta {
  background: var(--orange);
  color: var(--white) !important;
  border-radius: 8px;
  margin-left: 8px;
}

.nav__link--cta::after { display: none; }

.nav__link--cta:hover {
  background: var(--orange-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(243, 129, 24, 0.4);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
  border-radius: 2px;
}

.nav__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--dark);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 8s ease-in-out infinite;
}

.hero__orb--1 {
  width: 500px;
  height: 500px;
  background: var(--blue);
  top: -10%;
  right: -10%;
}

.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: var(--orange);
  bottom: -5%;
  left: -5%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 140px 24px 100px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 50%, var(--orange) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.65);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--primary {
  background: var(--orange);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(243, 129, 24, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 18px 36px;
  font-size: 1.05rem;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 28px 32px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  max-width: fit-content;
}

.hero__stat {
  display: flex;
  flex-direction: column;
}

.hero__stat-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
}

.hero__stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.hero__stat-suffix {
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
}

.hero__stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  font-weight: 500;
}

.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--orange), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- Sections ---- */
.section {
  padding: 100px 0;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--blue-dark);
}

.section__desc {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--grey);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- About ---- */
.about {
  background: var(--off-white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about__text p {
  font-size: 1.05rem;
  color: var(--grey);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about__text strong {
  color: var(--blue);
  font-weight: 600;
}

.about__cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__card {
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 64, 113, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.about__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.about__card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: 12px;
  margin-bottom: 16px;
}

.about__card-icon svg {
  width: 22px;
  height: 22px;
  color: var(--white);
}

.about__card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 8px;
}

.about__card p {
  font-size: 0.9rem;
  color: var(--grey-light);
  line-height: 1.6;
}

/* ---- Products ---- */
.products__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.product-card {
  position: relative;
  padding: 36px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 64, 113, 0.08);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: height var(--transition);
}

.product-card:hover .product-card__accent {
  height: 6px;
}

.product-card__accent--blue {
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

.product-card__accent--orange {
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
}

.product-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.product-card__logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  overflow: hidden;
}

.product-card__logo img {
  display: block;
  width: auto;
  object-fit: contain;
  object-position: left center;
}

.product-card__logo--horizontal {
  height: 40px;
  max-width: 180px;
}

.product-card__logo--horizontal img {
  height: 100%;
  max-width: 100%;
}

.product-card__logo--vertical {
  height: 64px;
  max-width: 120px;
}

.product-card__logo--vertical img {
  height: 100%;
  max-width: 100%;
}

.product-card__logo--square {
  height: 48px;
  max-width: 160px;
  padding: 6px 10px;
  background: var(--off-white);
  border-radius: 10px;
}

.product-card__logo--square img {
  height: 100%;
  max-width: 100%;
}

.product-card__tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey-light);
  padding: 4px 12px;
  background: var(--off-white);
  border-radius: 100px;
}

.product-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.product-card__desc {
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.product-card__features li {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue);
  padding: 4px 12px;
  background: rgba(0, 64, 113, 0.06);
  border-radius: 100px;
}

.product-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange);
  transition: gap var(--transition), color var(--transition);
}

.product-card__link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.product-card__link:hover {
  color: var(--orange-dark);
  gap: 12px;
}

.product-card__link:hover svg {
  transform: translate(2px, -2px);
}

.product-card__link--soon {
  color: var(--grey-light);
  cursor: default;
}

/* ---- CTA ---- */
.cta {
  position: relative;
  background: var(--dark);
  overflow: hidden;
}

.cta__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 0;
}

.cta__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  object-fit: contain;
  opacity: 0.95;
}

.cta__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta__desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 500px;
  margin: 0 auto 36px;
}

/* ---- Footer ---- */
.footer {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  padding: 8px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.footer__logo {
  height: 32px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  object-position: left center;
}

.footer__brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer__links {
  display: flex;
  gap: 48px;
  justify-content: flex-end;
}

.footer__col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  margin-bottom: 16px;
}

.footer__col li {
  margin-bottom: 10px;
}

.footer__col a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer__col a:hover {
  color: var(--orange);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .products__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 4px;
    transition: right var(--transition);
  }

  .nav__menu.open {
    right: 0;
  }

  .nav__link {
    font-size: 1rem;
    padding: 12px 0;
    width: 100%;
  }

  .nav__link--cta {
    margin-left: 0;
    margin-top: 12px;
    text-align: center;
    padding: 12px 16px;
  }

  .hero__stats {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
  }

  .hero__stat {
    align-items: center;
  }

  .hero__stat-value {
    justify-content: center;
  }

  .hero__stat-divider {
    width: 40px;
    height: 1px;
  }

  .hero__scroll {
    display: none;
  }

  .section {
    padding: 72px 0;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav__logo {
    padding: 7px 14px;
  }

  .nav__logo-img {
    height: 38px;
    max-width: 165px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .product-card {
    padding: 28px 24px;
  }

  .product-card__logo--horizontal {
    height: 32px;
    max-width: 140px;
  }

  .product-card__logo--vertical {
    height: 52px;
    max-width: 100px;
  }

  .product-card__header {
    flex-wrap: wrap;
  }
}
