/* ============================================
   ScaleOps — Custom Properties
   ============================================ */
:root {
  --bg: #0a0a0f;
  --bg-raised: #11121a;
  --bg-card: #14151e;
  --border: #23252f;
  --border-strong: #34374a;
  --text: #e7e8ec;
  --text-dim: #9a9cae;
  --text-faint: #5e6173;

  /* Primary accent: warm amber — used sparingly for emphasis & CTAs */
  --accent: #f5b25c;
  --accent-soft: rgba(245, 178, 92, 0.12);
  --accent-strong: #ffd08a;

  /* Secondary accent: cobalt — used for small highlight details only */
  --accent-2: #6e9bff;

  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;
  --font-sans: 'Sora', 'Inter', sans-serif;

  --max-width: 1240px;
  --radius: 6px;
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

input, select, textarea { font-family: inherit; font-size: 1rem; }

section { position: relative; }

/* ============================================
   Utility / shared
   ============================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.accent { color: var(--accent); }

.section-head {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
  padding: 0 1.5rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #1a1206;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Nav
   ============================================ */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 52px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover { color: var(--text); }

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-link:hover::after { width: 100%; }

.nav-cta { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 6px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: pulse 2s infinite;
  margin-right: 0.5rem;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 8px rgba(245, 178, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 178, 92, 0); }
}

/* Terminal */
.terminal-window {
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.terminal-dots { display: flex; gap: 6px; }

.t-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.t-dot-red { background: #ff5f56; }
.t-dot-yellow { background: #ffbd2e; }
.t-dot-green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-left: 0.25rem;
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 1.25rem 1.25rem 1.5rem;
  min-height: 220px;
  position: relative;
}

.terminal-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.line { display: block; color: var(--text); }
.prompt { color: var(--accent); margin-right: 0.5rem; }
.out { color: var(--text-faint); }

.terminal-dynamic {
  display: inline;
  color: var(--accent);
}

.cursor {
  color: var(--accent);
  font-family: var(--font-mono);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ============================================
   Stats bar
   ============================================ */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* ============================================
   Services
   ============================================ */
.services {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -16px rgba(245, 178, 92, 0.25);
}

.service-index {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.service-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ============================================
   Work
   ============================================ */
.work {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.work-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.work-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.work-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.work-card h3 {
  font-size: 1.05rem;
}

.work-tag-domain {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-2);
  border: 1px solid var(--border-strong);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

.work-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tech-tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
}

.work-link {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  align-self: flex-start;
  transition: border-color 0.2s ease;
}

.work-link:hover {
  border-color: var(--accent);
}

/* ============================================
   Team
   ============================================ */
.team {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.team-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.team-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  border: 2px solid var(--border-strong);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.team-bio {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.team-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.team-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.team-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   About
   ============================================ */
.about {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-copy h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1.25rem;
}

.about-copy p {
  color: var(--text-dim);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.about-card h3 {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 1rem;
}

.ethos-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-dim);
}

.ethos-list li:last-child { border-bottom: none; }

.ethos-mark { color: var(--accent); font-family: var(--font-mono); }

/* ============================================
   Process
   ============================================ */
.process {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  background: var(--bg-card);
  border-radius: var(--radius);
}

.process-num {
  display: block;
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.process-step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.process-step p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ============================================
   CTA / Contact
   ============================================ */
.cta {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
}

.cta-copy h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
}

.cta-copy p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.cta-direct {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.cta-direct-label { color: var(--text-faint); }

.cta-direct-email { color: var(--accent); font-size: 1.05rem; }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row input.invalid,
.form-row select.invalid,
.form-row textarea.invalid {
  border-color: #ff5f56;
}

.form-error {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #ff8478;
  min-height: 1em;
}

.form-submit {
  margin-top: 0.5rem;
  width: 100%;
}

.form-success {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-align: center;
  min-height: 1em;
  margin: 0;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.footer-nav, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav h4, .footer-contact h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-nav a, .footer-contact a {
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover, .footer-contact a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.25rem 1.5rem;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-terminal { order: -1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .process-timeline { grid-template-columns: repeat(2, 1fr); }
  .cta-grid { grid-template-columns: 1fr; padding: 2rem; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-cta { width: 100%; justify-content: center; }
}

@media (max-width: 720px) {

  .services-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .process-timeline { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}