/* ============================================================
   NESQO LABS — Site Institucional
   ============================================================ */

:root {
  --bg: #07080a;
  --bg-soft: #0c0e12;
  --fg: #f5f5f7;
  --fg-dim: #a8a9ad;
  --fg-faint: #6a6b71;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --sans: "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", "Inter", -apple-system, sans-serif;
  --brand: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  overflow-x: hidden;
  font-weight: 400;
  letter-spacing: -0.005em;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   BACKGROUND CIRCUIT CANVAS
   ============================================================ */
#circuit-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: clamp(56px, 7vh, 88px) 24px clamp(56px, 8vh, 96px);
  z-index: 1;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(800px, 90vw);
  height: min(800px, 90vw);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 30%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: glow-pulse 7s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.hero-content {
  max-width: 760px;
  width: 100%;
}

.hero-mark {
  width: clamp(60px, 13vw, 120px);
  height: clamp(60px, 13vw, 120px);
  margin: 0 auto 5px;
  animation: hero-mark-in 0.7s var(--ease) both, hero-mark-float 6s ease-in-out infinite 0.7s;
  filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.3));
  will-change: transform, filter;
}

@keyframes hero-mark-in {
  from { opacity: 0; transform: scale(0.85); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
  to   { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 40px rgba(255,255,255,0.3)); }
}

@keyframes hero-mark-float {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 40px rgba(255,255,255,0.28)); }
  50%      { transform: translateY(-10px); filter: drop-shadow(0 0 56px rgba(255,255,255,0.45)); }
}

@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
  50%      { filter: drop-shadow(0 0 6px rgba(255,255,255,0.5)); }
}

.eyebrow {
  font-family: var(--brand);
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 24px;
  font-weight: 600;
  opacity: 0;
  animation: hero-in 0.5s var(--ease) 0.15s forwards;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(34px, 5.8vw, 64px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 24px;
  opacity: 0;
  animation: hero-in 0.55s var(--ease) 0.25s forwards;
}

.hero-sub {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.65;
  color: var(--fg-dim);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 400;
  opacity: 0;
  animation: hero-in 0.55s var(--ease) 0.35s forwards;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTIONS — Shared
   ============================================================ */
.about, .products {
  position: relative;
  padding: 88px 0;
  z-index: 1;
}

.section-head {
  margin-bottom: 48px;
  max-width: 720px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 16px;
  font-weight: 500;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-lead {
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.4;
  color: var(--fg);
  letter-spacing: -0.015em;
  font-weight: 400;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--fg-dim);
  font-size: 15.5px;
  line-height: 1.7;
}

.about-body strong {
  color: var(--fg);
  font-weight: 500;
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.products {
  border-top: 1px solid var(--border);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  position: relative;
  padding: 32px 28px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005));
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.04);
}

.product-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  margin-bottom: 6px;
  overflow: hidden;
}

.product-icon svg { width: 22px; height: 22px; }

/* Product icons rendered as real artwork (Dayah, Zecah) — fill the badge */
.product-icon-image {
  border: none;
  border-radius: 14px;
  background: transparent;
  width: 56px;
  height: 56px;
}
.product-icon-image img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px;
  object-fit: cover;
}

.product-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-tag {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 500;
}

.product-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-dim);
  margin-top: 2px;
  flex: 1;
}

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.product-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 10px rgba(110, 231, 183, 0.7);
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(110, 231, 183, 0.5); opacity: 0.85; }
  50%      { box-shadow: 0 0 14px rgba(110, 231, 183, 0.9); opacity: 1; }
}

.product-card-soon {
  border-style: dashed;
}

.product-card-soon .product-name,
.product-card-soon .product-tag,
.product-card-soon .product-desc {
  color: var(--fg-dim);
}

/* ============================================================
   CONTACT BUTTON (after products)
   ============================================================ */
.contact-action {
  display: flex;
  justify-content: center;
  margin-top: 64px;
  padding-top: 8px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: pointer;
}

.contact-btn svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.contact-btn-arrow {
  transition: transform 0.3s var(--ease);
}

.contact-btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255,255,255,0.4);
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  box-shadow: 0 10px 32px rgba(255,255,255,0.1);
}

.contact-btn:active {
  transform: translateY(0) scale(1);
}

.contact-btn:hover .contact-btn-arrow {
  transform: translateX(4px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
  font-weight: 600;
}

.footer-mark { width: 29px; height: 29px; opacity: 1; filter: none; }

.footer-meta {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-align: right;
  line-height: 1.7;
}

/* ============================================================
   REVEAL ANIMATIONS (on scroll)
   ============================================================ */
.about .section-head,
.about-lead,
.about-body,
.products .section-head,
.product-card,
.contact-action {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.about .section-head.visible,
.about-lead.visible,
.about-body.visible,
.products .section-head.visible,
.product-card.visible,
.contact-action.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-lead.visible             { transition-delay: 0.08s; }
.about-body.visible             { transition-delay: 0.16s; }
.product-card.visible:nth-child(2) { transition-delay: 0.1s; }
.product-card.visible:nth-child(3) { transition-delay: 0.2s; }

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-card-soon {
    grid-column: 1 / -1;
  }
  .about-grid {
    gap: 40px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 720px) {
  .container { padding: 0 20px; }

  .site-header { padding: 14px 20px; }
  .site-header.scrolled { padding: 10px 20px; }

  .brand { gap: 10px; font-size: 12px; letter-spacing: 0.16em; }
  .brand-mark { width: 24px; height: 24px; }

  .menu-toggle { width: 40px; height: 40px; }
  .menu-toggle span { width: 17px; }

  .hero { padding: 60px 20px 56px; }
  .hero-mark { margin-bottom: 2px; }
  .eyebrow { font-size: 13px; margin-bottom: 22px; letter-spacing: 0.3em; }
  .hero-title { margin-bottom: 20px; }
  .hero-sub { font-size: 15px; line-height: 1.6; }

  .about, .products { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .product-card { min-height: 0; padding: 28px 24px 24px; }
  .product-card-soon { grid-column: auto; }

  .contact-cta { padding: 72px 0 64px; }
  .contact-btn { padding: 13px 20px 13px 18px; font-size: 13.5px; }

  .site-footer { padding: 24px 0; }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-meta { font-size: 8.5px; letter-spacing: 0.12em; text-align: left; }

  /* Less particle density on small screens */
  #circuit-bg { opacity: 0.4; }
}

@media (max-width: 420px) {
  .brand-text { display: none; }
  .hero-title { font-size: clamp(28px, 8vw, 38px); }
  .section-title { font-size: clamp(26px, 7vw, 34px); }
  .about-lead { font-size: 18px; }
  .menu a { font-size: clamp(34px, 11vw, 48px); }
  .menu ul { gap: 14px; }
  .menu-footer { margin-top: 40px; }
}

/* iOS safe areas */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .container {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .about .section-head,
  .about-lead,
  .about-body,
  .products .section-head,
  .product-card,
  .contact-action { opacity: 1; transform: none; }
  #circuit-bg { display: none; }
}

::selection {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
