/* =================================================================
   SYNTRIX STUDIO — GLOBAL + HOMEPAGE STYLESHEET
   -----------------------------------------------------------------
   Shared across every page: theme tokens, glassmorphism, buttons,
   navbar, footer, floating contact menu, scroll animations — plus
   homepage-only pieces (hero terminal, stats counters, the "working
   flow" steps, testimonial carousel). The site is hardcoded to a
   single dark theme — there is no light-mode toggle.

   Careers-page-only styles (the application form, file upload,
   hiring-process numbers, status modal) live in careers.css instead,
   loaded only on careers.html, per the requested modular split.

   👉 TO RESTYLE THE WHOLE SITE: edit the variables in section [1].
   Everything else references those variables, so changing a hex
   code there updates every page at once — including careers.html,
   since careers.css reuses the same variable names.
   ================================================================= */

/* -----------------------------------------------------------------
   [1] THEME TOKENS — hardcoded, single dark palette (no toggle)
   -----------------------------------------------------------------
   These are the exact tokens from the Syntrix Studio design system.
   👉 TO RESTYLE THE WHOLE SITE: edit the values here only.

   The second block below (--bg, --cyan, --blue, etc.) are internal
   aliases. Every component class in this file — and every inline
   `style="color:var(--cyan)"` across ALL pages — points at those
   alias names. Keeping them means the whole site (including pages
   not touched in this update) repaints with the new brand colors
   automatically, with nothing else to find-and-replace.
   ----------------------------------------------------------------- */
:root {
  --bg-primary: #0A0F1C;
  --bg-secondary: #111B27;
  --accent-teal: #00F0A6;
  --accent-purple: #7C3AED;
  --highlight-yellow: #FFE600;
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --border-color: #1F2D37;
  --font-headings: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* internal aliases used throughout this stylesheet + every page */
  --bg: var(--bg-primary);
  --bg-soft: var(--bg-secondary);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: var(--border-color);
  --text: var(--text-primary);
  --text-muted: var(--text-secondary);
  --cyan: var(--accent-teal);
  --blue: var(--accent-purple);
  --gradient: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-purple) 100%);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --grid-dot: rgba(255, 255, 255, 0.07);
}

/* -----------------------------------------------------------------
   [2] BASE
   ----------------------------------------------------------------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* offset for sticky navbar when jumping to #anchors */
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: background-color 0.4s ease, color 0.4s ease;
}

::selection { background: var(--cyan); color: #021014; }

/* Thin accent scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* Visible, on-brand focus ring for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -----------------------------------------------------------------
   [3] LAYOUT HELPERS
   ----------------------------------------------------------------- */
.container-custom { max-width: 1240px; margin-inline: auto; padding-inline: 1.25rem; }

.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }

/* Faint dot-grid texture used behind hero / dark sections for a "circuit board" feel */
.bg-grid {
  background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* Soft glowing blobs for hero atmosphere */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 50%, transparent);
}

/* Eyebrow / comment-style section label, e.g. "// 01 — services" */
.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--cyan);
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -----------------------------------------------------------------
   [4] GLASSMORPHISM
   ----------------------------------------------------------------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}

.glass-strong {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

/* Lift + glow on hover, used on cards across the site */
.card-hover {
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 166, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 240, 166, 0.12);
}

/* -----------------------------------------------------------------
   [5] BUTTONS
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient);
  color: #021014;
  box-shadow: 0 8px 24px rgba(0, 240, 166, 0.25);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(0, 240, 166, 0.4); }

.btn-secondary {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--cyan); }

.btn-ghost {
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { color: var(--cyan); }

/* -----------------------------------------------------------------
   [6] NAVBAR
   ----------------------------------------------------------------- */
.navbar {
  background: rgba(10, 15, 28, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.navbar.scrolled { border-bottom-color: var(--border); }

.nav-link {
  position: relative;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

#mobile-menu { max-height: 0; transition: max-height 0.35s ease, opacity 0.3s ease; }

/* Logo size — change these two values to resize the logo everywhere */
.brand-logo { width: 52px; height: 52px; }   /* navbar logo */
.footer-logo { width: 44px; height: 44px; }  /* footer logo */

/* -----------------------------------------------------------------
   [7] HERO TERMINAL (signature element)
   ----------------------------------------------------------------- */
.terminal {
  font-family: 'Space Mono', monospace;
  font-size: 0.86rem;
  line-height: 1.7;
}
.terminal-dots span {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
}
.cursor {
  display: inline-block;
  width: 7px; height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* -----------------------------------------------------------------
   [8] PROCESS / WORKING FLOW STEPS
   ----------------------------------------------------------------- */
.step-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--cyan);
}
.step-line {
  background: linear-gradient(90deg, var(--cyan), transparent);
  height: 1px;
}

/* -----------------------------------------------------------------
   [9] FAQ ACCORDION
   Pure-CSS smooth expand using the grid-template-rows 0fr -> 1fr
   technique, toggled by a single class from main.js.
   ----------------------------------------------------------------- */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s ease;
}
.faq-answer-inner { overflow: hidden; min-height: 0; }
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.3s ease; }
.faq-trigger { cursor: pointer; }

/* -----------------------------------------------------------------
   [10] TESTIMONIAL CAROUSEL (scroll-snap, no JS state needed)
   ----------------------------------------------------------------- */
.testi-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.testi-track::-webkit-scrollbar { display: none; }
.testi-card { scroll-snap-align: start; flex: 0 0 min(100%, 340px); }

/* -----------------------------------------------------------------
   [11] FLOATING CONTACT MENU
   ----------------------------------------------------------------- */
.fab-wrap {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}
.fab-item {
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.fab-wrap.open .fab-item { opacity: 1; transform: none; pointer-events: auto; }
.fab-wrap.open .fab-item:nth-child(1) { transition-delay: 0.18s; }
.fab-wrap.open .fab-item:nth-child(2) { transition-delay: 0.14s; }
.fab-wrap.open .fab-item:nth-child(3) { transition-delay: 0.1s; }
.fab-wrap.open .fab-item:nth-child(4) { transition-delay: 0.06s; }
.fab-wrap.open .fab-item:nth-child(5) { transition-delay: 0.03s; }
.fab-wrap.open .fab-item:nth-child(6) { transition-delay: 0s; }

.fab-main {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--gradient);
  color: #021014;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 240, 166, 0.35);
  cursor: pointer;
  border: none;
  position: relative;
}
/* Menu (hamburger) icon morphs into a crisp X when the FAB is open */
.fab-icon-menu, .fab-icon-close {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.fab-icon-menu { opacity: 1; transform: rotate(0deg) scale(1); }
.fab-icon-close { opacity: 0; transform: rotate(-45deg) scale(0.6); }
.fab-wrap.open .fab-icon-menu { opacity: 0; transform: rotate(45deg) scale(0.6); }
.fab-wrap.open .fab-icon-close { opacity: 1; transform: rotate(0deg) scale(1); }

.fab-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
}

/* -----------------------------------------------------------------
   [12] SCROLL REVEAL
   Elements with [data-reveal] fade/slide in once visible.
   Controlled by an IntersectionObserver in script.js.

   IMPORTANT: these rules only apply once <html> has a "js" class.
   That class is added by a tiny inline script at the very top of
   <head> (see any page's <head>), which only runs if JS is actually
   executing. If a script is ever blocked, 404s, or fails for any
   reason, <html> never gets "js", these rules never apply, and every
   [data-reveal] element is fully visible by default instead of
   silently stuck at opacity:0 forever. Content should never depend
   on JavaScript to simply be visible — only the animation should.
   ----------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js [data-reveal].in-view { opacity: 1; transform: none; }

/* -----------------------------------------------------------------
   [13] MISC COMPONENTS
   ----------------------------------------------------------------- */
.badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.mockup-window {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.mockup-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.mockup-bar span { width: 9px; height: 9px; border-radius: 50%; }
.mockup-bar .dot-red { background: #ef4444; }
.mockup-bar .dot-amber { background: #f59e0b; }
.mockup-bar .dot-green { background: #22c55e; }

/* Gradient fill block — combine with Tailwind's opacity-* utilities
   (e.g. class="gradient-fill opacity-25") instead of an inline style */
.gradient-fill { background: var(--gradient); }

/* Filter buttons on the portfolio page */
.filter-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: all 0.25s ease;
  cursor: pointer;
}
.filter-btn.active {
  color: #021014;
  background: var(--gradient);
  border-color: transparent;
}
.portfolio-card.is-hidden { display: none; }

/* -----------------------------------------------------------------
   [15] STORY TIMELINE & PULL-QUOTE (About page)
   ----------------------------------------------------------------- */
.timeline-rail {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 1px;
  background: linear-gradient(180deg, var(--border) 85%, transparent);
}
.timeline-node {
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
/* Node "lights up" with the brand gradient once its chapter scrolls into view */
[data-reveal].in-view .timeline-node {
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 0 0 5px rgba(0, 240, 166, 0.15);
}

.pull-quote {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.3;
}

/* Dashed-circle placeholder used for team avatars until real photos are added */
.avatar-placeholder {
  border: 1.5px dashed var(--border);
  transition: border-color 0.3s ease;
}
.card-hover:hover .avatar-placeholder { border-color: var(--cyan); }

/* -----------------------------------------------------------------
   [17] ACCESSIBILITY: reduced motion (extends sections 12 / 14 above)
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .cursor { animation: none; }
  * { scroll-behavior: auto !important; }
}
