/* RFI Connected - rebuilt from the HubSpot "Services Division" page.
   Colours sampled from the original page's computed styles.
   Change --accent once the RFI Connected brand colour is confirmed. */
:root {
  --bg: #0b0b0b;
  --panel: #26282d;
  --panel-2: #24272c;
  --card: #1a1b1e;
  --muted: #919693;
  --muted-2: #777373;
  --text: #ffffff;
  --text-soft: #d6d8d7;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ffffff;
  --accent-ink: #0b0b0b;
  --radius: 10px;
  --max: 1200px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--text-soft); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; color: #000; padding: 8px 12px; z-index: 100; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  padding: 20px 0;
}
.site-header.solid { position: sticky; top: 0; background: rgba(11, 11, 11, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header .logo img { height: 78px; width: auto; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { text-decoration: none; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0.9; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 720px) { .nav a:not(.button) { display: none; } .site-header .logo img { height: 60px; } }

/* Buttons */
.button {
  display: inline-block; text-decoration: none; font-weight: 700;
  border: 2px solid var(--accent); color: var(--text);
  padding: 12px 26px; border-radius: 999px; transition: background .2s, color .2s;
}
.button:hover { background: var(--accent); color: var(--accent-ink); }
.button--solid { background: var(--accent); color: var(--accent-ink); }
.button--solid:hover { background: transparent; color: var(--text); }
.button--large { padding: 16px 34px; font-size: 1.05rem; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; text-align: center; }
.hero video, .hero .hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .hero__poster { display: none; }
.hero__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.hero__content { position: relative; z-index: 2; padding: 120px 16px 80px; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); letter-spacing: 0.04em; margin-bottom: 0.2em; }
.hero .hero__sub { font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: var(--text); font-weight: 500; margin-bottom: 1.6em; }
.scroll-cue { position: absolute; bottom: 28px; left: 0; right: 0; z-index: 2; text-align: center; font-size: 0.8rem; letter-spacing: 0.2em; color: var(--text-soft); text-decoration: none; }
.scroll-cue span { display: block; font-size: 1.2rem; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .hero video { display: none; }
  .hero .hero__poster { display: block; }
  .scroll-cue span { animation: none; }
}
@media (max-width: 720px) {
  .hero video { display: none; }
  .hero .hero__poster { display: block; }
}

/* Sections */
.section { padding: 96px 0; }
.section--panel { background: var(--panel); }
.section--panel-2 { background: var(--panel-2); }
@media (max-width: 720px) { .section { padding: 64px 0; } }

.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; height: auto; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.stat { border-top: 2px solid var(--muted); padding-top: 14px; }
.stat strong { display: block; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; margin-bottom: 8px; }
.stat p { margin: 0; font-size: 0.95rem; }

/* Parallax band */
.parallax {
  min-height: 420px;
  background: url("../img/parallax-bg.jpg") center / cover no-repeat fixed;
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) { .parallax { background-attachment: scroll; min-height: 260px; } }

/* Offer cards */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .offer-grid { grid-template-columns: 1fr; } }
.offer-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.offer-card .icon { width: 44px; height: 44px; margin-bottom: 18px; color: var(--muted); }
.offer-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.offer-card ul { list-style: none; margin: 0; padding: 0; }
.offer-card li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; color: var(--text-soft); }
.offer-card li:last-child { border-bottom: 0; }

/* Centred heading band */
.band { text-align: center; padding: 72px 0 24px; }
.band h2 { margin: 0; }
.band__sub { margin: 12px 0 0; font-size: 1.15rem; color: var(--text); }
/* Trademark symbol: superscript without stretching the line height */
.tm { font-size: 0.6em; vertical-align: super; line-height: 0; }

/* Solution columns */
.solutions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .solutions { grid-template-columns: 1fr; } }
.solution { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.solution img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.solution div { padding: 24px 24px 28px; }
.solution h3 { margin-bottom: 10px; }
.solution p { font-size: 0.95rem; margin: 0; }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.card img { width: 100%; aspect-ratio: 400 / 245; object-fit: cover; }
.card__body { padding: 22px 22px 8px; flex: 1; }
.card__body h3 { font-size: 1.1rem; }
.card__body p { font-size: 0.92rem; }
.card__foot { padding: 0 22px 24px; }
.tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* CTA */
.cta { text-align: center; }
.cta p { font-size: 1.25rem; color: var(--text); margin-bottom: 1.4em; }

/* Footer */
.site-footer { background: #000; padding: 48px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer img { height: 34px; width: auto; }
.social { display: flex; gap: 14px; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.05); }
.social a:hover { background: rgba(255, 255, 255, 0.15); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer small { color: var(--muted); }

/* Case study pages */
.cs-hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; overflow: hidden; }
.cs-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 11, 11, 0.95) 8%, rgba(11, 11, 11, 0.25) 70%); }
.cs-hero .wrap { position: relative; z-index: 2; padding-top: 140px; padding-bottom: 48px; }
.cs-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 22ch; }
.cs-hero .lede { font-size: 1.15rem; color: var(--text); max-width: 60ch; margin: 0; }
.cs-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
@media (max-width: 900px) { .cs-body { grid-template-columns: 1fr; } }
.cs-body article h2 { font-size: 1.6rem; margin-top: 1.6em; }
.cs-body article h2:first-child { margin-top: 0; }
.cs-body article ul { padding-left: 1.2em; color: var(--text-soft); }
.cs-body article li { margin-bottom: 0.4em; }
.facts { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; align-self: start; position: sticky; top: 100px; }
.facts dl { margin: 0; }
.facts dt { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 4px 0 0; color: var(--text); }
.facts ul { margin: 4px 0 0; padding-left: 1.1em; }
.credit { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; }
.back { display: inline-block; margin-bottom: 18px; text-decoration: none; color: var(--text-soft); font-size: 0.9rem; }
.back:hover { color: var(--text); }

/* Reveal on scroll (replaces AOS) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* Case study gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 24px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.03); }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
