/* Grinnell Tech Solutions
   Colours are taken from the logo: red, slate blue, black. */

:root {
  --red: #e61e25;
  --red-dark: #c4151c;
  --slate: #7586a2;
  --slate-light: #aab6c9;
  --ink: #0e1014;
  --ink-2: #171a20;
  --ink-3: #242831;
  --text: #1d2026;
  --muted: #5b6270;
  --line: #e2e5ea;
  --tint: #f4f5f7;
  --white: #fff;
  --radius: 14px;
  --header-h: 72px;
  --font-head: "Archivo", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--slate); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px;
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 17px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--tint); }

.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(14,16,20,.06); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 46px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 19px; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.brand-tag { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { font-weight: 500; font-size: 15px; text-decoration: none; color: var(--text); padding: 8px 0; }
.site-nav a:not(.btn):hover { color: var(--red); }
.site-nav .nav-phone { font-family: var(--font-head); font-weight: 700; white-space: nowrap; }

.nav-toggle {
  display: none; width: 46px; height: 46px; padding: 0; flex: none;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.bars, .bars::before, .bars::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.bars { position: relative; margin: 0 auto; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.nav-open .bars { background: transparent; }
.nav-open .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(117,134,162,.28), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(230,30,37,.16), transparent 60%),
    var(--ink);
  color: #fff;
  padding: 72px 0 0;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.2vw, 62px); font-weight: 800; }
.hero .accent { color: var(--red); }
.hero .eyebrow { color: var(--slate-light); }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: #c9cfd9; margin-top: 22px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 70%;
  border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,.45);
}
.hero-badge {
  position: absolute; left: -24px; bottom: 28px; max-width: 240px;
  background: #fff; color: var(--ink); padding: 14px 18px; border-radius: 12px;
  border-left: 5px solid var(--red); box-shadow: 0 14px 30px rgba(0,0,0,.3);
}
.hero-badge strong { display: block; font-family: var(--font-head); font-size: 17px; }
.hero-badge span { font-size: 14px; color: var(--muted); line-height: 1.4; display: block; margin-top: 2px; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 64px; border-top: 1px solid rgba(255,255,255,.14);
}
.facts li { padding: 26px 20px 30px 0; }
.facts li + li { padding-left: 24px; border-left: 1px solid rgba(255,255,255,.14); }
.facts strong { display: block; font-family: var(--font-head); font-size: 20px; }
.facts span { font-size: 14.5px; color: var(--slate-light); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--ink); color: #fff; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2, .about-copy h2, .contact-copy h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; }
.section-head p:not(.eyebrow) { margin-top: 16px; color: var(--muted); font-size: 18px; }
.section-dark .section-head p:not(.eyebrow), .section-dark .contact-copy > p:not(.eyebrow) { color: #c9cfd9; }
.section-dark .eyebrow { color: var(--slate-light); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(14,16,20,.1); }
.card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 20px; font-weight: 700; padding-top: 12px; border-top: 3px solid var(--red); display: inline-block; align-self: flex-start; }
.card ul { margin-top: 14px; }
.card li { position: relative; padding: 5px 0 5px 18px; font-size: 15.5px; color: var(--muted); line-height: 1.45; }
.card li::before { content: ""; position: absolute; left: 0; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--slate); }

.card-cta { background: var(--ink); border-color: var(--ink); color: #fff; justify-content: center; }
.card-cta h3 { border-top-color: var(--red); }
.card-cta p { margin-top: 14px; color: #c9cfd9; font-size: 15.5px; flex: 1; }
.card-cta .btn { margin-top: 22px; align-self: flex-start; }

/* ---------- Three-up blocks ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trio-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px 32px; }
.trio-item .num { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--red); letter-spacing: .08em; }
.trio-item h3 { font-size: 22px; font-weight: 700; margin: 10px 0 10px; }
.trio-item p { color: var(--muted); font-size: 16px; }
.trio-plain .trio-item { background: var(--tint); border-color: transparent; }
.trio-plain .trio-item h3 { margin-top: 0; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { position: relative; padding-top: 4px; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 19px;
  margin-bottom: 18px; position: relative; z-index: 1;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 28px; left: 56px; right: -20px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--slate-light) 0 6px, transparent 6px 12px);
}
.steps h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 16px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 44px 18px 16px; font-size: 15px; font-weight: 500;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
}

/* ---------- Coverage route ---------- */
.route {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 0 0 44px; padding: 34px 28px 30px; text-align: center;
  background: var(--ink); color: #fff; border-radius: var(--radius);
}
.route::before {
  content: ""; position: absolute; top: 44px; left: calc(16.66% + 10px); right: calc(16.66% + 10px); height: 3px;
  background: linear-gradient(90deg, var(--slate), var(--red), var(--slate));
}
.route-stop { position: relative; display: flex; flex-direction: column; align-items: center; }
.route-stop .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 4px solid var(--slate); margin-bottom: 14px; }
.route-home .dot { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 6px rgba(230,30,37,.25); }
.route-stop strong { font-family: var(--font-head); font-size: 21px; }
.route-stop span:not(.dot) { font-size: 14px; color: var(--slate-light); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 30% 50%; border-radius: 20px; box-shadow: 0 20px 44px rgba(14,16,20,.16); }
.about-caption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.about-copy > p:not(.eyebrow) { margin-top: 18px; color: var(--muted); }
.checks { margin-top: 26px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l3 3 6-6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-copy > p:not(.eyebrow) { margin-top: 16px; }
.contact-list { margin-top: 34px; border-top: 1px solid rgba(255,255,255,.14); }
.contact-list li { display: flex; gap: 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.contact-list .label { flex: none; width: 84px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-light); }
.contact-list a, .contact-list li > span:last-child { font-family: var(--font-head); font-weight: 700; font-size: 19px; text-decoration: none; overflow-wrap: anywhere; min-width: 0; }
.contact-list a:hover { color: var(--red); }

.quote-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: #fff; color: var(--text); padding: 32px; border-radius: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  padding: 12px 14px; background: #fff; border: 1.5px solid #cfd4dc; border-radius: 10px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgba(117,134,162,.3); }
.form-foot { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 14px 18px; }
.form-note { font-size: 14px; color: var(--muted); flex: 1; min-width: 200px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: 10px; font-weight: 600; font-size: 15.5px; }
.form-status.is-ok { background: #e8f5ec; color: #17613a; border: 1px solid #b7dcc4; }
.form-status.is-error { background: #fdecec; color: #a3151b; border: 1px solid #f3bcbe; }
.quote-form button[disabled] { opacity: .7; cursor: progress; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-2); color: #c9cfd9; padding: 48px 0 28px; border-top: 1px solid var(--ink-3); }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 40px; align-items: start; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 54px; flex: none; background: #fff; border-radius: 50%; padding: 6px; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-head); font-size: 18px; }
.footer-brand span { font-size: 14.5px; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.footer-nav a, .footer-contact a { text-decoration: none; font-size: 15px; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact a:first-child { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: #fff; }
.footer-legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ink-3); font-size: 13.5px; color: #8a92a0; }

/* ---------- Mobile quick-action bar ---------- */
.mobile-bar { display: none; }

/* ============ Tablet ============ */
@media (max-width: 1100px) {
  .site-nav { gap: 18px; }
  .site-nav .nav-phone { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
  .hero-badge { left: 14px; }
}

/* ============ Mobile navigation ============ */
@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 24px; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(14,16,20,.14);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; }
  .site-nav a:not(.btn) { padding: 15px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .site-nav .nav-phone { display: block; }
  .site-nav .nav-cta { margin-top: 18px; min-height: 52px; }

  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media img { aspect-ratio: 16 / 11; object-position: 50% 78%; }
  .facts { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .facts li, .facts li + li { padding: 20px 16px 20px 0; border-left: 0; }
  .facts li:nth-child(even) { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.14); }
  .facts li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.14); }

  .section { padding: 72px 0; }
  .trio { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }
  .steps li::after { display: none; }
  .about, .contact { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============ Phones ============ */
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 68px; }
  .wrap { padding: 0 18px; }
  .brand img { width: 40px; }
  .brand-name { font-size: 16px; }
  .brand-tag { font-size: 11px; }

  .hero-actions .btn { width: 100%; }
  .hero-media img { aspect-ratio: 4 / 3.4; }
  .hero-badge { left: 12px; bottom: 12px; padding: 10px 14px; max-width: 210px; }
  .facts strong { font-size: 17px; }
  .facts span { font-size: 13.5px; }

  .section { padding: 60px 0; }
  .section-head { margin-bottom: 34px; }
  .section-head p:not(.eyebrow) { font-size: 16.5px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { padding-left: 64px; min-height: 48px; }
  .step-num { position: absolute; left: 0; top: 0; margin: 0; }

  .gallery { grid-template-columns: 1fr; }
  .gallery img { aspect-ratio: 4 / 4.4; }

  .route { grid-template-columns: 1fr; gap: 22px; padding: 26px 22px; text-align: left; }
  .route::before { top: 36px; bottom: 50px; left: 31px; right: auto; width: 3px; height: auto; background: linear-gradient(180deg, var(--slate), var(--red), var(--slate)); }
  .route-stop { display: grid; grid-template-columns: 22px 1fr; column-gap: 16px; align-items: center; justify-items: start; }
  .route-stop .dot { grid-row: 1 / 3; margin: 0; }

  .quote-form { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 16px; }
  .form-foot .btn { width: 100%; }
  .contact-list li { flex-direction: column; gap: 2px; }
  .contact-list a, .contact-list li > span:last-child { font-size: 17px; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(14,16,20,.97); border-top: 1px solid var(--ink-3);
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; min-height: 46px;
    font-family: var(--font-head); font-weight: 700; font-size: 16px; text-decoration: none;
    color: #fff; border: 2px solid rgba(255,255,255,.35); border-radius: 999px;
  }
  .mobile-bar a.primary { background: var(--red); border-color: var(--red); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
