/* ============================================
   NextGenApps — Design System
   Glassmorphism · Mobile-first
   ============================================ */

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

:root {
  --primary: #1856FF;
  --primary-hover: #0a3fcc;
  --secondary: #3A344E;
  --success: #07CA6B;
  --warning: #E89558;
  --danger: #EA2143;
  --surface: #FFFFFF;
  --text: #141414;
  --text-muted: #5a5a6e;
  --bg-start: #f0f2ff;
  --bg-end: #e8eaff;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 8px 32px rgba(24, 86, 255, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 50px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1200px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  min-height: 100vh;
  line-height: 1.6;
}

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

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

ul {
  list-style: none;
}

address {
  font-style: normal;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }

/* --- Section Header --- */
.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(24, 86, 255, 0.08);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.section__header p {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* --- Glass Card --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

.card {
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(24, 86, 255, 0.12);
}

.card__icon {
  margin-bottom: 16px;
}

.card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.card__role {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin: 4px 0 10px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(20, 20, 20, 0.15);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--full {
  width: 100%;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  height: var(--header-h);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
}

.header__nav ul {
  display: flex;
  gap: 8px;
}

.header__nav a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.header__nav a:hover {
  background: rgba(24, 86, 255, 0.08);
  color: var(--primary);
}

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

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

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--header-h) 0 0;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 50% 50% at 20% 30%, rgba(24, 86, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 70%, rgba(24, 86, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 30% 30% at 50% 50%, rgba(58, 52, 78, 0.04) 0%, transparent 50%);
  animation: heroBg 12s ease-in-out infinite alternate;
}

@keyframes heroBg {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-3%, -3%) rotate(2deg); }
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero__content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* --- Mockup --- */
.mockup {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.mockup__frame {
  position: relative;
  width: 280px;
  height: 570px;
  background: #111;
  border-radius: 40px;
  padding: 12px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform var(--transition);
}

.mockup:hover .mockup__frame {
  transform: rotateY(-2deg) rotateX(2deg);
}

.mockup__notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background: #111;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.mockup__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: #0a0a1a;
}

.ar-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ar-cube {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(24, 86, 255, 0.6);
  border-radius: 4px;
  background: rgba(24, 86, 255, 0.08);
  animation: cubeFloat 6s ease-in-out infinite;
}

.ar-cube:nth-child(1) {
  top: 20%;
  left: 20%;
  animation-delay: 0s;
}

.ar-cube:nth-child(2) {
  top: 50%;
  right: 15%;
  width: 40px;
  height: 40px;
  animation-delay: 2s;
}

.ar-cube:nth-child(3) {
  bottom: 25%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes cubeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
  50% { transform: translateY(-12px) rotate(15deg); opacity: 1; }
}

.ar-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  animation: dotPulse 3s ease-in-out infinite;
}

.ar-dot:nth-child(4) { top: 15%; left: 60%; animation-delay: 0.5s; }
.ar-dot:nth-child(5) { top: 70%; left: 15%; animation-delay: 1.5s; }
.ar-dot:nth-child(6) { bottom: 15%; right: 25%; animation-delay: 2.5s; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.8); }
}

.ar-grid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background-image:
    linear-gradient(rgba(24, 86, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 86, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: gridShift 8s linear infinite;
}

@keyframes gridShift {
  0% { transform: translateY(0); }
  100% { transform: translateY(20px); }
}

.mockup__ui {
  position: absolute;
  top: 36px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}

.mockup__badge {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.mockup__battery {
  display: flex;
}

/* --- Logos Marquee --- */
.logos {
  padding: 40px 0;
  overflow: hidden;
}

.logos__track {
  display: flex;
  gap: 48px;
  animation: marquee 24s linear infinite;
  width: fit-content;
}

.logos__item {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
  opacity: 0.5;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Services --- */
.services {
  padding: 100px 0;
}

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

.services .card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --- Roadmap --- */
.roadmap {
  padding: 100px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(24, 86, 255, 0.03) 100%);
}

.roadmap__timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.roadmap__timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(24, 86, 255, 0.15) 100%);
}

.roadmap__item {
  position: relative;
  padding: 24px 24px 24px 64px;
  margin-bottom: 24px;
}

.roadmap__dot {
  position: absolute;
  left: 16px;
  top: 28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(24, 86, 255, 0.2);
  z-index: 1;
}

.roadmap__item--future .roadmap__dot {
  background: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(90, 90, 110, 0.15);
}

.roadmap__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.03em;
}

.roadmap__item--future .roadmap__date {
  color: var(--text-muted);
}

.roadmap__content h3 {
  margin: 4px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roadmap__content p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(24, 86, 255, 0.1);
  color: var(--primary);
}

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

.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* --- Contact --- */
.contact {
  padding: 100px 0;
}

.contact__wrapper {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  padding: 40px;
  max-width: 860px;
  margin: 0 auto;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__group label {
  font-size: 0.85rem;
  font-weight: 600;
}

.form__group input,
.form__group textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 16px;
  border: 1.5px solid rgba(20, 20, 20, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form__group input:focus-visible,
.form__group textarea:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 86, 255, 0.12);
}

.form__group textarea {
  resize: vertical;
  min-height: 80px;
}

.form__group .error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(234, 33, 67, 0.1);
}

.form__error-msg {
  font-size: 0.78rem;
  color: var(--danger);
  display: none;
}

.form__note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact__item a {
  color: var(--text);
  font-weight: 500;
  transition: color var(--transition);
}

.contact__item a:hover {
  color: var(--primary);
}

/* --- Footer --- */
.footer {
  padding: 28px 0;
  border-top: 1px solid rgba(20, 20, 20, 0.06);
  background: rgba(255, 255, 255, 0.4);
}

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

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__nav {
  display: flex;
  gap: 20px;
}

.footer__nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__nav a:hover {
  color: var(--primary);
}

/* --- Toast notification --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: all 300ms ease;
  z-index: 200;
  pointer-events: none;
}

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

.toast--success {
  background: var(--success);
}

.toast--error {
  background: var(--danger);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero__content {
    align-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .mockup__frame {
    width: 220px;
    height: 450px;
    transform: none;
  }

  .mockup:hover .mockup__frame {
    transform: none;
  }

  .contact__wrapper {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }
}

@media (max-width: 640px) {
  .header__nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding: 16px 20px;
  }

  .header__nav--open {
    display: block;
  }

  .header__nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .header__nav a {
    display: block;
    padding: 12px 16px;
  }

  .header__toggle {
    display: flex;
  }

  .header__toggle--active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  .header__toggle--active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 40px) 0 40px;
  }

  .hero__content h1 {
    font-size: 1.8rem;
  }

  .mockup__frame {
    width: 180px;
    height: 370px;
  }

  .services,
  .roadmap,
  .team,
  .contact {
    padding: 60px 0;
  }

  .roadmap__timeline::before {
    left: 18px;
  }

  .roadmap__item {
    padding: 20px 16px 20px 52px;
  }

  .roadmap__dot {
    left: 10px;
    top: 24px;
    width: 16px;
    height: 16px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }
}
