/* ============= TOKENS ============= */
:root{
  --bg: #0B0D10;
  --bg-2: #111418;
  --bg-3: #171B20;
  --ink: #F4F2EE;
  --ink-2: #C9CBCE;
  --ink-3: #8A8E94;
  --rule: #26292E;
  --rule-2: #343841;
  --accent: #3A6CB8;        /* AREW blue, tuned */
  --accent-2: #2A4D85;
  --danger: #C2443A;
}

/* ============= BASE ============= */
*{ box-sizing:border-box; min-width:0; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto; } }
html,body{ margin:0; padding:0; background:var(--bg); color:var(--ink); overflow-x:clip; max-width:100%; }
img{ max-width:100%; height:auto; display:block; }
body{
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4{ font-family:'Inter Tight', sans-serif; font-weight:600; letter-spacing:-0.02em; margin:0; }
.mono{ font-family:'JetBrains Mono', monospace; font-size: 12px; letter-spacing:0.04em; text-transform:uppercase; color:var(--ink-3); }
a{ color:inherit; text-decoration:none; }

.wrap{ max-width: 1320px; margin:0 auto; padding: 0 40px; }
@media (max-width: 900px){ .wrap{ padding: 0 24px; } }
.rule{ height:1px; background:var(--rule); border:0; }

/* ============= MOBILE MENU ============= */
.menu-btn{ display:none; width:44px; height:44px; align-items:center; justify-content:center; border:1px solid var(--rule-2); background:transparent; cursor:pointer; }
.menu-btn span{ display:block; width:18px; height:1px; background:var(--ink); position:relative; }
.menu-btn span::before, .menu-btn span::after{ content:''; position:absolute; left:0; width:18px; height:1px; background:var(--ink); transition:transform .2s; }
.menu-btn span::before{ top:-6px; }
.menu-btn span::after{ top:6px; }
.mobile-menu{ display:none; position:fixed; inset:76px 0 0 0; background:var(--bg); z-index:49; padding:40px 24px; flex-direction:column; gap:8px; border-top:1px solid var(--rule); }
.mobile-menu a{ font-family:'Inter Tight'; font-size:28px; padding:14px 0; border-bottom:1px solid var(--rule); color:var(--ink); }
.mobile-menu .mob-foot{ margin-top:auto; padding-top:24px; font-family:'JetBrains Mono', monospace; font-size:12px; color:var(--ink-3); }
body.menu-open{ overflow:hidden; }
body.menu-open .mobile-menu{ display:flex; }

/* ============= NAV ============= */
.nav{
  position: sticky; top:0; z-index:50;
  background: rgba(11,13,16,0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner{
  display:grid; grid-template-columns: 1fr auto 1fr; align-items:center;
  height: 76px;
}
.logo{ display:flex; align-items:center; gap:14px; }
.logo img{ height: 28px; width:auto; filter: brightness(0) invert(1); }
.logo .sep{ width:1px; height:22px; background:var(--rule-2); }
.logo .tag{ font-family:'JetBrains Mono', monospace; font-size:11px; letter-spacing:0.08em; color:var(--ink-3); text-transform:uppercase; }
.navlinks{ display:flex; gap:36px; }
.navlinks a{ font-size:14px; color:var(--ink-2); transition: color .15s; }
.navlinks a:hover{ color:var(--ink); }
.nav-cta{ justify-self:end; display:flex; align-items:center; gap:20px; }
.phone{ font-family:'JetBrains Mono', monospace; font-size:13px; color:var(--ink-2); }

/* ============= BUTTONS ============= */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding: 12px 20px;
  border: 1px solid var(--rule-2);
  background: transparent; color:var(--ink);
  font-family:'Inter', sans-serif; font-size:14px; font-weight:500;
  cursor:pointer; transition: all .18s ease;
  letter-spacing: 0.005em;
}
.btn:hover{ border-color: var(--ink); }
.btn.primary{
  background: var(--accent);
  border-color: var(--accent);
  color:#fff;
}
.btn.primary:hover{ background:#4a7fd0; border-color:#4a7fd0; }
.btn .arrow{ width:14px; height:1px; background:currentColor; position:relative; }
.btn .arrow::after{
  content:''; position:absolute; right:0; top:-3px;
  width:7px; height:7px; border-top:1px solid currentColor; border-right:1px solid currentColor; transform:rotate(45deg);
}

/* ============= FOOTER ============= */
footer{ background: var(--bg); padding: 72px 0 36px; }
.foot-grid{ display:grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap:60px; padding-bottom: 56px; border-bottom: 1px solid var(--rule); }
.foot-brand img{ height: 28px; filter: brightness(0) invert(1); margin-bottom: 20px; }
.foot-brand p{ font-size:13px; color:var(--ink-3); line-height:1.6; max-width: 340px; }
.foot-col h5{ font-family:'JetBrains Mono', monospace; font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:var(--ink-3); margin-bottom:18px; font-weight:500; }
.foot-col a{ display:block; font-size:14px; color:var(--ink-2); padding: 6px 0; }
.foot-col a:hover{ color:var(--ink); }
.foot-bottom{ display:flex; justify-content:space-between; align-items:center; padding-top:28px; font-size:12px; color:var(--ink-3); font-family:'JetBrains Mono', monospace; letter-spacing:0.04em; }
.foot-bottom .links{ display:flex; gap:24px; }

/* ============= RESPONSIVE (shared chrome) ============= */
@media (max-width: 1180px){
  .navlinks{ display:none; }
  .logo .sep, .logo .tag{ display:none; }
  .nav-cta .phone{ display:none; }
  .nav-inner{ grid-template-columns: auto 1fr auto; }
}
@media (max-width: 980px){
  .menu-btn{ display:inline-flex; }
  .nav-cta .btn.primary{ display:none; }
  .foot-grid{ grid-template-columns: 1fr 1fr; gap:40px; }
}
@media (max-width: 680px){
  .foot-grid{ grid-template-columns: 1fr; gap:32px; padding-bottom:40px; }
  .foot-bottom{ flex-direction:column; gap:16px; align-items:flex-start; }
}

/* ============= LEGAL / TEXT PAGES ============= */
.legal-page{
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 40px 96px;
}
.legal-page h1{
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}
.legal-page h2{
  font-size: 20px;
  line-height: 1.3;
  margin: 40px 0 12px;
}
.legal-page p{
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.legal-page ul{
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 16px;
  padding-left: 22px;
}
.legal-page li{ margin-bottom: 6px; }
.legal-page a{ color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-page a:hover{ color: var(--ink); }
.legal-page hr{
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 48px 0;
}
.legal-page .placeholder{
  display: inline-block;
  padding: 1px 6px;
  border: 1px dashed var(--rule-2);
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.legal-page .meta{
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 680px){
  .legal-page{ padding: 56px 24px 72px; }
}

/* ============= 404 / ERROR PAGE ============= */
.error-page{
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.error-page::before{
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 50% 40%, rgba(58,108,184,0.10), transparent 65%);
  z-index: 0;
}
.error-inner{
  position: relative; z-index: 1;
  text-align: center;
  max-width: 640px;
}
.error-code{
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(96px, 16vw, 200px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--rule-2);
  margin-bottom: 24px;
  user-select: none;
}
.error-page h1{
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.error-page h1 .accent{ color: var(--accent); }
.error-page p.lead{
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0 auto 32px;
  max-width: 480px;
}
.error-path{
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  margin-bottom: 36px;
  max-width: 100%;
  word-break: break-all;
}
.error-path .label{ color: var(--ink-3); margin-right: 8px; }
.error-path .value{ color: var(--ink-2); }
.error-ctas{
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 680px){
  .error-page{ padding: 56px 24px; min-height: calc(100vh - 76px - 200px); }
  .error-ctas .btn{ width: 100%; justify-content: center; }
}

/* ============= COOKIE BANNER ============= */
.cookie-banner{
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 100;
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 16px 32px rgba(0,0,0,0.5);
}
.cookie-banner[hidden]{ display: none; }
.cookie-banner .cookie-text{
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  flex: 1 1 280px;
}
.cookie-banner .cookie-text a{
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner .cookie-dismiss{
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.cookie-banner .cookie-dismiss:hover{ background: #4a7fd0; border-color: #4a7fd0; }
@media (max-width: 560px){
  .cookie-banner{ inset: auto 12px 12px 12px; padding: 12px 14px; }
  .cookie-banner .cookie-dismiss{ width: 100%; }
}
