/* ============================================================
   Forthrun — shared design tokens & styles (all five pages)
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #101418;
  --muted: #566070;
  --accent: #3b82f6;
  --accent-dark: #2f6fe0;
  --line: #e6e9ee;
  --dark: #0b0f17;
  --font-display: "Sora", "Arial", sans-serif;
  --font-body: "Inter", "Helvetica", sans-serif;
  --nav-h: 76px;
  --max-w: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- shared bits ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover { background: var(--ink); color: #fff; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.text-link {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

.text-link:hover { border-bottom-color: var(--accent); }

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid rgba(16, 20, 24, 0.08);
  box-shadow: 0 1px 2px rgba(16, 20, 24, 0.04);
  transition: background 0.2s ease;
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 32px;
}

.nav-logo { flex-shrink: 0; }

.nav-logo img {
  height: 35px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.nav-cta.active {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.nav-cta { padding: 11px 22px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero (home) ---------- */

.hero { padding: calc(var(--nav-h) + 88px) 0 96px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-mark { display: flex; justify-content: flex-end; }

.hero-mark svg {
  width: 100%;
  max-width: 380px;
  height: auto;
}

/* ---------- three-up strip (home) ---------- */

.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.strip-item {
  padding: 56px 40px;
  border-left: 1px solid var(--line);
}

.strip-item:first-child { border-left: none; padding-left: 0; }
.strip-item:last-child { padding-right: 0; }

.strip-item h3 {
  font-size: 20px;
  margin: 14px 0 12px;
}

.strip-item p { color: var(--muted); font-size: 16px; }

/* ---------- inner page header ---------- */

.page-head {
  padding: calc(var(--nav-h) + 48px) 0 48px;
  text-align: center;
  background-color: #f7f9fc;
  position: relative;
  overflow: hidden;
}

/* text content renders above the lattice motif */
.page-head .wrap {
  position: relative;
  z-index: 1;
}

/* network-lattice triangle motif in the page-header band */
.ph-lattice {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 230px;
  z-index: 0;
  pointer-events: none;
}

.ph-lattice--left { left: max(4%, 24px); }
.ph-lattice--right { right: max(4%, 24px); }

@media (max-width: 768px) {
  .ph-lattice { display: none; }
}

.page-head h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  margin: 0 auto 22px;
  max-width: 720px;
}

.page-head .lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- generic section ---------- */

.section { padding: 24px 0 96px; }

.section h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

.section-note {
  color: var(--muted);
  max-width: 700px;
}

/* ---------- services ---------- */

.svc-group { margin-bottom: 72px; }
.svc-group:last-child { margin-bottom: 0; }

.svc-group > h2 { margin-bottom: 28px; }

.svc-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.svc-group .svc-row:last-child { border-bottom: 1px solid var(--line); }

.svc-row h3 { font-size: 19px; }
.svc-row p { color: var(--muted); font-size: 16px; }

.closing-line {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  max-width: 720px;
}

/* ---------- how we work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 28px;
}

.work-item {
  padding: 44px 40px 48px;
  border-left: 1px solid var(--line);
}

.work-item:first-child { border-left: none; padding-left: 0; }
.work-item:last-child { padding-right: 0; }

.work-item h3 { font-size: 21px; margin-bottom: 14px; }
.work-item p { color: var(--muted); font-size: 16px; }

.practice { margin-top: 72px; }
.practice h2 { margin-bottom: 18px; }
.practice p { max-width: 720px; color: var(--muted); }

/* ---------- about ---------- */

.team { margin-top: 0; }
.team > h2 { margin-bottom: 28px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.team-card {
  padding: 44px 40px 48px;
  border-left: 1px solid var(--line);
}

.team-card:first-child { border-left: none; padding-left: 0; }
.team-card:last-child { padding-right: 0; }

.team-avatar {
  width: 120px; height: 120px; border-radius: 50%;
  background: #e6f1fb; border: 1px solid #d6e4f5;
  display: flex; align-items: center; justify-content: center;
  color: #185fa5; font-weight: 500; font-size: 34px; letter-spacing: .02em;
  font-family: inherit; overflow: hidden; flex-shrink: 0;
}

.team-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.team-card .team-avatar { margin-bottom: 18px; }

.team-card h3 { font-size: 20px; margin-bottom: 4px; }
.team-card .role { font-size: 15px; margin-bottom: 14px; display: block; }
.team-card p { color: var(--muted); font-size: 16px; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 72px;
  align-items: start;
}

.form-error {
  font-size: 15px;
  line-height: 1.5;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  margin-bottom: 24px;
}

.form-success h2 { font-size: 26px; margin-bottom: 10px; }
.form-success p { color: var(--muted); }

.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 22px 0 8px;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.contact-form .form-row label { margin-top: 0; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.15s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.contact-form textarea { resize: vertical; min-height: 110px; }

.contact-form .btn { margin-top: 30px; }

.contact-direct {
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.contact-direct h2 { font-size: 20px; margin-bottom: 18px; }

.contact-direct dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 22px;
}

.contact-direct dt:first-of-type { margin-top: 0; }

.contact-direct dd { margin-top: 6px; color: var(--muted); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--dark);
  color: #c3c9d3;
  margin-top: 120px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 32px;
  padding-bottom: 24px;
}

.footer-brand img { height: 36px; width: auto; }

.footer-brand p {
  margin-top: 10px;
  font-size: 14px;
  color: #8b93a1;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-size: 15px;
  color: #c3c9d3;
  transition: color 0.15s ease;
}

.footer-links a:hover { color: #ffffff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  padding-bottom: 16px;
}

.footer-bottom p { font-size: 13px; color: #8b93a1; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 940px) {

  /* nav collapses to hamburger; menu becomes a panel under the bar */
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    padding: 8px 32px 24px;
  }

  .nav-menu.open { display: flex; }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta { margin-top: 20px; }

  .hero { padding: calc(var(--nav-h) + 56px) 0 72px; }

  .hero-grid { grid-template-columns: 1fr; gap: 48px; }

  .hero-mark { justify-content: flex-start; }
  .hero-mark svg { max-width: 200px; }

  .strip-grid { grid-template-columns: 1fr; }

  .strip-item {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 36px 0;
  }

  .strip-item:first-child { border-top: none; }

  .svc-row { grid-template-columns: 1fr; gap: 8px; }

  .work-grid { grid-template-columns: 1fr; }

  .work-item {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 36px 0;
  }

  .work-item:first-child { border-top: none; }

  .team-grid { grid-template-columns: 1fr; }

  .team-card {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 36px 0;
  }

  .team-card:first-child { border-top: none; }

  .contact-grid { grid-template-columns: 1fr; gap: 56px; }

  .contact-form .form-row { grid-template-columns: 1fr; }

  .contact-form .form-row div + div label { margin-top: 22px; }

  .footer-inner { flex-direction: column; gap: 24px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 22px; }

  .nav-menu { padding: 8px 22px 24px; }

  body { font-size: 16px; }

  .hero-ctas .btn { width: 100%; text-align: center; }
}
