/* ============================================================
   Traffic Knights — redesigned static site
   Clean, modern, dark "knight" aesthetic. Mobile-first.
   ============================================================ */

:root {
  --bg:        #0b0c10;
  --bg-soft:   #121420;
  --panel:     #161927;
  --panel-2:   #1d2133;
  --accent:    #5b7fd4;   /* knight blue */
  --accent-2:  #7b9be6;
  --accent-soft:#2b3858;
  --text:      #eef1f7;
  --muted:     #a6adbf;
  --line:      rgba(255,255,255,0.08);
  --radius:    14px;
  --maxw:      1180px;
  --shadow:    0 18px 50px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-2); text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: "Roboto Slab", Georgia, serif; font-weight: 600; line-height: 1.12; }

.eyebrow {
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0 0 18px;
}

.section { padding: 110px 0; position: relative; }
.section--tight { padding: 80px 0; }
.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0; }
.section-head p { color: var(--muted); margin: 18px 0 0; }

.divider {
  width: 64px; height: 3px; border: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  margin: 22px auto 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border: 0;
  box-shadow: 0 12px 30px rgba(91,127,212,0.35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(91,127,212,0.5); }
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn--ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11,12,16,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; }
.brand span {
  font-family: "Roboto Slab", serif; font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.nav-links { display: flex; gap: 38px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.8rem; font-weight: 600; opacity: .85; transition: opacity .2s, color .2s;
}
.nav-links a:hover { opacity: 1; color: var(--accent-2); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(91,127,212,0.22), transparent 60%),
    linear-gradient(180deg, #0b0c10 0%, #0e1018 55%, #0b0c10 100%);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2.8rem, 9vw, 6.4rem);
  letter-spacing: 0.02em;
  margin: 14px 0 0;
  text-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--accent-2); }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin: 30px auto 36px; max-width: 520px; }

/* ---------- Intro statements ---------- */
.statements { background: var(--bg-soft); }
.statements .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.statement p { font-family: "Roboto Slab", serif; font-size: 1.5rem; line-height: 1.4; margin: 0; color: var(--text); }
.statement p::first-letter { color: var(--accent-2); }

/* ---------- About lead ---------- */
.lead { max-width: 780px; margin: 0 auto; text-align: center; }
.lead h2 { font-size: clamp(1.8rem,3.5vw,2.6rem); margin: 0 0 22px; }
.lead p { color: var(--muted); font-size: 1.12rem; }

/* ---------- Feature row ---------- */
.features { background: var(--bg-soft); }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 26px; }
.feature {
  text-align: center; padding: 38px 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease;
}
.feature:hover { transform: translateY(-6px); border-color: var(--accent-soft); }
.feature .icon { color: var(--accent-2); margin-bottom: 18px; display: flex; justify-content: center; }
.feature h3 { font-size: 1.02rem; margin: 0; letter-spacing: .02em; }

/* ---------- Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 30px; }
.service {
  display: flex; gap: 22px; padding: 34px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.service:hover { transform: translateY(-5px); border-color: var(--accent-soft); background: var(--panel-2); }
.service .icon {
  flex: 0 0 54px; width: 54px; height: 54px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(91,127,212,0.15));
  display: flex; align-items: center; justify-content: center; color: var(--accent-2);
}
.service h3 { font-size: 1.18rem; margin: 0 0 10px; }
.service p { color: var(--muted); margin: 0; font-size: 0.98rem; line-height: 1.65; }

/* ---------- Work ---------- */
.work { background: var(--bg-soft); }
.work-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
.work-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  box-shadow: var(--shadow);
}
.work-card img { width: 100%; height: 280px; object-fit: cover; object-position: top; transition: transform .5s ease; }
.work-card:hover img { transform: scale(1.05); }
.work-card .label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px 24px;
  background: linear-gradient(0deg, rgba(8,9,13,0.92), transparent);
  font-family: "Roboto Slab", serif; font-weight: 600; letter-spacing: .04em;
}

/* ---------- Methods ---------- */
.method-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 30px; }
.method {
  padding: 34px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.method .num {
  font-family: "Roboto Slab", serif; font-size: 3rem; font-weight: 700;
  color: var(--accent-soft); line-height: 1; margin-bottom: 10px;
}
.method h3 { font-size: 1.15rem; margin: 0 0 12px; }
.method p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- Capability tags ---------- */
.caps { background: var(--bg-soft); }
.cap-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.cap {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 84px; padding: 22px 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 0.92rem; letter-spacing: .04em;
  transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.cap:hover { color: var(--accent-2); border-color: var(--accent-soft); background: var(--panel-2); transform: translateY(-4px); }

/* ---------- Why us ---------- */
.why { text-align: center; }
.why .lead p { font-size: 1.14rem; }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.contact-wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: start; }
form { display: grid; gap: 16px; }
.field input, .field textarea {
  width: 100%; padding: 16px 18px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font-family: inherit; font-size: 1rem; transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--panel-2); }
.field textarea { min-height: 130px; resize: vertical; }
.contact-info { display: grid; gap: 34px; }
.info-block .icon { color: var(--accent-2); margin-bottom: 12px; }
.info-block h4 { margin: 0 0 6px; font-family: "Montserrat",sans-serif; text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; color: var(--muted); }
.info-block p { margin: 0; font-size: 1.05rem; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .88rem; }
.site-footer .brand { justify-content: center; margin-bottom: 14px; }

/* ---------- Reveal animation (progressive enhancement) ----------
   Content is fully visible by default. Only when JS is active (html.js)
   do we hide-then-reveal on scroll, so the site never depends on JS. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .cap-grid { grid-template-columns: repeat(2,1fr); }
  .service-grid, .work-grid, .method-grid, .statements .grid, .contact-wrap { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .nav-links {
    position: fixed; inset: 78px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(11,12,16,0.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav-links.open { max-height: 360px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 18px; border-top: 1px solid var(--line); }
  .nav-toggle { display: block; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .feature-grid, .cap-grid { grid-template-columns: 1fr; }
  .statement p { font-size: 1.3rem; }
  .service { padding: 26px; }
}
