/* ==========================================================================
   Kelpsoft — Reef editorial skin
   A layout and identity layer loaded after the base stylesheet.
   ========================================================================== */

:root {
  --teal: #0b6b62;
  --navy: #093f42;
  --ink: #062a2b;
  --muted: #55706b;
  --line: #cfe2da;
  --paper: #f4f8f4;
  --mint: #e0f0e9;
  --surface: #ffffff;
  --rule: #c7dbd3;
  --on-accent: #ffffff;
  --deep: #031f20;
  --accent-band: #d9ece4;
  --coral: #b84628;
  --coral-soft: #f8e2d9;
  --on-coral: #ffffff;
  --rf-radius: 26px;
  --rf-radius-sm: 16px;
  --rf-shadow: 0 24px 60px -34px rgba(3, 31, 32, 0.55);
}

:root[data-site-theme="dark"] {
  --teal: #7be6c6;
  --navy: #a7d8dd;
  --ink: #edf7f2;
  --muted: #9cb7b0;
  --line: #20443f;
  --paper: #061a19;
  --mint: #0c2826;
  --surface: #0a2220;
  --rule: #224842;
  --on-accent: #041b19;
  --deep: #020f0f;
  --accent-band: #0e2c29;
  --coral: #ff9a7c;
  --coral-soft: #3a1f1a;
  --on-coral: #1a0a05;
  --rf-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.8);
}

html {
  scroll-behavior: smooth;
}

body.v2 {
  background:
    radial-gradient(1100px 700px at 92% -8%, var(--mint), transparent 60%),
    radial-gradient(800px 500px at -10% 28%, var(--accent-band), transparent 55%),
    var(--paper);
  color: var(--ink);
}

::selection {
  background: var(--coral);
  color: var(--on-coral);
}

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

/* --------------------------------------------------------------------------
   Header — floating island
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: calc(100% - 32px);
  max-width: 1280px;
  height: 70px;
  margin: 12px auto 0;
  padding: 0 16px 0 22px;
  gap: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 18px 40px -30px rgba(3, 31, 32, 0.65);
}

.header.scrolled {
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  box-shadow: 0 18px 40px -28px rgba(3, 31, 32, 0.7);
}

.header .logo {
  gap: 9px;
}

.header .logo-mark {
  width: 30px;
  height: 30px;
}

.header .logo-word {
  font-size: 21px;
  letter-spacing: -0.05em;
}

.header nav {
  gap: 2px;
  margin-left: auto;
  font-size: 14px;
}

.header nav .nav-link,
.header nav > a.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.header nav .nav-link:hover,
.header nav > a.nav-link:hover,
.header nav .nav-item:hover > .nav-link,
.header nav .nav-item:focus-within > .nav-link {
  background: var(--mint);
  color: var(--ink);
}

.header nav a::after {
  display: none;
}

.header .nav-contact {
  display: none;
}

.header-cta,
.header .header-cta {
  display: inline-flex;
  margin-left: 0;
  min-height: 44px;
  padding: 11px 18px;
  gap: 16px;
  border-radius: 999px;
  font-size: 13px;
}

.header > .theme-toggle {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.header > .theme-toggle:hover {
  background: var(--mint);
}

.header nav .nav-theme {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 12px 4px 0;
  margin-top: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  justify-content: flex-start;
  gap: 12px;
}

.submenu {
  top: calc(100% + 14px);
  left: 0;
  min-width: 264px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--rf-shadow);
}

.submenu.wide {
  min-width: 500px;
  gap: 0 28px;
  padding: 20px 24px;
}

.submenu a {
  border-radius: 10px;
  padding: 8px 10px;
}

.submenu a:hover {
  background: var(--mint);
}

.submenu .submenu-all {
  margin-top: 8px;
  padding: 12px 10px 2px;
  color: var(--coral);
}

.submenu-title {
  padding: 0 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Buttons, links, labels
   -------------------------------------------------------------------------- */

.button {
  gap: 28px;
  padding: 16px 22px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--on-coral);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.3s var(--motion-ease), box-shadow 0.3s ease, background 0.2s ease;
}

.button:hover {
  background: var(--coral);
  color: var(--on-coral);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--coral) 70%, transparent);
}

.text-link {
  gap: 12px;
  font-weight: 600;
  color: var(--teal);
  background-image: none;
}

.text-link:hover {
  color: var(--coral);
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */

.rf-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(46px, 6vw, 86px) 0 0;
}

.rf-hero::before {
  content: "";
  position: absolute;
  inset: -18% -10% auto auto;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mint) 0%, transparent 66%);
  opacity: 0.85;
  pointer-events: none;
}

.rf-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  position: relative;
}

.rf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rf-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--coral) 16%, transparent);
}

.rf-hero h1 {
  margin: 22px 0 0;
  max-width: 13ch;
  font-size: clamp(46px, 6.4vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 600;
  text-wrap: balance;
}

.rf-hero h1 em {
  display: block;
  font-style: normal;
  color: var(--teal);
}

.rf-lede {
  max-width: 510px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.65;
}

.rf-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 34px;
}

.rf-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rf-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.rf-hero-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.rf-hero-visual {
  position: relative;
  width: 100%;
  max-width: 540px;
  justify-self: end;
  aspect-ratio: 1 / 1;
}

.rf-hero-visual::before {
  content: "";
  position: absolute;
  inset: 9% 4% 5% 8%;
  border-radius: 48% 52% 46% 54% / 52% 44% 56% 48%;
  background: var(--mint);
}

.rf-art {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.rf-art-hero {
  position: absolute;
  inset: 0;
  height: 100%;
}

.rf-contour {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.rf-curve {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
}

.rf-curve--ghost {
  stroke: var(--coral);
  stroke-width: 1.5;
  stroke-dasharray: 3 9;
  opacity: 0.7;
}

.rf-node {
  fill: var(--paper);
  stroke: var(--teal);
  stroke-width: 2;
}

.rf-node--live {
  fill: var(--coral);
  stroke: var(--paper);
  stroke-width: 3;
}

.rf-tag rect {
  fill: var(--surface);
  stroke: var(--line);
}

.rf-tag text {
  fill: var(--ink);
  font: 600 11px var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rf-tag circle {
  fill: var(--coral);
}

.rf-tide {
  opacity: 0.5;
}

.rf-badge {
  position: absolute;
  left: 0;
  bottom: 8%;
  display: grid;
  gap: 4px;
  max-width: 230px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--rf-shadow);
}

.rf-badge strong {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.rf-badge span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rf-ticker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  margin-top: clamp(38px, 5vw, 64px);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rf-ticker span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
}

.rf-ticker span::after {
  content: "";
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--coral);
}

.rf-ticker span:last-child::after {
  display: none;
}

/* --------------------------------------------------------------------------
   Home — sections and editorial headings
   -------------------------------------------------------------------------- */

.rf-section {
  position: relative;
  padding: clamp(62px, 7.5vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.rf-section-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  margin-bottom: clamp(36px, 4.5vw, 58px);
}

.rf-index {
  margin: 6px 0 0;
  color: var(--coral);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rf-section-head h2 {
  max-width: 820px;
  font-size: clamp(34px, 4.3vw, 62px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}

.rf-section-head p {
  max-width: 460px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.rf-section-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 26px;
}

/* Capabilities bento */

.rf-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--rf-radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.35s var(--motion-ease), border-color 0.2s ease, box-shadow 0.35s ease;
}

.rf-card:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
  box-shadow: var(--rf-shadow);
}

.rf-card--feature {
  grid-column: span 2;
  background: var(--deep);
  border-color: var(--deep);
  color: #f1faf5;
}

.rf-card--feature:hover {
  border-color: var(--coral);
}

.rf-card-num {
  color: var(--coral);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rf-card h3 {
  margin: 16px 0 0;
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.rf-card p {
  max-width: 430px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.rf-card--feature p {
  color: #a9c4bd;
}

.rf-card .text-link {
  margin-top: auto;
  padding-top: 22px;
  align-self: flex-start;
  color: var(--teal);
  font-size: 14px;
}

.rf-card--feature .text-link {
  color: #f1faf5;
}

.rf-card-art {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 150px;
  opacity: 0.9;
  pointer-events: none;
}

.rf-card--wide {
  grid-column: span 2;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 24px;
  padding: 24px 28px;
  background: var(--mint);
}

.rf-card--wide .rf-card-num {
  grid-column: 1 / -1;
}

.rf-card--wide h3 {
  margin: 0;
  font-size: 22px;
}

.rf-card--wide p {
  margin: 5px 0 0;
  max-width: 560px;
}

.rf-card--wide > .text-link {
  grid-column: 2;
  grid-row: 2 / span 2;
  margin: 0;
  padding: 0;
}

/* Starting points */

.rf-rows {
  border-top: 1px solid var(--line);
}

.rf-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(220px, 340px) 48px;
  gap: clamp(16px, 3vw, 36px);
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.25s ease, padding 0.3s var(--motion-ease);
}

.rf-row:hover {
  background: var(--mint);
  padding-left: 18px;
  padding-right: 18px;
}

.rf-row-num {
  color: var(--coral);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.rf-row h3 {
  font-size: clamp(25px, 2.7vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.rf-row p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.rf-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--coral);
  transition: background 0.2s ease, color 0.2s ease, transform 0.3s var(--motion-ease);
}

.rf-row:hover .rf-arrow {
  background: var(--coral);
  color: var(--on-coral);
  transform: rotate(45deg);
}

.rf-arrow .icon {
  width: 17px;
  height: 17px;
}

.rf-card--feature h3 {
  max-width: 78%;
}

.rf-card--feature .rf-card-art {
  width: 168px;
  opacity: 0.9;
}

/* Dark practice band */

.rf-dark {
  background: var(--deep);
  color: #eef8f3;
  border-top: 0;
  overflow: hidden;
}

.rf-dark::before {
  content: "";
  position: absolute;
  right: -160px;
  top: -200px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.02), 0 0 0 150px rgba(255, 255, 255, 0.015);
  pointer-events: none;
}

.rf-dark .rf-index {
  color: var(--coral);
}

.rf-dark .rf-section-head h2 {
  color: #f4fcf8;
}

.rf-dark .rf-section-head p {
  color: #a9c4bd;
}

.rf-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(34px, 4vw, 48px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.rf-feature--flip .rf-feature-art {
  order: -1;
}

.rf-feature-kicker {
  color: var(--coral);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rf-feature h3 {
  max-width: 16ch;
  margin: 14px 0 0;
  color: #f4fcf8;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.rf-feature p {
  max-width: 490px;
  margin: 16px 0 0;
  color: #a9c4bd;
  font-size: 15px;
  line-height: 1.7;
}

.rf-feature .text-link {
  margin-top: 22px;
  color: #f4fcf8;
}

.rf-feature .text-link:hover {
  color: var(--coral);
}

.rf-feature-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.07), transparent 55%),
    rgba(255, 255, 255, 0.025);
}

.rf-feature-art svg {
  width: 100%;
  height: auto;
}

/* Approach steps */

.rf-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.rf-step {
  position: relative;
  padding: 28px 26px 0 0;
  border-right: 1px solid var(--line);
}

.rf-step:last-child {
  border-right: 0;
}

.rf-step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--coral);
}

.rf-step-num {
  display: block;
  color: var(--line);
  font-size: clamp(42px, 4.5vw, 60px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
}

.rf-step h3 {
  margin: 24px 0 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.rf-step p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Industries */

.rf-industry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rf-industry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--rf-radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.35s var(--motion-ease), border-color 0.2s ease;
}

.rf-industry:hover {
  transform: translateY(-4px);
  border-color: var(--coral);
}

.rf-industry::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rf-industry:hover::before {
  opacity: 1;
}

.rf-industry h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.035em;
}

.rf-industry p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.rf-industry .rf-arrow {
  grid-column: 2;
  grid-row: 1;
  width: 38px;
  height: 38px;
}

/* Why — sticky rail */

.rf-why {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}

.rf-why-head {
  position: sticky;
  top: calc(var(--header-h) + 26px);
}

.rf-why-head h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.rf-why-head p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.rf-why-points {
  border-top: 1px solid var(--line);
}

.rf-why-point {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.rf-why-num {
  color: var(--coral);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding-top: 6px;
}

.rf-why-point h3 {
  font-size: 21px;
  letter-spacing: -0.025em;
}

.rf-why-point p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* Insights — editorial rows */

.rf-insight-list {
  border-top: 1px solid var(--line);
}

.rf-insight-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 44px;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.25s ease, padding 0.3s var(--motion-ease);
}

.rf-insight-row:hover {
  background: var(--mint);
  padding-left: 16px;
  padding-right: 16px;
}

.rf-insight-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.rf-insight-row h3 {
  font-size: clamp(19px, 1.9vw, 25px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.rf-insight-row .rf-arrow {
  width: 38px;
  height: 38px;
}

/* Contact — dark panel */

.rf-contact {
  position: relative;
  overflow: hidden;
  padding: clamp(52px, 7vw, 90px) 0;
  background: var(--deep);
  color: #eef8f3;
}

.rf-contact::before {
  content: "";
  position: absolute;
  inset: auto auto -260px -160px;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.02), 0 0 0 140px rgba(255, 255, 255, 0.015);
  pointer-events: none;
}

.rf-contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.rf-contact .eyebrow {
  color: var(--coral);
}

.rf-contact h2 {
  margin: 16px 0 0;
  max-width: 12ch;
  color: #f4fcf8;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.rf-contact-copy > p {
  max-width: 430px;
  margin: 20px 0 0;
  color: #a9c4bd;
  font-size: 16px;
  line-height: 1.7;
}

.rf-contact .email {
  margin-top: 24px;
  color: #f4fcf8;
  border-color: rgba(255, 255, 255, 0.3);
  font-size: 18px;
}

.rf-contact .email:hover {
  color: var(--coral);
}

.rf-contact .next-step {
  max-width: 430px;
  margin-top: 30px;
  border-top-color: rgba(255, 255, 255, 0.16);
}

.rf-contact .next-step .eyebrow {
  color: #a9c4bd;
}

.rf-contact .next-step p {
  color: #a9c4bd;
}

.rf-contact .lead-form {
  padding: clamp(22px, 3vw, 30px);
  border-radius: 26px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.65);
}

.rf-contact .lead-form .form-success {
  border-radius: 0 12px 12px 0;
}

/* --------------------------------------------------------------------------
   Inner pages — hero with diagram
   -------------------------------------------------------------------------- */

.detail-hero {
  position: relative;
  padding-top: clamp(34px, 4vw, 56px);
  padding-bottom: clamp(48px, 6vw, 78px);
  border-bottom: 1px solid var(--line);
}

.detail-hero:not(.post-hero):not(.has-art) {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  column-gap: clamp(30px, 5vw, 72px);
  align-items: center;
}

.detail-hero:not(.post-hero):not(.has-art) > *:not(.reef-hero-art) {
  grid-column: 1;
}

.detail-hero .breadcrumb {
  margin-bottom: 34px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-hero .breadcrumb a:hover {
  color: var(--coral);
}

.detail-hero > .eyebrow,
.detail-copy > .eyebrow {
  color: var(--coral);
}

.detail-hero h1 {
  max-width: 850px;
  margin-top: 16px;
  font-size: clamp(40px, 4.5vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}

.detail-hero > p,
.detail-copy > p {
  max-width: 620px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.detail-hero .hero-actions {
  margin-top: 30px;
}

.detail-hero > .reef-hero-art {
  grid-column: 2;
  grid-row: 1 / span 20;
  align-self: center;
}

.reef-hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 16%, var(--coral-soft), transparent 48%),
    var(--mint);
  overflow: hidden;
}

.reef-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.55;
  pointer-events: none;
}

.reef-hero-art svg {
  position: relative;
  width: 100%;
  max-width: 330px;
  height: auto;
}

.reef-hero-art::after {
  content: "system map";
  position: absolute;
  left: 22px;
  bottom: 18px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.detail-hero.has-art {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}

.detail-hero.has-art .detail-copy {
  grid-column: 1;
}

.detail-hero.has-art .detail-art {
  grid-column: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 16%, var(--coral-soft), transparent 48%),
    var(--mint);
  overflow: hidden;
}

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

/* Reef diagram primitives */

.rf-diagram {
  display: block;
  width: 100%;
  height: auto;
}

.rf-diagram .rf-d-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2;
}

.rf-diagram .rf-d-line--strong {
  stroke: var(--teal);
  stroke-width: 2;
}

.rf-diagram .rf-d-dash {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.4;
  stroke-dasharray: 4 7;
  opacity: 0.8;
}

.rf-diagram .rf-d-coral {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2;
  stroke-linecap: round;
}

.rf-diagram .rf-d-fill {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.2;
}

.rf-diagram .rf-d-soft {
  fill: var(--mint);
  stroke: var(--line);
  stroke-width: 1.2;
}

.rf-diagram .rf-d-node {
  fill: var(--surface);
  stroke: var(--teal);
  stroke-width: 2;
}

.rf-diagram .rf-d-node-coral {
  fill: var(--coral);
  stroke: var(--paper);
  stroke-width: 2;
}

.rf-diagram .rf-d-label {
  fill: var(--ink);
  font: 600 10px var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rf-diagram .rf-d-mono {
  fill: var(--muted);
  font: 500 9px var(--font);
  letter-spacing: 0.08em;
}

.rf-diagram .rf-d-oncoral {
  fill: var(--on-coral);
  font: 600 10px var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rf-diagram .rf-d-wave {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.rf-diagram .rf-d-scar {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* Diagrams on dark bands need their own ink, regardless of site theme */
.rf-dark .rf-diagram .rf-d-line,
.detail-band .rf-diagram .rf-d-line {
  stroke: rgba(255, 255, 255, 0.22);
}

.rf-dark .rf-diagram .rf-d-dash,
.detail-band .rf-diagram .rf-d-dash {
  stroke: #7be6c6;
}

.rf-dark .rf-diagram .rf-d-fill,
.detail-band .rf-diagram .rf-d-fill {
  fill: rgba(255, 255, 255, 0.055);
  stroke: rgba(255, 255, 255, 0.18);
}

.rf-dark .rf-diagram .rf-d-soft,
.detail-band .rf-diagram .rf-d-soft {
  fill: rgba(255, 255, 255, 0.09);
  stroke: rgba(255, 255, 255, 0.18);
}

.rf-dark .rf-diagram .rf-d-label,
.detail-band .rf-diagram .rf-d-label {
  fill: #edf7f2;
}

.rf-dark .rf-diagram .rf-d-mono,
.detail-band .rf-diagram .rf-d-mono {
  fill: #9cb7b0;
}

.rf-dark .rf-diagram .rf-d-node,
.detail-band .rf-diagram .rf-d-node {
  fill: #08211f;
  stroke: #7be6c6;
}

.rf-dark .rf-diagram .rf-d-node-coral,
.detail-band .rf-diagram .rf-d-node-coral {
  stroke: #031f20;
}

.rf-dark .rf-diagram .rf-d-wave,
.detail-band .rf-diagram .rf-d-wave {
  stroke: #7be6c6;
}

.rf-dark .rf-diagram .rf-d-coral,
.detail-band .rf-diagram .rf-d-coral {
  stroke: #ff9a7c;
}

.rf-dark .rf-diagram .rf-d-scar,
.detail-band .rf-diagram .rf-d-scar {
  stroke: #ff9a7c;
}

.rf-dark .rf-diagram .rf-d-oncoral,
.detail-band .rf-diagram .rf-d-oncoral {
  fill: #1a0a05;
}

/* --------------------------------------------------------------------------
   Inner pages — section rail layout
   -------------------------------------------------------------------------- */

main {
  counter-reset: rfsec;
}

.detail-section {
  padding-top: clamp(48px, 6vw, 78px);
  padding-bottom: clamp(48px, 6vw, 78px);
  border-top: 0;
  counter-increment: rfsec;
}

.detail-section.wrap {
  display: grid;
  grid-template-columns: minmax(210px, 290px) minmax(0, 1fr);
  column-gap: clamp(26px, 4vw, 62px);
  row-gap: 0;
  align-items: start;
}

.detail-section > .section-heading,
.detail-section > .section-top {
  grid-column: 1;
  position: sticky;
  top: calc(var(--header-h) + 28px);
  display: block;
  margin: 0;
  align-self: start;
}

.detail-section > .section-heading::before,
.detail-section > .section-top::before {
  content: "0" counter(rfsec);
  display: block;
  margin-bottom: 14px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.detail-section > .section-heading h2,
.detail-section > .section-top .eyebrow {
  margin: 0;
  font-size: clamp(28px, 2.9vw, 42px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.detail-section > .section-top .eyebrow {
  font-size: 16px;
  letter-spacing: 0.1em;
}

.detail-section > .section-heading > p {
  max-width: 260px;
  margin: 14px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.detail-section > .section-top .eyebrow {
  display: block;
}

.detail-section > .section-top .text-link {
  display: flex;
  width: fit-content;
  margin-top: 16px;
  font-size: 13px;
}

.detail-section > *:not(.section-heading):not(.section-top) {
  grid-column: 2;
  min-width: 0;
}

.detail-section > .prose {
  max-width: 820px;
}

.detail-section.tone-surface {
  background: transparent;
}

.detail-section.wrap:not(:has(> .section-heading)):not(:has(> .section-top)) {
  display: block;
}

.detail-section.wrap:not(:has(> .section-heading)):not(:has(> .section-top)) > * {
  grid-column: auto;
}

/* Cards inside inner pages */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
  counter-reset: rfcard;
}

.detail-grid article {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--rf-radius-sm);
  background: var(--surface);
  counter-increment: rfcard;
  transition: transform 0.3s var(--motion-ease), border-color 0.2s ease;
}

.detail-grid article:hover {
  transform: translateY(-3px);
  border-color: var(--coral);
}

.detail-grid article::before {
  content: "0" counter(rfcard);
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.detail-grid h3 {
  padding-right: 38px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.detail-grid p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.detail-grid .tags {
  margin-top: 16px;
}

/* Detail steps */

.detail-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}

.detail-steps li {
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: var(--rf-radius-sm);
  background: var(--surface);
}

.detail-steps li::before {
  margin-bottom: 16px;
  color: var(--coral);
}

/* Benefits & tech cards */

.benefit-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 0;
  border-top: 0;
}

.benefit-list > div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--rf-radius-sm);
  background: var(--surface);
}

.benefit-list .card-icon {
  margin-bottom: 18px;
  color: var(--coral);
}

.tech-cards {
  gap: 14px;
}

.tech-card {
  border-radius: var(--rf-radius-sm);
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.3s var(--motion-ease);
}

.tech-card:hover {
  border-color: var(--coral);
  transform: translateY(-3px);
}

/* FAQ */

.landing-faq details {
  border-top: 1px solid var(--line);
}

.landing-faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}

.landing-faq summary {
  padding: 22px 56px 22px 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.landing-faq summary::after {
  right: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--coral);
  font-size: 18px;
  line-height: 1;
}

.landing-faq details[open] summary {
  color: var(--coral);
}

.landing-faq details p {
  max-width: 780px;
  padding: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* Technologies list */

.landing-tech .landing-tech-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  gap: 9px;
}

.landing-tech-list li {
  width: auto;
}

.landing-tech-list a {
  justify-content: flex-start;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.landing-tech-list a:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.landing-tech-list .tech-logo {
  width: 22px;
  height: 22px;
  color: var(--teal);
}

/* Band + CTA */

.detail-band {
  position: relative;
  overflow: hidden;
  max-width: 1280px;
  margin: clamp(28px, 4vw, 52px) auto;
  padding: clamp(42px, 6vw, 78px) 0;
  border-radius: 34px;
  background: var(--deep);
  color: #eef8f3;
}

.detail-band::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -220px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.02), 0 0 0 130px rgba(255, 255, 255, 0.012);
}

.detail-band > .wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  padding-left: clamp(24px, 5vw, 64px);
  padding-right: clamp(24px, 5vw, 64px);
}

.detail-band .eyebrow {
  color: var(--coral);
}

.detail-band h2 {
  max-width: 780px;
  margin: 18px 0 26px;
  color: #f4fcf8;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.detail-band p,
.detail-band li,
.detail-band > .wrap > p {
  color: #a9c4bd;
}

.detail-band .tags li {
  border-color: rgba(255, 255, 255, 0.22);
  color: #d9ece5;
}

.detail-band .skill-groups h3 {
  color: #f4fcf8;
}

.detail-band .detail-steps li {
  color: var(--ink);
}

.detail-band .detail-steps h3 {
  color: var(--ink);
}

.detail-band .detail-steps p {
  color: var(--muted);
}

.detail-band a {
  color: var(--coral);
}

.detail-cta {
  max-width: 1280px;
  margin: clamp(30px, 4vw, 50px) auto;
  padding: clamp(38px, 5vw, 68px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 88% 10%, var(--coral-soft), transparent 45%),
    var(--mint);
}

.detail-cta h2 {
  max-width: 760px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.detail-cta .button {
  margin-top: 26px;
}

.detail-cta > p {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Blog index — numbered editorial rows
   -------------------------------------------------------------------------- */

.blog-hero {
  padding-bottom: clamp(38px, 5vw, 60px);
}

.blog-hero .blog-categories {
  margin-top: 24px;
  gap: 8px;
}

.blog-categories a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.blog-categories a:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.blog-categories a[aria-current] {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--on-coral);
}

.blog-hero .blog-categories {
  grid-column: 1;
}

.post-grid {
  display: block;
  border-top: 1px solid var(--line);
  counter-reset: rfpost;
}

.post-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 44px;
  gap: 6px 26px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: rfpost;
  transition: background 0.25s ease, padding 0.3s var(--motion-ease);
}

.post-card::before {
  content: "0" counter(rfpost);
  grid-column: 1;
  grid-row: 1 / span 3;
  padding-top: 5px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.post-card::after {
  content: "↗";
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--coral);
  font-size: 15px;
  line-height: 1;
  transition: transform 0.3s var(--motion-ease), background-color 0.2s ease, color 0.2s ease;
}

.post-card:hover {
  background: var(--mint);
  padding-left: 16px;
  padding-right: 16px;
}

.post-card:hover::after {
  transform: rotate(45deg);
  background: var(--coral);
  color: var(--on-coral);
}

.post-card .post-meta {
  grid-column: 2;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-card h3 {
  grid-column: 2;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.post-card h3 a:hover {
  color: var(--coral);
}

.post-card .post-abstract {
  grid-column: 2;
  max-width: 800px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.post-card .post-media {
  display: none;
}

.blog-hero + .detail-section {
  padding-top: clamp(36px, 4vw, 54px);
}

.pagination {
  gap: 8px;
  margin-top: 44px;
}

.pagination a {
  min-width: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
}

.pagination a:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.pagination a[aria-current] {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--on-coral);
}

/* --------------------------------------------------------------------------
   Blog post
   -------------------------------------------------------------------------- */

.post-hero {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  column-gap: clamp(26px, 4vw, 54px);
  align-items: start;
  padding-top: clamp(30px, 4vw, 48px);
  padding-bottom: clamp(36px, 5vw, 58px);
}

.post-hero .breadcrumb {
  grid-column: 1 / -1;
  margin-bottom: 30px;
}

.post-hero .post-meta {
  grid-column: 1;
  grid-row: 2;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-hero .post-meta .post-category {
  color: var(--coral);
}

.post-hero h1 {
  grid-column: 2;
  grid-row: 2;
  max-width: 900px;
  margin: 0;
  font-size: clamp(32px, 3.8vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.post-hero .post-author {
  grid-column: 2;
  grid-row: 3;
  margin-top: 18px;
  font-size: 14px;
}

.post-layout {
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 60px);
  padding-top: clamp(36px, 5vw, 56px);
}

.post-content,
.post-aside,
.post-content .prose {
  min-width: 0;
}

.post-aside-sticky {
  top: calc(var(--header-h) + 28px);
}

.post-toc ol {
  border-left: 2px solid var(--coral);
}

.post-toc li a {
  padding: 7px 0 7px 14px;
  font-size: 13px;
}

.post-toc li a:hover {
  color: var(--coral);
}

.post-share {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.post-content .prose {
  max-width: 780px;
  font-size: 17px;
  line-height: 1.75;
}

.prose h2 {
  margin-top: 2em;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: clamp(27px, 2.6vw, 36px);
  letter-spacing: -0.04em;
}

.prose h3 {
  letter-spacing: -0.03em;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 22px 24px;
  border-left: 3px solid var(--coral);
  border-radius: 0 14px 14px 0;
  background: var(--mint);
  font-size: 19px;
}

.prose th {
  background: var(--mint);
  font-weight: 600;
}

.prose td,
.prose th {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
}

.prose img {
  border-radius: var(--rf-radius-sm);
}

.post-more {
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Contact page, about, legal, thanks
   -------------------------------------------------------------------------- */

.contact-page {
  padding-top: clamp(36px, 5vw, 60px);
  padding-bottom: clamp(56px, 7vw, 90px);
  background: transparent;
}

.contact-page .contact-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: start;
}

.contact-page .breadcrumb {
  margin-bottom: 24px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-page .breadcrumb a:hover {
  color: var(--coral);
}

.contact-page h1 {
  max-width: 14ch;
  margin: 18px 0 20px;
  font-size: clamp(38px, 4.5vw, 62px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.contact-page .eyebrow {
  color: var(--coral);
}

.contact-page .contact-grid > div > p {
  max-width: 440px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.contact-page .email {
  color: var(--teal);
  border-color: var(--line);
  font-size: 19px;
}

.contact-page .lead-form {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--rf-shadow);
}

.contact-page .next-step {
  max-width: 440px;
  border-top-color: var(--line);
}

.contact-page .next-step .eyebrow {
  color: var(--muted);
}

.reef-thanks-mark {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
}

.contact-page:has(.reef-thanks-mark) .wrap {
  text-align: center;
}

.contact-page:has(.reef-thanks-mark) .breadcrumb {
  text-align: left;
}

.contact-page:has(.reef-thanks-mark) .reef-thanks-mark {
  margin-left: auto;
  margin-right: auto;
}

.contact-page:has(.reef-thanks-mark) h1,
.contact-page:has(.reef-thanks-mark) > .wrap > p {
  margin-left: auto;
  margin-right: auto;
}

.reef-thanks-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.reef-contact-art {
  margin-top: 28px;
  max-width: 380px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--mint);
}

.reef-contact-art svg {
  width: 100%;
  height: auto;
  display: block;
}

.office-grid {
  gap: 14px;
}

.office-grid:has(> article:only-child) {
  grid-template-columns: minmax(0, 520px);
}

.office-grid article {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--rf-radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.office-map {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 18px;
  background:
    radial-gradient(circle at 76% 20%, var(--coral-soft), transparent 52%),
    var(--mint);
  border-bottom: 1px solid var(--line);
}

.office-map svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.office-grid article > h3,
.office-grid article > p {
  padding-left: 20px;
  padding-right: 20px;
}

.office-grid article > h3 {
  margin-top: 18px;
}

.office-grid article > p:last-child {
  padding-bottom: 20px;
}

.office-coord {
  color: var(--coral) !important;
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.repay {
  padding-top: clamp(32px, 4vw, 50px);
  padding-bottom: clamp(56px, 7vw, 86px);
}

.repay .center-wrapper {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 62px);
}

.repay .floating-menu {
  top: calc(var(--header-h) + 30px);
  border-left: 2px solid var(--coral);
}

.repay .floating-menu__link {
  padding: 8px 0 8px 14px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.repay .floating-menu__link:hover {
  color: var(--coral);
}

.repay__main-title {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.05em;
}

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

.repay__title {
  letter-spacing: -0.035em;
}

.repay a {
  color: var(--teal);
}

/* --------------------------------------------------------------------------
   Footer — dark slab
   -------------------------------------------------------------------------- */

footer.wrap {
  width: calc(100% - 32px);
  max-width: 1280px;
  margin: clamp(40px, 6vw, 70px) auto 22px;
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% -10%, rgba(200, 80, 47, 0.18), transparent 48%),
    var(--deep);
  color: #e9f5ef;
}

footer .logo {
  color: #f1faf5;
}

footer .logo-mark {
  width: 30px;
  height: 30px;
}

footer .logo-mark rect {
  fill: #f1faf5;
}

footer .logo-mark path:first-of-type {
  stroke: #062a2b;
}

footer .logo-mark path:last-of-type {
  stroke: var(--coral);
}

footer .logo-word {
  font-size: 23px;
}

footer .footer-top {
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #a9c4bd;
}

footer .footer-detail {
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

footer .eyebrow,
footer .footer-detail .eyebrow {
  color: var(--coral);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

footer .footer-detail a,
footer .footer-detail p,
footer .footer-office strong,
footer .footer-office a {
  color: #c4d9d2;
}

footer .footer-office strong {
  color: #f1faf5;
}

footer .footer-detail a:hover,
footer .footer-social a:hover {
  color: var(--coral);
}

footer .footer-social {
  gap: 18px;
}

footer .footer-social a {
  color: #f1faf5;
  font-size: 13px;
}

footer .footer-bottom {
  padding-top: 20px;
  color: #8fada5;
  font-size: 11px;
  letter-spacing: 0.02em;
}

footer .motion-toggle {
  color: #8fada5;
}

footer .footer-bottom a {
  color: #c4d9d2;
}

footer .footer-bottom a:hover {
  color: var(--coral);
}

footer .footer-top > span {
  color: #8fada5;
}

footer .footer-badges {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

/* --------------------------------------------------------------------------
   Diagram motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .rf-pulse {
    animation: rfPulse 3.2s ease-in-out infinite;
  }

  .rf-diagram .rf-d-pulse {
    animation: rfPulse 3.4s ease-in-out infinite;
  }

  .rf-diagram .rf-d-flow {
    stroke-dasharray: 5 9;
    animation: rfFlow 7s linear infinite;
  }

  .rf-diagram .rf-d-spin {
    transform-box: fill-box;
    transform-origin: center;
    animation: rfSpin 40s linear infinite;
  }

  .rf-art-hero .rf-float {
    animation: rfFloat 7s ease-in-out infinite;
  }

  .rf-art-hero .rf-float--slow {
    animation-duration: 10s;
    animation-delay: -2s;
  }
}

.motion-off .rf-pulse,
.motion-off .rf-d-pulse,
.motion-off .rf-d-flow,
.motion-off .rf-d-spin,
.motion-off .rf-float {
  animation: none !important;
}

@keyframes rfPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes rfFlow {
  to { stroke-dashoffset: -140; }
}

@keyframes rfSpin {
  to { transform: rotate(360deg); }
}

@keyframes rfFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .header {
    width: calc(100% - 24px);
    height: 64px;
    padding: 0 12px 0 18px;
  }

  .header .logo-mark {
    width: 27px;
    height: 27px;
  }

  .header .logo-word {
    font-size: 19px;
  }

  .header nav {
    font-size: 13px;
    gap: 0;
  }

  .header nav .nav-link,
  .header nav > a.nav-link {
    padding: 8px 9px;
  }

  .rf-hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 30px;
  }

  .rf-section-head {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 26px;
  }

  .rf-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rf-card--feature {
    grid-column: span 2;
  }

  .rf-card--wide {
    grid-column: span 2;
  }

  .rf-row {
    grid-template-columns: 58px minmax(0, 1fr) 260px 44px;
    gap: 18px;
  }

  .rf-step {
    padding-right: 18px;
  }

  .detail-section.wrap {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 30px;
  }

  .detail-hero:not(.post-hero):not(.has-art) {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  }

  .reef-hero-art,
  .detail-hero.has-art .detail-art {
    min-height: 260px;
    padding: 18px;
  }

  .rf-why {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 36px;
  }

  .post-hero {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .post-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .contact-page .contact-grid {
    gap: 34px;
  }

  footer.wrap {
    width: calc(100% - 24px);
  }
}

@media (max-width: 900px) {
  .header .header-cta {
    display: none;
  }

  .header .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .header nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 16px 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--rf-shadow);
    font-size: 16px;
  }

  .header nav.open {
    display: flex;
    flex-direction: column;
  }

  .header nav .nav-link,
  .header nav > a.nav-link {
    padding: 12px 4px;
    border-radius: 0;
  }

  .header nav .nav-link:hover,
  .header nav .nav-item:hover > .nav-link {
    background: transparent;
    color: var(--teal);
  }

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

  .rf-hero h1 {
    max-width: 16ch;
  }

  .rf-hero-visual {
    justify-self: start;
    max-width: 440px;
  }

  .rf-section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rf-section-head h2 {
    max-width: 18ch;
  }

  .rf-row {
    grid-template-columns: 42px minmax(0, 1fr) 40px;
    gap: 12px 18px;
    padding: 22px 0;
  }

  .rf-row p {
    grid-column: 2 / -1;
    margin-top: 4px;
  }

  .rf-row .rf-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .rf-feature,
  .rf-feature--flip {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .rf-feature--flip .rf-feature-art {
    order: 0;
  }

  .rf-feature-art {
    min-height: 240px;
  }

  .rf-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rf-step {
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
    margin-bottom: 0;
  }

  .rf-step:nth-child(2n) {
    border-right: 0;
  }

  .rf-step:nth-child(n+3) {
    padding-top: 26px;
  }

  .rf-industry-grid {
    grid-template-columns: 1fr;
  }

  .rf-why {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .rf-why-head {
    position: static;
  }

  .rf-insight-row {
    grid-template-columns: 120px minmax(0, 1fr) 38px;
  }

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

  .detail-hero:not(.post-hero):not(.has-art),
  .detail-hero.has-art {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .detail-hero .reef-hero-art,
  .detail-hero.has-art .detail-art {
    margin-top: 30px;
  }

  .detail-hero:not(.post-hero):not(.has-art) > *:not(.reef-hero-art),
  .detail-hero.has-art .detail-copy {
    grid-column: 1;
  }

  .detail-hero > .reef-hero-art {
    grid-column: 1;
    grid-row: auto;
  }

  .reef-hero-art,
  .detail-hero.has-art .detail-art {
    grid-column: 1;
    min-height: 0;
    max-width: 480px;
    width: 100%;
  }

  .detail-section.wrap {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .detail-section > .section-heading,
  .detail-section > .section-top {
    position: static;
    grid-column: 1;
  }

  .detail-section > *:not(.section-heading):not(.section-top) {
    grid-column: 1;
  }

  .detail-section > .section-heading > p {
    max-width: 520px;
  }

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

  .detail-steps {
    grid-template-columns: 1fr;
  }

  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-hero {
    grid-template-columns: 1fr;
  }

  .post-hero .post-meta {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    gap: 14px;
    padding-top: 0;
    margin-bottom: 14px;
  }

  .post-hero h1 {
    grid-column: 1;
    grid-row: 3;
  }

  .post-hero .post-author {
    grid-column: 1;
    grid-row: 4;
  }

  .post-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-aside {
    order: 2;
  }

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

  .repay .center-wrapper {
    grid-template-columns: 1fr;
  }

  .repay .floating-menu {
    position: static;
    border-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .repay .floating-menu__link {
    padding: 4px 0;
  }

  footer .footer-detail {
    grid-template-columns: 1fr 1fr;
  }

  footer .footer-detail > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .header {
    top: 8px;
    width: calc(100% - 16px);
    height: 58px;
    margin-top: 8px;
    padding: 0 8px 0 14px;
  }

  .header .logo-mark {
    width: 25px;
    height: 25px;
  }

  .header .logo-word {
    font-size: 18px;
  }

  .header > .theme-toggle {
    width: 34px;
    height: 34px;
    min-height: 34px;
  }

  .header .menu-toggle {
    font-size: 12px;
    padding: 8px 4px;
  }

  .rf-hero {
    padding-top: 36px;
  }

  .rf-hero h1 {
    font-size: clamp(40px, 11vw, 58px);
  }

  .rf-lede {
    font-size: 16px;
  }

  .rf-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .rf-hero-meta {
    gap: 10px 18px;
    font-size: 10px;
  }

  .rf-hero-visual {
    max-width: 100%;
  }

  .rf-badge {
    left: 4%;
    bottom: 4%;
    max-width: 200px;
    padding: 12px 14px;
  }

  .rf-ticker {
    gap: 8px 18px;
    font-size: 10px;
  }

  .rf-ticker span {
    gap: 18px;
  }

  .rf-bento {
    grid-template-columns: 1fr;
  }

  .rf-card,
  .rf-card--feature,
  .rf-card--wide {
    grid-column: span 1;
    min-height: 0;
    padding: 24px;
  }

  .rf-card--wide {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .rf-card--feature .rf-card-art {
    display: none;
  }

  .rf-steps {
    grid-template-columns: 1fr;
  }

  .rf-step {
    border-right: 0;
    padding: 22px 0 22px;
    border-bottom: 1px solid var(--line);
  }

  .rf-step:nth-child(n+3) {
    padding-top: 22px;
  }

  .rf-step-num {
    font-size: 38px;
  }

  .rf-step h3 {
    margin-top: 14px;
  }

  .rf-insight-row {
    grid-template-columns: 1fr 36px;
    gap: 6px 14px;
  }

  .rf-insight-meta {
    grid-column: 1;
  }

  .rf-insight-row h3 {
    grid-column: 1;
  }

  .rf-insight-row .rf-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .rf-contact .lead-form,
  .contact-page .lead-form {
    padding: 20px;
  }

  .post-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px 14px;
  }

  .post-card::after {
    display: none;
  }

  .detail-hero h1 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .detail-hero > p,
  .detail-copy > p {
    font-size: 16px;
  }

  .detail-cta,
  .detail-band {
    border-radius: 24px;
    margin-left: 12px;
    margin-right: 12px;
  }

  .detail-cta {
    padding: 30px 22px;
  }

  .detail-band > .wrap {
    padding-left: 22px;
    padding-right: 22px;
  }

  .benefit-list {
    grid-template-columns: 1fr;
  }

  footer.wrap {
    width: calc(100% - 16px);
    margin-top: 36px;
    margin-bottom: 12px;
    padding: 26px 22px;
    border-radius: 24px;
  }

  footer .footer-top {
    gap: 14px;
  }

  footer .footer-social {
    flex-basis: 100%;
  }

  footer .footer-detail {
    grid-template-columns: 1fr;
  }

  footer .footer-bottom {
    gap: 12px;
  }
}
