/* ==========================================================================
   Bluelight Studios — Design Tokens
   Style: Dark, blue-glow tech studio (bespoke — brand-driven, not template)
   Type: Outfit (display) + Inter (body)
   ========================================================================== */

:root {
  /* Color */
  --color-bg: #05070c;
  --color-bg-alt: #090d16;
  --color-surface: #10152355;
  --color-surface-solid: #10152a;
  --color-border: rgba(148, 163, 184, 0.14);
  --color-border-strong: rgba(148, 163, 184, 0.28);

  --color-primary: #3b82f6;
  /* bluelight blue */
  --color-primary-light: #7db4ff;
  --color-primary-dim: #1d4ed8;
  --color-accent: #22d3ee;
  /* cyan spark */

  --color-text: #f4f6fb;
  --color-text-muted: #97a1b8;
  --color-text-faint: #5c6480;

  --color-on-primary: #04070d;

  /* Type */
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Spacing scale (8pt rhythm) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med: 300ms;
  --dur-slow: 600ms;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

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

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

button {
  font-family: inherit;
}

::selection {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-2);
  }
}

/* Background: layered glow field, fixed so it reads as an environment, not a decal */
.glow-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 480px at 82% -8%, rgba(59, 130, 246, 0.32), transparent 60%),
    radial-gradient(520px 420px at 8% 18%, rgba(34, 211, 238, 0.14), transparent 65%),
    linear-gradient(180deg, #05070c 0%, #05070c 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 7, 12, 0.72);
  border-bottom: 1px solid var(--color-border);
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  /* gap: 10px; */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo__icon {
  height: 50px;
}

.logo__title {
  height: 50px;
}

.logo__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.logo__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.logo__word {
  color: var(--color-text);
}

.logo__word em {
  font-style: normal;
  color: var(--color-primary-light);
}

.logo__tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav__link {
  font-size: 0.94rem;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}

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

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav__links .nav__mobile-cta {
  display: none;
}

.nav__menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 0 0 rgba(59, 130, 246, 0);
}

.btn--primary:hover {
  background: var(--color-primary-light);
  box-shadow: 0 8px 30px -6px rgba(59, 130, 246, 0.55);
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn--ghost:hover {
  border-color: var(--color-primary-light);
  background: rgba(59, 130, 246, 0.08);
}

.btn--sm {
  height: 40px;
  padding: 0 18px;
  font-size: 0.88rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-7) 0 var(--space-6);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-6);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: rgba(59, 130, 246, 0.07);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary-light);
  box-shadow: 0 0 10px 2px rgba(96, 165, 250, 0.75);
  flex: none;
}

.hero__title {
  font-size: clamp(2.4rem, 5.4vw, 4.3rem);
  color: var(--color-text);
}

.hero__title .accent {
  background: linear-gradient(96deg, var(--color-primary-light), var(--color-accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin-top: var(--space-3);
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.hero__meta {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.hero__meta-item .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  display: block;
}

.hero__meta-item .label {
  font-size: 0.85rem;
  color: var(--color-text-faint);
}

/* Hero visual: abstract "bluelight" mark, built from layered rings + shards, not a stock photo */
.hero__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__orb {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(125, 180, 255, 0.55), rgba(59, 130, 246, 0.12) 55%, transparent 72%);
  filter: blur(2px);
}

.hero__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
}

.hero__ring--1 {
  width: 100%;
  height: 100%;
}

.hero__ring--2 {
  width: 72%;
  height: 72%;
  border-color: rgba(59, 130, 246, 0.35);
}

.hero__ring--3 {
  width: 46%;
  height: 46%;
  border-color: rgba(34, 211, 238, 0.3);
}

.hero__panel {
  position: absolute;
  width: 168px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong);
  background: rgba(16, 21, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

.hero__panel--code {
  top: 6%;
  left: -6%;
  font-family: "SFMono-Regular", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--color-primary-light);
  line-height: 1.6;
}

.hero__panel--code .dim {
  color: var(--color-text-faint);
}

.hero__panel--metric {
  bottom: 4%;
  right: -8%;
}

.hero__panel--metric .metric-label {
  font-size: 0.72rem;
  color: var(--color-text-faint);
  margin-bottom: 6px;
}

.hero__panel--metric .metric-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.hero__panel--metric .metric-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
  margin-top: 10px;
}

.hero__panel--metric .metric-bars span {
  flex: 1;
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary));
  border-radius: 2px;
}

/* ---------- Section scaffolding ---------- */
section {
  padding: var(--space-7) 0;
}

.section__eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-2);
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section__title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

.section__desc {
  color: var(--color-text-muted);
  max-width: 42ch;
  font-size: 1.02rem;
}

/* ---------- About: Profile + Mission ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.about__profile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about__profile p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 68ch;
}

.about__mission {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-strong);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.12), rgba(16, 21, 42, 0.5));
  overflow: hidden;
}

.about__mission::after {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
  pointer-events: none;
}

.about__mission-icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary-light);
  position: relative;
}

.about__mission-label {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  position: relative;
}

.about__mission-text {
  margin-top: var(--space-2);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.65;
  position: relative;
}

/* ---------- Value strip ---------- */
.value-strip {
  padding-top: 0;
  padding-bottom: var(--space-6);
}

.value-strip__row {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.value-strip__item {
  flex: 1 1 220px;
  display: flex;
  gap: var(--space-2);
}

.value-strip__icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--color-primary-light);
}

.value-strip__item p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.value-strip__item strong {
  display: block;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ---------- Services ---------- */
.services {
  background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.03) 40%, transparent);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.service-card {
  grid-column: span 1;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  transition: border-color var(--dur-med) var(--ease-out),
    transform var(--dur-med) var(--ease-out),
    background var(--dur-med) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 140px at 20% 0%, rgba(59, 130, 246, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out);
}

.service-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card--wide {
  grid-column: span 2;
}

.service-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-primary-light);
  margin-bottom: var(--space-3);
  position: relative;
}

.service-card__icon svg {
  width: 22px;
  height: 22px;
}

.service-card__index {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--color-text-faint);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  position: relative;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-3);
  position: relative;
}

.tag {
  font-size: 0.76rem;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-strong);
  padding: var(--space-6) var(--space-5);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(16, 21, 42, 0.4));
  text-align: center;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 220%;
  background: radial-gradient(480px 260px at 50% 0%, rgba(34, 211, 238, 0.22), transparent 65%);
  pointer-events: none;
}

.cta-band h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  max-width: 22ch;
  margin: 0 auto;
  position: relative;
}

.cta-band p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-band__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  position: relative;
  flex-wrap: wrap;
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.contact__info-item {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
}

.contact__info-item:first-child {
  border-top: none;
  padding-top: 0;
}

.contact__info-icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--color-primary-light);
  margin-top: 2px;
}

.contact__info-item strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 4px;
}

.contact__info-item span,
.contact__info-item a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.contact__info-item a:hover {
  color: var(--color-primary-light);
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

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

.field label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.field input,
.field textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  min-height: 48px;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--color-primary-light);
  background: rgba(59, 130, 246, 0.06);
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-text-faint);
}

.form__note {
  font-size: 0.8rem;
  color: var(--color-text-faint);
  margin-top: 4px;
  transition: color var(--dur-fast) var(--ease-out);
}

.form__note--success {
  color: var(--color-primary-light);
}

.form__note--error {
  color: #f87171;
}

/* Honeypot: kept in normal flow (not display:none) so it still fools bots
   that skip hidden fields, but moved fully off-screen for sighted users and
   out of the tab order / AT tree for keyboard and screen-reader users. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0 var(--space-4);
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding-bottom: var(--space-5);
}

.footer__brand p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  max-width: 32ch;
  font-size: 0.92rem;
}

.footer__cols {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__col h4 {
  font-size: 0.85rem;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.footer__col a,
.footer__col span {
  display: block;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

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

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer__bottom p {
  font-size: 0.82rem;
  color: var(--color-text-faint);
}

.footer__social {
  display: flex;
  gap: var(--space-2);
}

.footer__social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.footer__social a:hover {
  color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

.footer__social svg {
  width: 16px;
  height: 16px;
}

/* ---------- Reveal-on-scroll (respects reduced motion) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    width: 100%;
    max-width: 420px;
    margin: var(--space-6) auto 0;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

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

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__menu-btn {
    display: flex;
  }

  .nav__actions .btn--primary {
    display: none;
  }

  .logo__word {
    font-size: 0.98rem;
  }

  .logo__tagline {
    display: none;
  }

  .nav__links .nav__mobile-cta {
    display: inline-flex;
    margin-top: var(--space-1);
    align-self: flex-start;
  }

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

  .service-card--wide {
    grid-column: span 1;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

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

  .footer__top {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero__panel {
    width: 140px;
  }

  .hero__panel--code {
    left: -2%;
  }

  .hero__panel--metric {
    right: -2%;
  }

  .value-strip__row {
    flex-direction: column;
    gap: var(--space-3);
  }
}