/* ═══════════════════════════════════════════
   NWSTMS — Main Stylesheet
   Content: 1200px, Layout: 1440px
   Grid: 12 col, 24px+ gutters
   ═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #080a0e;
  --bg2:     #0d1118;
  --bg3:     #12161f;
  --line:    #222840;
  --accent:  #c8ff00;
  --accent2: #00e5ff;
  --text:    #eef0f8;
  --text2:   #a8b0cc;
  --muted:   #6a7494;
  --card:    #0c0f18;
  --max-w:   1200px;
  --pad:     clamp(24px, 5vw, 80px);

  /* Type scale — spec: H1 32–48, H2 24–36, H3 18–24, body 14–16 */
  --h1:  clamp(32px, 5vw,   48px);
  --h2:  clamp(24px, 3.2vw, 36px);
  --h3:  clamp(18px, 2vw,   24px);
  --h3s: 20px;
  --body: 16px;
  --sm:   14px;
  --xs:   12px;

  --ff:  'Inter', sans-serif;
  --ffd: 'Syne', sans-serif;
  --ffm: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Utilities ── */
.section {
  padding: clamp(64px, 9vw, 112px) var(--pad);
  max-width: calc(var(--max-w) + var(--pad) * 2);
  margin: 0 auto;
}
.divider { width: 100%; height: 1px; background: var(--line); }

.h-display { font-family: var(--ffd); font-weight: 800; line-height: 1.06; letter-spacing: -.025em; }
.mono      { font-family: var(--ffm); }

.eyebrow {
  font-family: var(--ffm);
  font-size: var(--xs);
  color: var(--accent);
  letter-spacing: .2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}

/* ── Buttons  (min 44 × 44 per spec) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  font-family: var(--ffm); font-size: var(--sm);
  font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: none;
  transition: opacity .18s, transform .18s, background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #0a0c10; }
.btn-primary:hover { opacity: .88; transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(8,10,14,.93);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--ffd); font-weight: 800; font-size: 20px;
  color: var(--text); text-decoration: none; letter-spacing: .04em;
  display: flex; align-items: center; min-height: 44px;
}
.br { color: var(--accent); }

.nav-list { display: flex; align-items: center; gap: 36px; list-style: none; }

.nav-link {
  font-family: var(--ffm); font-size: var(--sm);
  color: var(--muted); text-decoration: none;
  letter-spacing: .07em; text-transform: uppercase;
  min-height: 44px; display: flex; align-items: center;
  transition: color .2s; position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 8px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--ffm); font-size: var(--sm);
  color: #0a0c10; background: var(--accent);
  padding: 0 20px; height: 44px;
  display: flex; align-items: center;
  text-decoration: none; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 500;
  transition: opacity .18s;
}
.nav-cta:hover { opacity: .85; }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 10px; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--text); transition: all .28s; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 72px var(--pad) 80px;
  position: relative; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .3;
  mask-image: radial-gradient(ellipse 80% 70% at 55% 45%, black 25%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 55% 45%, black 25%, transparent 100%);
}

.glow { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.glow-1 { width: 700px; height: 700px; background: rgba(200,255,0,.055); top: -12%; right: -6%;
  animation: gp 9s ease-in-out infinite alternate; }
.glow-2 { width: 500px; height: 500px; background: rgba(0,229,255,.04); bottom: 8%; left: 4%;
  animation: gp 13s ease-in-out infinite alternate-reverse; }
@keyframes gp { from{opacity:.4;transform:scale(1)} to{opacity:1;transform:scale(1.14)} }

.hero-inner { position: relative; z-index: 1; max-width: 820px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); padding: 8px 18px; margin-bottom: 36px;
  font-family: var(--ffm); font-size: var(--xs);
  color: var(--muted); letter-spacing: .15em; text-transform: uppercase;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: blink 2s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-title { font-size: var(--h1); margin-bottom: 24px; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: 17px; color: var(--text2); max-width: 58ch; line-height: 1.72; margin-bottom: 40px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  position: relative; z-index: 1;
  display: flex; align-items: stretch;
  border: 1px solid var(--line); width: fit-content; margin-top: 80px;
}
.stat { padding: 24px 44px; display: flex; flex-direction: column; gap: 8px; }
.stat-n { font-family: var(--ffd); font-weight: 800; font-size: 34px; line-height: 1; }
.stat-acc { color: var(--accent); }
.stat-l { font-family: var(--ffm); font-size: var(--xs); color: var(--muted); text-transform: uppercase; letter-spacing: .13em; }
.stat-sep { width: 1px; background: var(--line); }

/* ── Services ── */
.services-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.svc {
  background: var(--card); padding: 44px 36px;
  transition: background .28s;
  display: flex; flex-direction: column; gap: 16px;
}
.svc:hover, .svc-feat { background: var(--bg3); }
.svc-icon { font-size: 26px; color: var(--accent); }
.svc h3 { font-family: var(--ffd); font-weight: 700; font-size: var(--h3); }
.svc p  { font-size: var(--body); color: var(--text2); line-height: 1.68; max-width: 56ch; }
.svc ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.svc ul li { font-family: var(--ffm); font-size: var(--sm); color: var(--muted); padding-left: 20px; position: relative; }
.svc ul li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* ── Why ── */
.why-wrap { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: 380px 1fr; gap: 80px; align-items: start; }
.why-lead h2 { font-size: var(--h2); margin-bottom: 16px; }
.why-lead p  { font-size: var(--body); color: var(--text2); line-height: 1.7; max-width: 40ch; margin-bottom: 32px; }
.why-list { display: flex; flex-direction: column; }
.why-row {
  display: grid; grid-template-columns: 52px 1fr;
  gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line);
}
.why-row:first-child { border-top: 1px solid var(--line); }
.why-num { font-family: var(--ffm); font-size: var(--xs); color: var(--muted); padding-top: 4px; letter-spacing: .1em; }
.why-row h4 { font-family: var(--ffd); font-weight: 700; font-size: 18px; margin-bottom: 7px; }
.why-row p  { font-size: var(--body); color: var(--text2); line-height: 1.67; max-width: 54ch; }

/* ── Tech ── */
.tech-lead { font-size: var(--body); color: var(--text2); max-width: 52ch; line-height: 1.7; margin-bottom: 40px; }
.tech-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tech-card {
  background: var(--card); padding: 36px 32px;
  position: relative; overflow: hidden; transition: background .28s;
}
.tech-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity .28s;
}
.tech-card:hover { background: var(--bg3); }
.tech-card:hover::before { opacity: 1; }
.tech-ver { font-family: var(--ffm); font-size: var(--xs); color: var(--accent); letter-spacing: .1em; display: block; margin-bottom: 14px; }
.tech-card h4 { font-family: var(--ffd); font-weight: 700; font-size: 21px; margin-bottom: 10px; }
.tech-card p  { font-size: var(--body); color: var(--text2); line-height: 1.67; }

/* ── Contact CTA ── */
.cta-box {
  border: 1px solid var(--line); padding: clamp(48px,7vw,88px);
  text-align: center; max-width: 700px; margin: 0 auto;
  background: var(--bg2); position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 120%, rgba(200,255,0,.07), transparent);
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 { font-size: var(--h2); margin-bottom: 16px; }
.cta-box p  { font-size: var(--body); color: var(--text2); max-width: 48ch; margin: 0 auto 36px; line-height: 1.7; }
.cta-btns   { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Page header (about / team) ── */
.page-header {
  min-height: 58vh; display: flex; align-items: flex-end;
  padding: 72px var(--pad) 80px;
  position: relative; overflow: hidden;
}
.ph-inner { position: relative; z-index: 1; max-width: 820px; }
.ph-title { font-size: var(--h1); }
.ph-title em { font-style: normal; color: var(--accent); }
.ph-sub { font-size: 17px; color: var(--text2); margin-top: 20px; line-height: 1.7; max-width: 52ch; }

/* ── About ── */
.about-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.about-lead { font-family: var(--ffd); font-weight: 700; font-size: clamp(20px,2.4vw,28px); line-height: 1.38; }
.about-body p { font-size: var(--body); color: var(--text2); line-height: 1.75; margin-bottom: 20px; }
.about-body p:last-child { margin-bottom: 0; }

/* ── Values ── */
.vals-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 36px; }
.val { background: var(--card); padding: 40px 28px; display: flex; flex-direction: column; gap: 14px; transition: background .28s; }
.val:hover { background: var(--bg3); }
.val-icon { font-size: 26px; color: var(--accent); }
.val h3 { font-family: var(--ffd); font-weight: 700; font-size: 19px; }
.val p  { font-size: var(--body); color: var(--text2); line-height: 1.68; max-width: 34ch; }

/* ── Numbers ── */
.nums-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 36px; }
.num-cell { background: var(--card); padding: 32px 20px; display: flex; flex-direction: column; gap: 8px; }
.num-v { font-family: var(--ffd); font-weight: 800; font-size: clamp(28px,3.2vw,42px); color: var(--accent); line-height: 1; }
.num-l { font-family: var(--ffm); font-size: var(--xs); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; line-height: 1.4; }

/* ── Steps ── */
.steps { border: 1px solid var(--line); }
.step  { display: grid; grid-template-columns: 64px 1px 1fr; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step-n   { font-family: var(--ffm); font-size: var(--xs); color: var(--muted); padding: 36px 16px; letter-spacing: .1em; }
.step-sep { background: var(--line); }
.step-body { padding: 36px 44px; transition: background .25s; }
.step:hover .step-body { background: var(--bg2); }
.step-body h4 { font-family: var(--ffd); font-weight: 700; font-size: var(--h3); margin-bottom: 10px; }
.step-body p  { font-size: var(--body); color: var(--text2); line-height: 1.7; max-width: 60ch; }

/* ── Banner CTA ── */
.banner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; border: 1px solid var(--line); padding: 44px 56px;
  background: var(--bg2); flex-wrap: wrap;
}
.banner h2 { font-size: var(--h2); margin-top: 8px; }

/* ── Team ── */
.team-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.member {
  background: var(--card); padding: 40px 32px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; transition: background .28s;
}
.member:hover { background: var(--bg3); }
.member-av { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.av-ring {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,255,0,.08); box-shadow: 0 0 18px rgba(200,255,0,.12);
}
.av-plain {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2);
}
.av-init     { font-family: var(--ffd); font-weight: 800; font-size: 14px; color: var(--accent); }
.av-init.dim { color: var(--muted); }
.member h3        { font-family: var(--ffd); font-weight: 700; font-size: 19px; }
.member-role      { font-family: var(--ffm); font-size: var(--xs); color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }
.member-bio       { font-size: var(--body); color: var(--text2); line-height: 1.66; max-width: 40ch; }
.member-tags      { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mtag             { font-family: var(--ffm); font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; text-transform: uppercase; letter-spacing: .07em; }
.m-idx            { font-family: var(--ffm); position: absolute; bottom: 20px; right: 24px; font-size: 11px; color: var(--line); letter-spacing: .14em; transition: color .25s; }
.member:hover .m-idx { color: var(--muted); }

/* ── Vacancies ── */
.join-grid { display: grid; grid-template-columns: 360px 1fr; gap: 80px; align-items: start; }
.join-l h2 { font-size: var(--h2); margin: 8px 0 16px; }
.join-l p  { font-size: var(--body); color: var(--text2); margin-bottom: 28px; line-height: 1.7; max-width: 36ch; }
.jobs-list { border: 1px solid var(--line); }
.job-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 28px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .22s; gap: 16px; min-height: 72px;
}
.job-row:last-child { border-bottom: none; }
.job-row:hover, .job-row:focus { background: var(--bg3); outline: none; }
.job-info  { flex: 1; min-width: 0; }
.job-title { font-family: var(--ffd); font-weight: 600; font-size: 17px; display: block; margin-bottom: 4px; }
.job-meta  { font-family: var(--ffm); font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.job-arr   { font-size: 18px; color: var(--muted); transition: color .2s, transform .2s; flex-shrink: 0; }
.job-row:hover .job-arr, .job-row:focus .job-arr { color: var(--accent); transform: translateX(5px); }

/* ── Modal ── */
.modal-back {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4,6,10,.84);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.modal-back.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--line);
  max-width: 660px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(.98); transition: transform .24s;
}
.modal-back.open .modal { transform: translateY(0) scale(1); }

/* Close button — always dark bg + white × = always readable */
.modal-x {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px; font-family: var(--ffm);
  cursor: pointer; z-index: 2;
  transition: background .18s, border-color .18s, color .18s;
}
.modal-x:hover { background: #1e2535; border-color: var(--accent); color: var(--accent); }

.modal-head { padding: 40px 44px 24px; border-bottom: 1px solid var(--line); }
.modal-tag  { font-family: var(--ffm); font-size: var(--xs); color: var(--accent); letter-spacing: .16em; text-transform: uppercase; display: block; margin-bottom: 12px; }
.modal-head h2 { font-family: var(--ffd); font-weight: 800; font-size: clamp(22px,3vw,30px); margin-bottom: 8px; padding-right: 52px; }
.modal-meta { font-family: var(--ffm); font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

.modal-body { padding: 32px 44px; }
.modal-body h4 { font-family: var(--ffd); font-weight: 700; font-size: 16px; margin: 28px 0 10px; color: var(--text); }
.modal-body h4:first-child { margin-top: 0; }
.modal-body p  { font-size: var(--body); color: var(--text2); line-height: 1.72; }
.modal-body ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.modal-body ul li { font-size: var(--body); color: var(--text2); padding-left: 22px; position: relative; line-height: 1.62; }
.modal-body ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); font-family: var(--ffm); }

.modal-foot {
  padding: 24px 44px 40px;
  display: flex; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  background: var(--bg3);
}

/* ── Footer ── */
.footer { border-top: 1px solid var(--line); padding: 56px var(--pad); margin-top: 96px; }
.footer-inner {
  max-width: calc(var(--max-w) + var(--pad)*2); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: start;
}
.footer-brand .nav-logo { display: flex; margin-bottom: 12px; }
.footer-brand p { font-size: var(--sm); color: var(--muted); line-height: 1.7; }
.footer-nav { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.footer-nav a { font-size: var(--sm); color: var(--muted); text-decoration: none; min-height: 44px; display: flex; align-items: center; padding: 0 8px; transition: color .2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.footer-copy span { font-family: var(--ffm); font-size: 11px; color: var(--muted); letter-spacing: .1em; }

/* ── Animations ── */
.anim-up { animation: fadeUp .65s ease both; }
.d1 { animation-delay: .1s; }
.d2 { animation-delay: .25s; }
@keyframes fadeUp { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .nums-grid { grid-template-columns: repeat(3,1fr); }
  .why-grid  { grid-template-columns: 1fr; gap: 48px; }
  .why-lead  { max-width: 540px; }
}
@media (max-width: 900px) {
  .nav-list {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    background: var(--bg2); border-bottom: 1px solid var(--line);
    padding: 16px var(--pad) 24px; gap: 0;
  }
  .nav-list.open  { display: flex; }
  .nav-burger     { display: flex; }
  .services-grid  { grid-template-columns: 1fr; }
  .tech-grid      { grid-template-columns: 1fr; }
  .hero-stats     { flex-direction: column; width: 100%; max-width: 320px; }
  .stat-sep       { width: 100%; height: 1px; }
  .about-2col     { grid-template-columns: 1fr; gap: 36px; }
  .vals-grid      { grid-template-columns: 1fr 1fr; }
  .team-grid      { grid-template-columns: 1fr 1fr; }
  .join-grid      { grid-template-columns: 1fr; gap: 40px; }
  .banner         { flex-direction: column; align-items: flex-start; padding: 36px; }
  .footer-inner   { grid-template-columns: 1fr; }
  .footer-nav     { align-items: flex-start; }
  .footer-copy    { align-items: flex-start; }
  .modal-head, .modal-body, .modal-foot { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 600px) {
  .vals-grid  { grid-template-columns: 1fr; }
  .nums-grid  { grid-template-columns: repeat(2,1fr); }
  .team-grid  { grid-template-columns: 1fr; }
  .step       { grid-template-columns: 48px 1px 1fr; }
  .stat       { padding: 20px 28px; }
  .hero-btns  { flex-direction: column; align-items: flex-start; }
}
