/* ======================================================
   OneLoop Labs — Design System + Styles
   Dark theme, teal accent, enterprise premium feel
   ====================================================== */

/* === CSS Custom Properties === */
:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-subtle: #1a1a26;
  --text: #f0f0f5;
  --text-muted: #8a8a9a;
  --accent: #0ea5a0;
  --accent-hover: #14c4be;
  --accent-glow: rgba(14, 165, 160, 0.15);
  --border: #1e1e2e;
  --success: #22c55e;
  --card: #14141e;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --transition: 0.25s ease;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

.link {
  color: var(--accent);
  transition: color var(--transition);
}

.link:hover {
  color: var(--accent-hover);
}

/* === Badge === */
.badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(14, 165, 160, 0.25);
  border-radius: 100px;
  font-family: var(--font-mono);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow), 0 4px 16px rgba(14, 165, 160, 0.2);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 28px;
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.btn--sm {
  padding: 8px 20px;
  font-size: 14px;
}

.btn--lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* === Section === */
.section {
  padding: 100px 0;
}

.section__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.section__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 56px;
  color: var(--text);
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 30, 46, 0.5);
  transition: background var(--transition);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}

.nav__logo-icon {
  color: var(--accent);
  font-size: 24px;
}

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

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--text);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* === HERO === */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero__title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin: 24px 0;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero__subtitle {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

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

/* === PARTNERS === */
.partners {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.partners__label {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.partners__grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.partners__badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity var(--transition);
}

.partners__badge:hover {
  opacity: 1;
}

.partners__icon {
  flex-shrink: 0;
  opacity: 0.7;
}

/* === PRODUCT CARDS === */
.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  position: relative;
}

.card:hover {
  border-color: rgba(14, 165, 160, 0.4);
  box-shadow: 0 0 32px var(--accent-glow), 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid rgba(14, 165, 160, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.card__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(14, 165, 160, 0.2);
  font-family: var(--font-mono);
}

.card__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* === WHY SECTION === */
.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.why__card {
  text-align: center;
  padding: 40px 24px;
}

.why__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--accent-glow);
  border: 1px solid rgba(14, 165, 160, 0.2);
  border-radius: 50%;
  color: var(--accent);
  margin-bottom: 24px;
}

.why__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.why__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* === CTA SECTION === */
.cta {
  text-align: center;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.cta__title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.cta__subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.cta__alt {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* === FOOTER === */
.footer {
  padding: 64px 0 32px;
}

.footer__grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 32px;
}

.footer__tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

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

.footer__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--text);
}

.footer__social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.footer__social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.footer__bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ======================================================
   RESPONSIVE — Breakpoints: 1200px, 900px, 640px
   ====================================================== */

@media (max-width: 1200px) {
  .hero__title {
    font-size: 48px;
  }

  .section__title {
    font-size: 36px;
  }
}

@media (max-width: 900px) {
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero__title {
    font-size: 40px;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .section {
    padding: 80px 0;
  }

  .section__title {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .partners__grid {
    gap: 32px;
  }
}

@media (max-width: 640px) {
  /* Mobile nav */
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px 24px;
    gap: 24px;
    align-items: flex-start;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav__menu.is-open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 18px;
  }

  .nav__cta {
    width: 100%;
    justify-content: center;
    margin-top: 16px;
  }

  /* Mobile hamburger animation */
  .nav__toggle.is-active .nav__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.is-active .nav__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.is-active .nav__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero mobile */
  .hero {
    padding: 120px 0 64px;
  }

  .hero__title {
    font-size: 32px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__glow {
    width: 400px;
    height: 400px;
    top: -100px;
  }

  /* Cards mobile */
  .products__grid {
    grid-template-columns: 1fr;
  }

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

  .why__card {
    padding: 32px 16px;
  }

  /* Partners mobile */
  .partners__grid {
    flex-direction: column;
    gap: 20px;
  }

  /* Section mobile */
  .section {
    padding: 64px 0;
  }

  .section__title {
    font-size: 28px;
    margin-bottom: 32px;
  }

  /* CTA mobile */
  .cta__title {
    font-size: 28px;
  }

  /* Footer mobile */
  .footer__grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

/* === Scroll padding for anchor links (accounts for sticky nav) === */
html {
  scroll-padding-top: 88px;
}

/* === Selection color === */
::selection {
  background: rgba(14, 165, 160, 0.3);
  color: var(--text);
}
