/* =================================================================
   UPLIT — Design tokens
   White / black / blue. Blue values are sampled from the logo
   (#5b9aff -> #0450c9). Blue-light is reserved for glows/tints;
   flat text & border accents use the darker --blue for contrast on white.
   ================================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: rgba(13,17,23,0.03);
  --surface-strong: rgba(13,17,23,0.05);
  --border: rgba(13,17,23,0.1);
  --border-strong: rgba(13,17,23,0.16);

  --text: #101114;
  --muted: #5a5e6b;
  --faint: #8b8f9c;

  --navy: #10213d;
  --blue: #0d6bff;
  --blue-light: #5b9aff;
  --blue-deep: #0450c9;
  --gradient: linear-gradient(120deg, var(--blue-light), var(--blue) 55%, var(--blue-deep));

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --wrap: 1160px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ============================== Reset / base ============================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 1px 1px, rgba(13,17,23,0.07) 1px, transparent 0);
  background-size: 30px 30px;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
section { position: relative; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.accent { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}

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

@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;
  }
}

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ============================== Header ============================== */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
header.scrolled { border-bottom-color: var(--border); background: rgba(255,255,255,0.92); }
nav.wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 30px; width: auto; }
.brand-mark-fallback {
  display: none; height: 30px; width: 30px; border-radius: 8px;
  background: var(--gradient); align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: #ffffff; font-size: 0.85rem;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.nav-cta) { position: relative; font-size: 0.92rem; color: var(--muted); transition: color .2s; padding-bottom: 3px; }
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gradient); transition: right .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-links a:not(.nav-cta):hover::after { right: 0; }
.nav-cta {
  font-family: var(--font-body); font-size: 0.82rem; padding: 10px 20px; border-radius: 100px;
  border: 1px solid var(--border-strong); transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--blue); background: var(--surface); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== Buttons ============================== */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.88rem; padding: 13px 24px; border-radius: 100px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn-primary { background: var(--gradient); color: #ffffff; font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(13,107,255,0.4); }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--blue); background: var(--surface); transform: translateY(-2px); }
.btn-primary.large { padding: 18px 34px; font-size: 1rem; }

/* ============================== Hero ============================== */
.hero {
  padding: 60px 28px 50px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; position: relative;
}

.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.74rem; letter-spacing: 0.06em;
  color: var(--muted); border: 1px solid var(--border); padding: 6px 14px 6px 10px; border-radius: 100px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(13,107,255,0.45); }
  70% { box-shadow: 0 0 0 8px rgba(13,107,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(13,107,255,0); }
}

.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.12; max-width: 15ch; color: var(--text); }
.type-target { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cursor { color: var(--blue); font-weight: 400; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.lead { font-size: 1.08rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }

.hero-stack { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.stack-tag {
  font-family: var(--font-body); font-size: 0.76rem; padding: 6px 13px; border-radius: 100px;
  border: 1px solid var(--border-strong); color: var(--text);
}
.stack-tag.primary { border-color: rgba(13,107,255,0.35); background: rgba(13,107,255,0.08); color: var(--blue); }
.stack-tag.secondary { color: var(--faint); border-color: var(--border); font-size: 0.73rem; }

/* --- hero visual: animated orbital particle system around the real logo --- */
.hero-mark { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.orbit-system { position: relative; width: 340px; height: 340px; transition: transform .3s ease-out; }

.orbit-glow {
  position: absolute; inset: -18%; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,107,255,0.16), rgba(91,154,255,0.05) 55%, transparent 72%);
}

.orbit-rings { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 42s linear infinite; }
.orbit-rings.ring-2 { animation: spin 30s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.orbit-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 26%; height: 26%;
  filter: drop-shadow(0 10px 26px rgba(13,107,255,0.4));
}
.orbit-logo img { width: 100%; height: auto; }

.orbit-label {
  position: absolute; background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 100px; padding: 7px 14px; font-family: var(--font-body); font-size: 0.72rem;
  color: var(--text); box-shadow: 0 10px 24px -10px rgba(13,17,23,0.22); white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}
.label-1 { top: 2%; left: -6%; animation-delay: 0s; }
.label-2 { top: 32%; right: -14%; animation-delay: 1.4s; }
.label-3 { bottom: 16%; left: -14%; animation-delay: 2.7s; }
.label-4 { bottom: -1%; right: 2%; animation-delay: 0.8s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hero-mark .hero-wordmark { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.25em; color: var(--faint); text-transform: uppercase; }

/* ============================== Section head ============================== */
.section-head { max-width: 640px; margin-bottom: 46px; display: flex; flex-direction: column; gap: 14px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* ============================== Services ============================== */
.services { padding: 40px 28px 50px; }
.service-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.service-tab {
  font-family: var(--font-body); font-size: 0.85rem; padding: 11px 20px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--muted); transition: all .25s var(--ease);
}
.service-tab:hover { color: var(--text); border-color: var(--border-strong); }
.service-tab.active { color: #ffffff; background: var(--gradient); border-color: transparent; font-weight: 600; }

.service-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 44px;
}
.panel-copy { display: flex; flex-direction: column; gap: 16px; }
.panel-copy h3 { font-size: 1.5rem; }
.panel-copy > p { color: var(--muted); line-height: 1.7; }
.panel-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.panel-list li { position: relative; padding-left: 22px; font-size: 0.94rem; color: var(--text); }
.panel-list li::before {
  content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 2px;
  background: var(--gradient); transform: rotate(45deg);
}
.panel-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-chip { font-family: var(--font-body); font-size: 0.72rem; color: var(--blue); background: rgba(13,107,255,0.08); border: 1px solid rgba(13,107,255,0.22); padding: 5px 11px; border-radius: 100px; }

.panel-visual { display: flex; flex-direction: column; }
.code-chrome { display: flex; gap: 6px; padding: 14px 16px; background: #1a1c22; border: 1px solid #262931; border-bottom: none; border-radius: 10px 10px 0 0; }
.code-chrome span { width: 10px; height: 10px; border-radius: 50%; }
.code-chrome span:nth-child(1) { background: #ff5f57; }
.code-chrome span:nth-child(2) { background: #febc2e; }
.code-chrome span:nth-child(3) { background: #28c840; }
.code-block {
  flex: 1; margin: 0; padding: 22px; background: #14161b;
  border: 1px solid #262931; border-radius: 0 0 10px 10px;
  font-family: var(--font-mono); font-size: 0.83rem; line-height: 1.7; color: #cdd3e0;
  overflow-x: auto; white-space: pre;
}
.tok-kw { color: #7fb2ff; }
.tok-str { color: #6ad089; }
.tok-com { color: #767c8c; font-style: italic; }
.tok-fn { color: #c896f0; }

.secondary-strip {
  margin-top: 24px; padding: 22px 28px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
}
.secondary-strip .secondary-label { font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.secondary-strip p { color: var(--muted); font-size: 0.92rem; }

.service-panel.is-switching .panel-copy, .service-panel.is-switching .panel-visual { opacity: 0; transform: translateY(6px); }
.panel-copy, .panel-visual { transition: opacity .22s var(--ease), transform .22s var(--ease); }

/* ============================== Process ============================== */
.process { padding: 40px 28px 50px; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; position: relative; }
.process-grid::before {
  content: ''; position: absolute; top: 19px; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 15%, var(--border-strong) 85%, transparent);
}
.process-step { display: flex; flex-direction: column; gap: 12px; position: relative; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-size: 0.85rem; background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--muted); position: relative; z-index: 1; transition: border-color .3s, color .3s, box-shadow .3s;
}
.process-step.is-visible .step-num { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 5px rgba(13,107,255,0.08); }
.process-step h4 { font-size: 1.08rem; }
.process-step p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }

/* ============================== Work ============================== */
.work { padding: 40px 28px 50px; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
  display: flex; flex-direction: column; gap: 12px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.work-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 20px 34px -22px rgba(13,107,255,0.3); }
.work-card h4 { font-size: 1.12rem; }
.work-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }

/* ============================== CTA ============================== */
.cta-band {
  padding: 60px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px;
  border-top: 1px solid var(--border); margin-top: 0; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); max-width: 16ch; }
.cta-band .btn-primary { margin-top: 10px; }
.cta-alt-link { text-decoration: underline; text-underline-offset: 3px; }
.cta-alt-link:hover { color: var(--blue); }

/* ============================== Footer ============================== */
footer { border-top: 1px solid var(--border); padding: 40px 28px; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-links { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 0.9rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ============================== Contact / Demo modal ============================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16,17,20,0.5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease);
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; max-width: 440px; width: 100%; position: relative;
  transform: translateY(14px); transition: transform .25s var(--ease);
  box-shadow: 0 30px 60px -20px rgba(13,17,23,0.28);
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); font-size: 1.2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.modal-close:hover { border-color: var(--blue); color: var(--blue); }
.modal h3 { font-size: 1.4rem; margin-bottom: 6px; }
.modal p.muted { margin-bottom: 20px; font-size: 0.92rem; }

#contactForm { display: flex; flex-direction: column; gap: 14px; }
#contactForm label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
#contactForm input, #contactForm select, #contactForm textarea {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--text);
  padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-soft);
  transition: border-color .2s;
}
#contactForm input:focus, #contactForm select:focus, #contactForm textarea:focus { outline: none; border-color: var(--blue); }
#contactForm textarea { resize: vertical; min-height: 90px; font-family: var(--font-body); }
#contactForm button { margin-top: 4px; justify-content: center; width: 100%; }

/* ============================== Responsive ============================== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero-mark { order: -1; }
  .orbit-system { width: 220px; height: 220px; }
  .orbit-label { font-size: 0.64rem; padding: 5px 10px; }
  .hero-copy { align-items: flex-start; }
  .service-panel { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .process-grid::before { display: none; }
  .work-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  nav.wrap { height: 66px; }
  .nav-links {
    position: fixed; top: 66px; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(16px);
    flex-direction: column; justify-content: flex-start; align-items: flex-start;
    padding: 36px 28px; gap: 24px; transform: translateX(100%); transition: transform .35s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .hero { padding-top: 32px; }
  .orbit-system { width: 180px; height: 180px; }
  .label-2, .label-3 { display: none; }
  .process-grid { grid-template-columns: 1fr; }
  .service-tabs { gap: 8px; }
  .service-tab { font-size: 0.8rem; padding: 9px 16px; }
  .service-panel { padding: 26px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .modal { padding: 28px; }
}
