/* ============================================================
   WARWICK TUNNELLING — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=Inter+Tight:wght@400;500;600;700&display=swap');

:root {
  /* Palette */
  --bg: #f4f2ed;          /* warm off-white, not bright white */
  --bg-alt: #ebe8e1;      /* slightly darker section bg */
  --ink: #0a0a0a;         /* near-black */
  --ink-soft: #2a2a2a;
  --muted: #6b6b66;
  --rule: #c9c5bb;        /* hairline rule color */
  --green: #1f5f3f;       /* deep tunnelling green, matches logo */
  --green-bright: #2d8a5a;
  --paper: #ffffff;

  /* Type scale */
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter Tight', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1400px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.display {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.92;
  text-transform: uppercase;
}

.mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .num {
  color: var(--green);
  margin-right: 0.6rem;
}

h1.display { font-size: clamp(3.5rem, 9vw, 9rem); }
h2.display { font-size: clamp(2.5rem, 6vw, 5.5rem); }
h3.display { font-size: clamp(1.75rem, 3vw, 2.75rem); }

p.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  font-weight: 400;
  max-width: 60ch;
  color: var(--ink-soft);
}

/* ============================================================
   LAYOUT
   ============================================================ */

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

section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
  border-top: 1px solid var(--rule);
}

section:first-of-type { border-top: 0; }

.section-header {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

@media (max-width: 720px) {
  .section-header { grid-template-columns: 1fr; gap: 1rem; }
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-brand .brand-text span:last-child {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--green); }

.nav-links a.active {
  color: var(--ink);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--green);
}

.nav-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 0.65rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--green); }

/* When the CTA is the active page, give it the green treatment so it stays readable */
.nav-cta.active { background: var(--green); color: white; }
.nav-cta.active::after { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.1em;
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.5rem var(--gutter);
    border-bottom: 1px solid var(--rule);
    align-items: flex-start;
    gap: 1.25rem;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn .arrow {
  transition: transform 0.2s;
}

.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: var(--ink);
  color: var(--bg);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #2a2a2a;
}

@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .display {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: #999;
  font-size: 0.95rem;
  max-width: 30ch;
  margin-top: 1rem;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-col a {
  color: #ccc;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--green-bright); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #777;
}

@media (max-width: 540px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ============================================================
   UTILITY: spec strip (mono numbered facts)
   ============================================================ */

.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.spec-strip > div {
  padding: 1.5rem var(--gutter);
  border-right: 1px solid var(--rule);
}

.spec-strip > div:last-child { border-right: 0; }

.spec-strip .label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.spec-strip .value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

@media (max-width: 720px) {
  .spec-strip { grid-template-columns: repeat(2, 1fr); }
  .spec-strip > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .spec-strip > div:nth-child(odd) { border-right: 1px solid var(--rule); }
  .spec-strip > div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rise {
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.rise-1 { animation-delay: 0.1s; }
.rise-2 { animation-delay: 0.25s; }
.rise-3 { animation-delay: 0.4s; }
.rise-4 { animation-delay: 0.55s; }
.rise-5 { animation-delay: 0.7s; }

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-slow {
  animation: spin-slow 60s linear infinite;
}
