/* [RF]Square: static site styles. No external resources. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Logo colors */
  --blue: #0085c8;
  --charcoal: #292627;
  --gray: #757779;

  /* Derived */
  --blue-text: #006ea6;    /* links and small blue text on light backgrounds */
  --blue-btn: #0070a8;     /* button fill with white text */
  --blue-btn-hover: #005c8a;
  --sky: #54b8ec;          /* blue on dark backgrounds */
  --ink: #161819;
  --ink-2: #202325;
  --ink-line: rgba(255, 255, 255, 0.1);
  --on-ink: #eef1f4;
  --on-ink-muted: #a7adb5;

  --paper: #ffffff;
  --mist: #f2f5f8;
  --line: #e2e6eb;
  --text: #1f1d1e;
  --muted: #5b5f66;

  /* Signal-strength ramp from the coverage plots, used as a thin accent only */
  --heat: linear-gradient(90deg, #1f9be0 0%, #22b573 30%, #c9d62a 55%, #f7a21b 78%, #e8412c 100%);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 24, 25, 0.06), 0 10px 28px rgba(22, 24, 25, 0.08);
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-text); text-underline-offset: 3px; }
a:hover { color: var(--charcoal); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--blue-btn); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; margin: 0; color: inherit; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; max-width: 20ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.15; max-width: 26ch; margin-bottom: 18px; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.005em; }

.eyebrow {
  margin: 0 0 12px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue-text);
}
.eyebrow::before {
  content: ""; display: inline-block; width: 26px; height: 3px; margin-right: 10px; vertical-align: middle;
  background: var(--heat); border-radius: 2px;
}
.eyebrow-dark { color: var(--sky); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.cube { width: 34px; height: auto; flex: none; }
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.01em;
  color: var(--charcoal); white-space: nowrap; line-height: 1;
}
.wm-rf { color: var(--blue); }
.wordmark-dark { color: #fff; }
.wordmark-dark .wm-rf { color: var(--sky); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 68px; flex-wrap: wrap; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 999px;
}
.site-nav a:hover { color: var(--charcoal); background: var(--mist); }
.site-nav a[aria-current="page"] { color: var(--blue-text); background: rgba(0, 133, 200, 0.09); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--blue-btn); color: #fff; }
.btn-primary:hover { background: var(--blue-btn-hover); color: #fff; }
.btn-ghost { color: var(--on-ink); border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn-light { background: #fff; color: var(--charcoal); }
.btn-light:hover { background: var(--mist); color: var(--charcoal); }

/* Dark bands: home hero and page heroes */
.hero, .page-hero {
  position: relative; overflow: hidden; color: var(--on-ink);
  background:
    radial-gradient(48rem 26rem at 88% -10%, rgba(0, 133, 200, 0.32), transparent 62%),
    radial-gradient(30rem 20rem at -6% 110%, rgba(34, 181, 115, 0.12), transparent 60%),
    var(--ink);
}
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 35%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse at 75% 35%, #000 0%, transparent 72%);
}
.heat-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--heat); }

.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px); }
.hero-grid { position: relative; display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.22rem); color: var(--on-ink-muted); max-width: 56ch; margin: 20px 0 30px; }

.hero-visual { margin: 0; justify-self: center; width: min(100%, 440px); }
.plot-frame {
  background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
}
.plot-frame img { width: 100%; border-radius: var(--radius-sm); }
.hero-visual figcaption { margin-top: 12px; text-align: center; font-size: 0.9rem; color: var(--on-ink-muted); }

.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(52px, 7vw, 92px); }
.page-hero .container { position: relative; }
.page-hero .lead { margin-bottom: 0; }

/* Sections */
.section { padding: clamp(60px, 8vw, 100px) 0; }
.section-tint { background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Home: what we do */
.pillars { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 640px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 24px; box-shadow: var(--shadow);
}
.pillar-media {
  height: 120px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--mist); border-radius: var(--radius-sm);
}
.pillar-media img { max-height: 90px; width: auto; }
.pillar h3 { margin-bottom: 8px; }
.pillar p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Home: projects */
.projects { display: grid; gap: 22px; margin-top: 32px; }
@media (min-width: 760px) { .projects { grid-template-columns: repeat(3, 1fr); } }
.project {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.project img { width: 100%; aspect-ratio: 360 / 230; object-fit: cover; }
.project-body { position: relative; padding: 22px 22px 22px; }
.project-body::before, .contact-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--heat);
}
.project-body h3 { margin-bottom: 4px; }
.project-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Logo rows */
.logo-row {
  list-style: none; margin: 30px 0 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .logo-row { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .logo-row { grid-template-columns: repeat(5, 1fr); } }
.logo-row li {
  display: grid; place-items: center; min-height: 104px; padding: 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.logo-row img { max-height: 64px; width: auto; }
.logo-row-small li { min-height: 76px; }
.logo-row-small img { max-height: 28px; }

/* Call to action */
.cta { background: linear-gradient(120deg, #005f92 0%, var(--blue) 60%, #1f9be0 100%); color: #fff; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(40px, 6vw, 64px) 0; }
.cta h2 { margin-bottom: 8px; max-width: 30ch; }
.cta p { margin: 0; color: rgba(255, 255, 255, 0.88); max-width: 60ch; }

/* About */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.2fr 1fr; gap: 64px; } }
.prose p { color: var(--muted); max-width: 62ch; }
.plot-card {
  margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.plot-card img { width: 100%; border-radius: var(--radius-sm); }
.plot-card figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); text-align: center; }

.quote-band { background: var(--ink); color: var(--on-ink); padding: clamp(48px, 7vw, 80px) 0; }
.quote-band blockquote { margin: 0; max-width: 760px; }
.quote-band blockquote p {
  margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.2;
}
.quote-band blockquote p::before { content: "\201C"; color: var(--sky); margin-right: 4px; }
.quote-band blockquote p::after { content: "\201D"; color: var(--sky); margin-left: 2px; }
.quote-band footer { margin-top: 14px; color: var(--on-ink-muted); font-weight: 600; }

/* Services */
.services { display: grid; gap: clamp(48px, 7vw, 80px); }
.service { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) {
  .service { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .service-flip .service-media { order: 2; }
}
.service-media {
  background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: grid; place-items: center;
}
.service-media img { width: 100%; max-width: 420px; border-radius: var(--radius-sm); box-shadow: 0 8px 22px rgba(22, 24, 25, 0.15); }
.service-num {
  margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.08em;
  color: var(--blue-text);
}
.service-text h2 { margin-bottom: 6px; }
.service-tag { margin: 0 0 14px; font-weight: 600; color: var(--charcoal); }
.service-text p:last-child { color: var(--muted); margin: 0; max-width: 60ch; }

/* Contact */
.contact-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
.contact-card, .message-card {
  font-style: normal; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow);
}
.contact-card { position: relative; overflow: hidden; padding-top: 32px; }
.contact-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.contact-brand .cube { width: 44px; }
.contact-brand p { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
.contact-card dt { font-weight: 700; color: var(--charcoal); }
.contact-card dd { margin: 0; color: var(--muted); }
.message-card h2 { font-size: 1.5rem; margin-bottom: 10px; }
.message-card p { color: var(--muted); }
.message-card .btn { margin: 6px 0 16px; overflow-wrap: anywhere; }
.message-card .small { font-size: 0.95rem; margin: 0; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-ink-muted); }
.footer-grid { display: grid; gap: 28px; padding: 48px 0 32px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.2fr 1fr auto; align-items: start; } }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand p { margin: 6px 0 0; font-size: 0.92rem; }
.cube-badge { display: grid; place-items: center; width: 52px; height: 52px; background: #fff; border-radius: 12px; flex: none; }
.cube-badge .cube { width: 30px; }
.footer-contact { font-style: normal; font-size: 0.95rem; }
.footer-contact p { margin: 0 0 10px; }
.footer-contact a, .footer-nav a { color: var(--on-ink); }
.footer-contact a:hover, .footer-nav a:hover { color: var(--sky); }
.footer-nav { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.footer-nav a { text-decoration: none; }
.footer-base { border-top: 1px solid var(--ink-line); padding: 18px 0 26px; font-size: 0.88rem; }
.footer-base p { margin: 0; }

/* Small screens */
@media (max-width: 600px) {
  .header-inner { padding: 10px 0; }
  .site-nav { width: 100%; justify-content: space-between; }
  .site-nav a { padding: 6px 10px; font-size: 0.92rem; }
  .actions .btn, .cta .btn { width: 100%; }
  .contact-card, .message-card { padding: 22px; }
}
