/* ============================================
   sains.dev — Landing Page Styles
   ============================================ */

:root {
  --navy-950: #060d1a;
  --navy-900: #0a1628;
  --navy-800: #0f2240;
  --navy-700: #1a3673;
  --navy-600: #234b8f;
  --green-500: #10b981;
  --green-400: #34d399;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --white: #ffffff;
  --gray-100: #f1f5f9;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;

  --gradient-brand: linear-gradient(135deg, var(--navy-700) 0%, var(--cyan-500) 50%, var(--green-500) 100%);
  --gradient-text: linear-gradient(135deg, var(--cyan-400), var(--green-400));
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 60px rgba(6, 182, 212, 0.15);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --header-h: 72px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-sans);
  background: var(--navy-950);
  color: var(--gray-100);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Background effects */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 54, 115, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 54, 115, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 600px;
  height: 600px;
  background: rgba(26, 54, 115, 0.35);
  top: -200px;
  right: -100px;
}

.bg-glow--2 {
  width: 500px;
  height: 500px;
  background: rgba(16, 185, 129, 0.12);
  bottom: 20%;
  left: -150px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.header--scrolled {
  background: rgba(6, 13, 26, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(220px, 55vw);
  object-fit: contain;
  object-position: left center;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-300);
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--white);
}

.nav__link--cta {
  background: var(--gradient-brand);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
}

.nav__link--cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.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);
  border-radius: 2px;
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  z-index: 1;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green-400);
  margin-bottom: 1.5rem;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
-webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--gray-400);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__desc strong {
  color: var(--white);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  width: fit-content;
}

.stat__num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
}

.stat__label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat__divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
}

/* Hero visual */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 34, 64, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  backdrop-filter: blur(12px);
}

.hero__card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero__card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero__card-dot--red { background: #ef4444; }
.hero__card-dot--yellow { background: #eab308; }
.hero__card-dot--green { background: #22c55e; }

.hero__card-title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gray-500);
}

.hero__code {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--gray-300);
}

.code-kw { color: #c084fc; }
.code-str { color: var(--green-400); }
.code-fn { color: var(--cyan-400); }
.code-cmt { color: var(--gray-500); }

.hero__orbit {
  position: absolute;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
}

.hero__orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 50%;
  animation: orbit-spin 20s linear infinite;
}

.hero__orbit-ring--2 {
  inset: 15%;
  border-color: rgba(16, 185, 129, 0.1);
  animation-direction: reverse;
  animation-duration: 15s;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-link {
  display: flex;
  color: var(--gray-500);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Sections */
.section {
  position: relative;
  padding: 6rem 0;
  z-index: 1;
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan-400);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section__subtitle {
  color: var(--gray-400);
  font-size: 1.05rem;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about__card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.about__card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(6, 182, 212, 0.2);
  transform: translateY(-4px);
}

.about__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 12px;
  margin-bottom: 1.25rem;
  color: var(--cyan-400);
}

.about__icon svg {
  width: 24px;
  height: 24px;
}

.about__card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about__card p {
  color: var(--gray-400);
  font-size: 0.95rem;
}

/* Products */
.products {
  background: linear-gradient(180deg, transparent, rgba(26, 54, 115, 0.08) 50%, transparent);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: rgba(15, 34, 64, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.product-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.product-card--featured {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.product-card__glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.product-card:hover .product-card__glow {
  opacity: 1;
}

.product-card__ribbon {
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: var(--green-500);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 2.5rem;
  transform: rotate(45deg);
}

.product-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.product-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.product-card__icon svg {
  width: 26px;
  height: 26px;
}

.product-card__icon--blue {
  background: rgba(35, 75, 143, 0.3);
  color: #60a5fa;
}

.product-card__icon--green {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green-400);
}

.product-card__icon--cyan {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-400);
}

.product-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.product-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.product-card__desc {
  color: var(--gray-400);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.product-card__features {
  margin-bottom: 1.5rem;
}

.product-card__features li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--gray-300);
  margin-bottom: 0.4rem;
}

.product-card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--green-500);
  border-radius: 50%;
}

.product-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan-400);
  font-weight: 500;
  transition: gap var(--transition), color var(--transition);
}

.product-card__link:hover {
  color: var(--green-400);
  gap: 0.65rem;
}

/* Contact */
.contact__wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact__desc {
  color: var(--gray-400);
  margin-bottom: 2rem;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__item {
  display: flex;
  gap: 1rem;
}

.contact__item-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 10px;
  color: var(--cyan-400);
}

.contact__item-icon svg {
  width: 20px;
  height: 20px;
}

.contact__item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.contact__item p {
  font-size: 0.9rem;
  color: var(--gray-400);
}

.contact__item a {
  color: var(--cyan-400);
  transition: color var(--transition);
}

.contact__item a:hover {
  color: var(--green-400);
}

.contact__map-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.contact__map {
  position: relative;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
}

.contact__map iframe {
  width: 100%;
  height: 100%;
}

.contact__map-overlay {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: var(--navy-900);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition);
}

.contact__map-overlay:hover {
  background: var(--navy-700);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
}

.footer__logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
  opacity: 0.9;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--gray-400);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-500);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    margin: 0 auto;
  }

  .about__grid,
  .products__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .contact__wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav__logo {
    height: 36px;
    max-width: 180px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(6, 13, 26, 0.97);
    backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .nav__menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__menu li {
    width: 100%;
  }

  .nav__link {
    display: block;
    padding: 0.875rem 1.5rem;
  }

  .nav__link--cta {
    margin: 0.5rem 1.5rem;
    text-align: center;
  }

  .nav__toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero__visual {
    order: -1;
  }

  .hero__card {
    max-width: 100%;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }
}
