/* ============================================
   QubriX — Dark futuristic SaaS theme
   Mobile-first, single stylesheet
   ============================================ */

:root {
  --bg-deep: #0a0a0a;
  --bg-main: #0b0f1a;
  --primary: #00c2ff;
  --accent: #8a2be2;
  --text: #e8eef7;
  --text-muted: #8b9bb4;
  --card-bg: rgba(15, 22, 38, 0.72);
  --card-border: rgba(0, 194, 255, 0.12);
  --glow-primary: rgba(0, 194, 255, 0.35);
  --glow-accent: rgba(138, 43, 226, 0.3);
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 72px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(0, 194, 255, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(138, 43, 226, 0.06), transparent),
    linear-gradient(180deg, var(--bg-main) 0%, var(--bg-deep) 45%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #5ddbff;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ----- Header & Nav ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 24px var(--glow-primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(10, 14, 24, 0.97);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.nav.is-open {
  transform: translateX(0);
}

.nav a {
  color: var(--text);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: rgba(0, 194, 255, 0.1);
  color: var(--primary);
}

@media (min-width: 768px) {
  .nav {
    position: static;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    background: transparent;
  }

  .nav a {
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
  }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0090cc);
  color: #041018;
  box-shadow: 0 0 28px var(--glow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--glow-primary), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0, 194, 255, 0.45);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(0, 194, 255, 0.25);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 194, 255, 0.18), transparent 65%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(138, 43, 226, 0.14), transparent 55%);
  animation: heroPulse 12s ease-in-out infinite alternate;
}

@keyframes heroPulse {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.35;
  animation: float 18s linear infinite;
  box-shadow: 0 0 8px var(--primary);
}

.particle:nth-child(odd) {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation-duration: 22s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.2;
  }
  25% {
    opacity: 0.55;
  }
  50% {
    transform: translate(12px, -30px);
    opacity: 0.35;
  }
  75% {
    opacity: 0.5;
  }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.tagline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 16ch;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 36ch;
}

/* ----- Sections ----- */
section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 52ch;
}

/* ----- Cards ----- */
.grid-cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cards.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.35s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.35), transparent 40%, rgba(138, 43, 226, 0.25));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 194, 255, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 32px rgba(0, 194, 255, 0.12);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: linear-gradient(145deg, rgba(0, 194, 255, 0.2), rgba(138, 43, 226, 0.15));
  color: var(--primary);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ----- About preview / two col ----- */
.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.mission-box {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: rgba(0, 194, 255, 0.06);
  border: 1px solid rgba(0, 194, 255, 0.15);
}

.mission-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--primary);
}

/* ----- Testimonials ----- */
.testimonial-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quote {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.quote:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.quote p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
}

.quote footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quote cite {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

.quote .role {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ----- Page hero (inner pages) ----- */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0.75rem auto 0;
  max-width: 560px;
  color: var(--text-muted);
}

/* ----- 404 ----- */
.error-page {
  padding: clamp(3rem, 10vw, 6rem) 0;
  text-align: center;
}

.error-page h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-inline: auto;
}

.error-lead {
  margin: 1rem auto 0;
  max-width: 42ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.error-links {
  margin: 2.5rem 0 0;
  font-size: 0.9rem;
}

.error-links a {
  font-weight: 600;
}

/* ----- Team ----- */
.team-section {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.team-section--border {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 1rem;
}

.team-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.team-grid--preview {
  max-width: 900px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .team-grid--preview {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .team-grid--preview {
    grid-template-columns: repeat(4, 1fr);
    max-width: none;
  }
}

.team-card {
  position: relative;
  text-align: center;
  padding: 1.75rem 1.1rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  overflow: hidden;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 194, 255, 0.45), transparent 45%, rgba(138, 43, 226, 0.35));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.team-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 194, 255, 0.35);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(0, 194, 255, 0.12),
    0 0 60px rgba(138, 43, 226, 0.08);
}

.team-card:hover::before {
  opacity: 1;
}

.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 194, 255, 0.08);
  border: 1px solid rgba(0, 194, 255, 0.2);
  border-radius: 999px;
}

.team-badge .flag {
  font-size: 1rem;
  line-height: 1;
}

.avatar {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(160deg, #141c30 0%, #0b0f1a 100%);
  border: 2px solid rgba(0, 194, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(138, 43, 226, 0.12),
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(0, 194, 255, 0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Shared placeholder “photo”: silhouette + subtle grid */
.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none'%3E%3Ccircle cx='60' cy='42' r='20' stroke='%2300c2ff' stroke-opacity='0.45' stroke-width='2'/%3E%3Cpath d='M28 98c6-18 18-28 32-28s26 10 32 28' stroke='%238a2be2' stroke-opacity='0.5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center 52%;
  background-size: 58%;
  opacity: 0.9;
  pointer-events: none;
}

.team-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.team-card .role {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.team-card .desc {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.team-cta {
  margin-top: 2rem;
  text-align: center;
}

/* ----- Contact form ----- */
.contact-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.form-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(10, 14, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.2);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group .error-msg {
  display: none;
  font-size: 0.8rem;
  color: #ff6b8a;
  margin-top: 0.35rem;
}

.form-group.is-invalid input,
.form-group.is-invalid textarea {
  border-color: rgba(255, 107, 138, 0.6);
}

.form-group.is-invalid .error-msg {
  display: block;
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.info-list strong {
  display: block;
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.contact-address {
  margin: 0.35rem 0 0;
  font-style: normal;
  line-height: 1.55;
  color: var(--text-muted);
}

.contact-map-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ----- Modal ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  max-width: 420px;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--bg-main);
  border: 1px solid rgba(0, 194, 255, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 48px var(--glow-primary);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.is-visible .modal {
  transform: scale(1);
}

.modal h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.modal p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal .btn-primary {
  margin-top: 1.5rem;
  width: 100%;
}

/* ----- Footer ----- */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .site-footer .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.social {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.social a:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(0, 194, 255, 0.25);
  transform: translateY(-2px);
}

.copyright {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ----- Scroll reveal ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Services detail list ----- */
.service-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

@media (min-width: 640px) {
  .service-row {
    flex-direction: row;
    align-items: flex-start;
  }
}

.service-detail {
  margin-bottom: 2rem;
}

.service-detail:last-child {
  margin-bottom: 0;
}

.service-detail .card {
  padding: 2rem;
}

.service-detail h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-detail ul {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.service-detail li {
  margin-bottom: 0.5rem;
}

.prose {
  color: var(--text-muted);
  line-height: 1.75;
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}
