/* ============================================================
   BRYGHTBYTE — Main Stylesheet
   ============================================================ */

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

:root {
  --bg:          #080b14;
  --bg-2:        #0d1120;
  --bg-3:        #111827;
  --border:      rgba(255,255,255,0.07);
  --border-glow: rgba(99,102,241,0.35);
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;
  --primary:     #6366f1;
  --primary-2:   #818cf8;
  --accent:      #8b5cf6;
  --accent-2:    #a78bfa;
  --n8n:         #ea5234;
  --claude:      #cc785c;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 4px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary-2), var(--accent-2), #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.5);
}

.btn--ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--border-glow);
  color: var(--text);
  background: rgba(99,102,241,0.08);
}

.btn--sm { padding: 10px 20px; font-size: 0.875rem; }
.btn--full { width: 100%; }

/* ---------- Section ---------- */
section { padding: 96px 0; }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 16px auto 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--primary-2);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}

.nav--scrolled {
  padding: 12px 0;
  background: rgba(8,11,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav__logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.logo-bright { color: #fff; }
.logo-byte   { color: var(--primary); }

.nav__links {
  display: flex;
  list-style: none;
  gap: 36px;
}
.nav__links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.2s;
}
.lang-toggle:hover { border-color: var(--border-glow); color: var(--text); }
.lang-toggle__active { color: var(--primary-2); }
.lang-toggle__sep    { opacity: 0.3; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Grid lines */
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 0%, transparent 70%);
}

/* Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
}
.orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--primary), transparent 70%);
  top: -100px; left: -150px;
  animation: orb-float 12s ease-in-out infinite;
}
.orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: 0; right: -100px;
  animation: orb-float 15s ease-in-out infinite reverse;
}
.orb--3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  bottom: 50px; left: 30%;
  animation: orb-float 10s ease-in-out infinite 2s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(30px, -40px) scale(1.05); }
}

.hero__content {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-2);
  animation: fade-in 0.8s ease both;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero__title {
  max-width: 820px;
  animation: fade-up 0.8s ease 0.1s both;
}

.hero__sub {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.1rem;
  animation: fade-up 0.8s ease 0.2s both;
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-up 0.8s ease 0.3s both;
}

/* Stats */
.hero__stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  padding: 24px 32px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  animation: fade-up 0.8s ease 0.4s both;
}
.stat { text-align: center; }
.stat__number {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}
.stat__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stat__divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fade-in 1s ease 1s both;
}
.scroll-hint__arrow {
  width: 22px; height: 22px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scroll-bounce 1.6s ease infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: 1; }
  50%       { transform: rotate(45deg) translate(5px,5px); opacity: 0.4; }
}

@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ============================================================
   SERVICES
   ============================================================ */
.services { background: var(--bg-2); }

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

.service-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.service-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.service-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 32px;
  border-color: rgba(99,102,241,0.25);
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.04));
}
.service-card--featured .service-card__icon {
  grid-row: 1 / 2;
  grid-column: 1;
}
.service-card--featured h3     { grid-column: 2; grid-row: 1; align-self: end; }
.service-card--featured p      { grid-column: 1 / -1; }
.service-card--featured .service-card__list { grid-column: 1 / -1; }

.service-card__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--primary-2);
  margin-bottom: 20px;
}
.service-card__icon svg { width: 24px; height: 24px; }

.service-card h3 { margin-bottom: 12px; }
.service-card p  { color: var(--text-dim); font-size: 0.95rem; line-height: 1.7; margin-bottom: 20px; }

.service-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-card__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.service-card__list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ============================================================
   STACK
   ============================================================ */
.stack { background: var(--bg); }

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

.tech-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.tech-card:hover { transform: translateY(-4px); }

.tech-card--openclaw:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 40px rgba(99,102,241,0.15);
}
.tech-card--n8n:hover {
  border-color: rgba(234,82,52,0.4);
  box-shadow: 0 0 40px rgba(234,82,52,0.12);
}
.tech-card--claude:hover {
  border-color: rgba(204,120,92,0.4);
  box-shadow: 0 0 40px rgba(204,120,92,0.12);
}

.tech-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.tech-card__logo {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tech-card__logo svg { width: 100%; height: 100%; }

.tech-card__name h3    { font-size: 1.15rem; }
.tech-card p           { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }

.tech-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.tech-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-card__tags span {
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ============================================================
   PROCESS
   ============================================================ */
.process { background: var(--bg-2); }

.process__steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.process-step {
  flex: 1;
  padding: 36px 28px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s;
}
.process-step:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
}

.process-step__connector {
  width: 32px;
  flex-shrink: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--border-glow), var(--border));
  align-self: center;
  position: relative;
  top: -8px;
}
.process-step__connector::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -4px;
  border-left: 8px solid var(--border-glow);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.process-step__num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(99,102,241,0.4);
  line-height: 1;
  margin-bottom: 16px;
}

.process-step__body h3 { margin-bottom: 10px; font-size: 1.05rem; }
.process-step__body p  { color: var(--text-dim); font-size: 0.875rem; line-height: 1.7; }

/* ============================================================
   WHY US
   ============================================================ */
.why { background: var(--bg); padding: 100px 0; }

.why__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.why__text .section-tag { display: inline-flex; }
.why__text h2 { margin: 16px 0 20px; }
.why__text > p { color: var(--text-dim); font-size: 1rem; line-height: 1.8; margin-bottom: 32px; }

.why__features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.why-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.why-feature__icon {
  width: 22px; height: 22px;
  background: rgba(99,102,241,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary-2);
}
.why-feature__icon svg { width: 13px; height: 13px; }

/* Agent diagram */
.why__visual { display: flex; align-items: center; justify-content: center; }

.agent-diagram {
  position: relative;
  width: 320px; height: 320px;
}

.agent-diagram__lines {
  position: absolute;
  inset: 0;
}
.agent-diagram__lines svg {
  width: 100%; height: 100%;
  animation: rotate-lines 20s linear infinite;
}
@keyframes rotate-lines {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.agent-diagram__center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.agent-diagram__nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.agent-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: border-color 0.3s;
}
.agent-node:hover { border-color: var(--border-glow); color: var(--primary-2); }
.agent-node svg { width: 20px; height: 20px; }

.agent-node--main {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border-color: rgba(99,102,241,0.3);
  color: var(--primary-2);
  font-size: 0.75rem;
}

.agent-node--top    { top: 20px;  left: 50%; transform: translateX(-50%); }
.agent-node--right  { top: 50%;  right: 20px; transform: translateY(-50%); }
.agent-node--bottom { bottom: 20px; left: 50%; transform: translateX(-50%); }
.agent-node--left   { top: 50%;  left: 20px; transform: translateY(-50%); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--bg-2); }

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.contact__text .section-tag { display: inline-flex; }
.contact__text h2 { margin: 16px 0 20px; }
.contact__text > p { color: var(--text-dim); font-size: 1rem; line-height: 1.8; margin-bottom: 32px; }

.contact__info { display: flex; flex-direction: column; gap: 14px; }
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.contact-info-item svg { width: 18px; height: 18px; color: var(--primary-2); flex-shrink: 0; }
.contact-info-item__flag { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select { appearance: none; cursor: pointer; color: var(--text-dim); }
.form-group select option { background: var(--bg-3); color: var(--text); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 72px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
  margin-bottom: 56px;
}

.footer__brand .nav__logo { margin-bottom: 16px; display: inline-block; }
.footer__brand p          { color: var(--text-muted); font-size: 0.875rem; line-height: 1.8; }

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

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer__col a {
  font-size: 0.875rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer__origin {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .stack__grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .why__inner  { grid-template-columns: 1fr; gap: 48px; }
  .why__visual { display: none; }
}

@media (max-width: 860px) {
  .services__grid { grid-template-columns: 1fr; }
  .service-card--featured {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .service-card--featured .service-card__icon { grid-row: auto; grid-column: auto; }
  .service-card--featured h3,
  .service-card--featured p,
  .service-card--featured .service-card__list { grid-column: auto; }

  .process__steps { flex-direction: column; }
  .process-step__connector {
    width: 2px; height: 32px;
    align-self: flex-start;
    margin-left: 36px;
    background: linear-gradient(180deg, var(--border-glow), var(--border));
    top: 0;
  }
  .process-step__connector::after {
    top: auto; bottom: -5px; right: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid var(--border-glow);
  }

  .contact__inner { grid-template-columns: 1fr; gap: 48px; }
  .footer__inner  { grid-template-columns: 1fr; gap: 40px; }
  .footer__links  { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  section { padding: 72px 0; }

  .nav__links { display: none; }

  .hero__stats {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
  }
  .stat__divider { width: 40px; height: 1px; }

  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }

  .form-row { grid-template-columns: 1fr; }

  .contact__form { padding: 28px 20px; }

  .footer__links  { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}
