/* Runlevel Systems base stylesheet */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --core-black:    #000000;
  --core-graphite: #08111f;
  --core-cobalt:   #0a84ff;
  --core-cyan:     #36f3ff;
  --core-gold:     #ffc600;
  --core-menu-text:#0a84ff;
  --core-bg:       #07111f;
  --core-text:     #eaf3ff;
  --core-muted:    #9fb3c9;
  --core-card:     #0c1729;
}

/* ============================================================
   Reset / Box-Sizing
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Base
   ============================================================ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: linear-gradient(180deg, #07111f 0%, #0a1426 100%);
  color: var(--core-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: #f4f9ff;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

/* ============================================================
   Links
   ============================================================ */
a {
  color: var(--core-cyan);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--core-gold);
  text-decoration: underline;
}

/* ============================================================
   Buttons
   ============================================================ */
button,
.btn,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: var(--core-gold);
  color: #08111f;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  background-color: var(--core-cyan);
  color: #08111f;
}

/* ============================================================
   Forms
   ============================================================ */
label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

input,
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--core-muted);
  border-radius: 4px;
  background-color: var(--core-card);
  color: var(--core-text);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--core-cobalt);
  outline-offset: 1px;
  border-color: var(--core-cobalt);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================================
   Layout Containers
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 992px) {
  .container {
    width: 70%;
    max-width: 70%;
  }
}

.container-fluid {
  width: 100%;
  padding-inline: 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================================
   Images
   ============================================================ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   Utility
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background-color: var(--core-card);
  border: 1px solid rgba(54, 243, 255, 0.15);
  border-radius: 8px;
  padding: 1.5rem;
}

/* ============================================================
   Core Header / Navigation
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.main-header {
  background: #000000;
  border-bottom: 1px solid rgba(54, 243, 255, 0.28);
  position: relative;
  z-index: 1000;
}

.core-navbar {
  margin: 0;
  min-height: 68px;
  padding: 0;
}

.core-nav-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.core-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--core-menu-text);
  min-height: 44px;
}

.core-brand-logo {
  display: block;
  width: auto;
  max-width: 260px;
  max-height: 54px;
  object-fit: contain;
}

@media (min-width: 769px) {
  .core-brand {
    flex: 0 1 280px;
    max-width: 280px;
  }

  .core-brand-logo {
    width: auto;
    max-width: 100%;
    max-height: 54px;
  }
}

.core-nav-toggle {
  margin-left: auto;
  display: none;
  border: 1px solid rgba(54, 243, 255, 0.45);
  border-radius: 6px;
  background: rgba(10, 132, 255, 0.15);
  padding: 0.45rem 0.55rem;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
}

.core-nav-toggle .icon-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background: var(--core-cyan);
}

.core-nav-collapse {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.core-nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
}

.core-nav-links a {
  color: var(--core-menu-text);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
}

.core-nav-links a:hover,
.core-nav-links a:focus {
  color: var(--core-gold);
  background: rgba(54, 243, 255, 0.1);
  text-decoration: none;
}

.core-nav-links a[aria-current="page"] {
  color: var(--core-gold);
}

.core-nav-has-submenu {
  position: relative;
}

.core-nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1100;
  min-width: 250px;
  list-style: none;
  margin: 0;
  padding: 0.45rem;
  display: none;
  background: #03070d;
  border: 1px solid rgba(54, 243, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.core-nav-has-submenu:hover .core-nav-submenu,
.core-nav-has-submenu:focus-within .core-nav-submenu {
  display: grid;
  gap: 0.12rem;
}

.core-nav-submenu a {
  width: 100%;
  justify-content: flex-start;
  min-height: 38px;
  padding: 0.48rem 0.65rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .core-navbar {
    min-height: 62px;
    padding: 0;
  }

  .core-nav-inner {
    min-height: 62px;
  }

  .core-brand-logo {
    max-width: min(220px, 68vw);
    max-height: 48px;
  }

  .core-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .core-nav-collapse {
    width: 100%;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    margin-left: 0;
    background: #03070d;
    border: 1px solid rgba(54, 243, 255, 0.25);
    border-radius: 8px;
    padding: 0.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .core-nav-collapse {
    display: none;
  }

  .core-nav-collapse.is-open {
    display: flex;
  }

  .core-nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    width: 100%;
  }

  .core-nav-links a {
    width: 100%;
    padding: 0.65rem 0.75rem;
  }

  .core-nav-has-submenu {
    width: 100%;
  }

  .core-nav-submenu {
    position: static;
    display: grid;
    min-width: 0;
    width: 100%;
    margin: 0.15rem 0 0.25rem;
    padding: 0.25rem 0 0.25rem 0.75rem;
    border: 0;
    border-left: 1px solid rgba(54, 243, 255, 0.24);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .core-nav-submenu a {
    min-height: 36px;
    padding: 0.42rem 0.65rem;
  }
}

/* ============================================================
   Footer base
   ============================================================ */
footer {
  background-color: #050a14;
  color: #9ca9b8;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer a {
  color: #a8b8cc;
  text-decoration: none;
}

footer a:hover,
footer a:focus {
  color: var(--core-gold);
  text-decoration: underline;
}

/* ============================================================
   Highlight Text: Gold on Blue Surfaces
   ============================================================ */
body *[style*="color: #00a8ff"],
body *[style*="color:#00a8ff"],
body *[style*="color: #00d4ff"],
body *[style*="color:#00d4ff"],
body *[style*="color: #36f3ff"],
body *[style*="color:#36f3ff"],
body *[style*="color: #4cc9ff"],
body *[style*="color:#4cc9ff"] {
  color: var(--core-gold) !important;
}

/* ============================================================
   Responsive helpers
   ============================================================ */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .row {
    flex-direction: column;
  }
}

/* ============================================================
   Service Site Layout
   ============================================================ */
.service-site {
  background: linear-gradient(180deg, #07111f 0%, #0a1426 55%, #0d1930 100%);
}

.service-hero {
  padding: 5rem 0 4rem;
  background:
    linear-gradient(120deg, rgba(7, 17, 31, 0.93), rgba(10, 132, 255, 0.58)),
    url('/assets/images/RL-splash.png') center/cover no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.service-hero.home-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.98) 0%, rgba(7, 17, 31, 0.9) 42%, rgba(7, 17, 31, 0.58) 70%, rgba(7, 17, 31, 0.3) 100%),
    url('/assets/images/RL-logo.png') right center/auto 100% no-repeat;
}

.home-hero h1,
.home-hero .service-lead {
  max-width: 820px;
}

.service-hero.compact {
  padding: 4rem 0 3rem;
}

.service-kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--core-gold);
  margin-bottom: 0.7rem;
}

.service-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 0.7rem;
}

.service-lead {
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  color: #e9f5ff;
  margin-bottom: 1rem;
}

.service-sublead {
  max-width: 920px;
  color: #d0e5fb;
}

.service-section {
  padding: 1.95rem 0;
}

.service-section + .service-section {
  border-top: 1px solid rgba(54, 243, 255, 0.08);
}

.service-section.alt {
  background: rgba(12, 23, 41, 0.72);
  border-top: 1px solid rgba(54, 243, 255, 0.08);
  border-bottom: 1px solid rgba(54, 243, 255, 0.08);
}

.service-section h2 {
  margin-bottom: 0.7rem;
}

.section-intro {
  max-width: 900px;
  color: #bfd4ec;
  margin-bottom: 0.6rem;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.95rem;
}

.core-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 0.72rem 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.core-action.primary {
  background: var(--core-gold);
  color: #07111f;
  border-color: var(--core-gold);
}

.core-action.primary:hover,
.core-action.primary:focus {
  background: var(--core-cyan);
  border-color: var(--core-cyan);
  color: #07111f;
  text-decoration: none;
}

.core-action.secondary,
.core-action.tertiary {
  border-color: rgba(54, 243, 255, 0.4);
  background: rgba(9, 20, 38, 0.7);
  color: #def8ff;
}

.core-action.secondary:hover,
.core-action.secondary:focus,
.core-action.tertiary:hover,
.core-action.tertiary:focus {
  border-color: var(--core-gold);
  color: var(--core-gold);
  text-decoration: none;
}

.service-card-grid,
.benefit-grid,
.three-column-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.service-card-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card-item,
.benefit-item,
.service-detail-card {
  background: linear-gradient(180deg, #0c1729, #0a1423);
  border: 1px solid rgba(54, 243, 255, 0.2);
  border-radius: 12px;
  padding: 0.72rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.service-card-item h3,
.benefit-item h3,
.service-detail-card h2 {
  color: #f3fbff;
  margin-bottom: 0.45rem;
}

.service-card-item p,
.benefit-item p,
.service-detail-card li {
  color: #c3d7ee;
}

.service-card-item p,
.benefit-item p,
.service-detail-card p {
  margin-bottom: 0.55rem;
}

.service-card-item p:last-child,
.benefit-item p:last-child,
.service-detail-card p:last-child {
  margin-bottom: 0;
}

.service-card-item h3 {
  line-height: 1.3;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  background: rgba(10, 132, 255, 0.24);
}

.service-detail-card ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.service-detail-card li {
  margin-bottom: 0.22rem;
}

.cta-block {
  background: linear-gradient(125deg, #08111f, #0a84ff);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1.35rem;
}

.cta-block p {
  max-width: 820px;
  color: #d6ebff;
}

.service-icon-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.65rem;
}

.service-icon-list.single-column {
  grid-template-columns: 1fr;
}

.service-icon-list li {
  color: #d8eafe;
  position: relative;
  padding-left: 1.2rem;
  margin: 0;
  line-height: 1.38;
}

.service-icon-list li::before {
  content: "•";
  color: var(--core-gold);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

/* ============================================================
   Runlevel Assistant
   ============================================================ */
.runlevel-assistant-bar {
  background: linear-gradient(90deg, rgba(3, 7, 13, 0.98), rgba(8, 17, 31, 0.96));
  border-bottom: 1px solid rgba(54, 243, 255, 0.2);
  padding: 0.55rem 0;
}

.runlevel-assistant {
  position: relative;
  display: grid;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(12, 23, 41, 0.96), rgba(9, 28, 52, 0.94));
  border: 1px solid rgba(54, 243, 255, 0.22);
  border-radius: 12px;
  padding: 0.8rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.runlevel-assistant-compact {
  grid-template-columns: minmax(150px, 0.35fr) minmax(260px, 1fr);
  align-items: center;
}

.assistant-home-section {
  padding-top: 1.25rem;
}

.runlevel-assistant-hero {
  padding: 1.25rem;
  border-color: rgba(255, 198, 0, 0.32);
  background:
    radial-gradient(circle at top right, rgba(54, 243, 255, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(8, 17, 31, 0.98), rgba(10, 45, 82, 0.92));
}

.assistant-copy h2,
.assistant-copy p {
  margin-bottom: 0.25rem;
}

.assistant-label {
  color: var(--core-gold) !important;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.assistant-copy h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
}

.assistant-copy p:not(.assistant-label) {
  color: #cfe3f8;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.assistant-form input {
  min-height: 46px;
  border-color: rgba(54, 243, 255, 0.34);
  background: rgba(3, 7, 13, 0.82);
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.assistant-actions .core-action {
  min-height: 46px;
  white-space: nowrap;
}

.assistant-preview-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 198, 0, 0.28);
  border-radius: 10px;
  background: rgba(3, 7, 13, 0.72);
  padding: 0.85rem;
}

.assistant-preview-panel.is-open {
  display: grid;
  gap: 0.75rem;
}

.assistant-preview-panel h3 {
  margin-bottom: 0.25rem;
}

.assistant-preview-panel p {
  color: #cfe3f8;
}

.assistant-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.assistant-chip-row button,
.assistant-close {
  min-height: 36px;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(54, 243, 255, 0.26);
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.88);
  color: #e4f3ff;
  font-size: 0.9rem;
}

.assistant-chip-row button:hover,
.assistant-chip-row button:focus,
.assistant-close:hover,
.assistant-close:focus {
  border-color: var(--core-gold);
  color: var(--core-gold);
  background: rgba(8, 17, 31, 0.96);
}

.assistant-close {
  justify-self: start;
  border-radius: 7px;
}

/* ============================================================
   Hero Tagline Branding
   ============================================================ */
.hero-tagline {
  display: inline-block;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--core-gold);
  margin: 1rem 0 0;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 198, 0, 0.35);
  border-radius: 6px;
  background: rgba(255, 198, 0, 0.07);
}

/* ============================================================
   Service Card Subtitle
   ============================================================ */
.service-card-subtitle {
  color: var(--core-gold);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-card-item .project-image {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(54, 243, 255, 0.28);
  min-height: 130px;
  object-fit: cover;
  margin-bottom: 0.85rem;
  background: rgba(8, 17, 31, 0.75);
}

.solution-brand-mark {
  width: 108px;
  height: 108px;
  display: block;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(54, 243, 255, 0.28);
  background: rgba(8, 17, 31, 0.66);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.product-hero .container {
  display: grid;
  justify-items: start;
}

.product-brand-mark {
  width: clamp(136px, 18vw, 190px);
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 0 1.15rem;
  border-radius: 24px;
  border: 1px solid rgba(54, 243, 255, 0.28);
  background: rgba(8, 17, 31, 0.66);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}

.product-card-logo {
  width: 132px;
  height: 132px;
  object-fit: contain;
  margin: 0 0 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(54, 243, 255, 0.24);
  background: rgba(8, 17, 31, 0.66);
}

.solution-portfolio {
  margin-top: 1rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.portfolio-card {
  min-height: 100%;
}

.portfolio-card .portfolio-label {
  display: inline-block;
  margin: 0 0 0.45rem;
  color: var(--core-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-card .service-actions {
  margin-top: 0.75rem;
}

.gateway-figure {
  margin: 1rem auto 0;
  max-width: 1180px;
}

.gateway-figure-link {
  display: block;
}

.gateway-figure-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(54, 243, 255, 0.24);
  background: rgba(8, 17, 31, 0.75);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.gateway-figure-caption {
  margin-top: 0.6rem;
  color: #bfd4ec;
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 980px;
}

.gateway-table-wrap {
  overflow-x: auto;
  margin-top: 0.85rem;
}

.gateway-comparison-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  border: 1px solid rgba(54, 243, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #0c1729, #0a1423);
}

.gateway-comparison-table th,
.gateway-comparison-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(54, 243, 255, 0.1);
}

.gateway-comparison-table th {
  color: #f3fbff;
  background: rgba(10, 132, 255, 0.1);
  font-weight: 700;
}

.gateway-comparison-table tbody tr:last-child th,
.gateway-comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.factory-hero-note {
  max-width: 820px;
  margin: 1rem 0 0;
  padding: 0.78rem 0.9rem;
  border-left: 3px solid var(--core-gold);
  background: rgba(255, 198, 0, 0.08);
  color: #f7e6a5;
  font-weight: 700;
}

.factory-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.factory-flow span {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(54, 243, 255, 0.22);
  border-radius: 10px;
  background: rgba(8, 17, 31, 0.78);
  color: #e5f4ff;
  font-weight: 750;
  text-align: center;
}

.factory-flow span:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -0.48rem;
  top: 50%;
  z-index: 1;
  color: var(--core-gold);
  transform: translateY(-50%);
  font-weight: 900;
}

.factory-problem-grid,
.factory-example-grid,
.factory-inspiration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.factory-problem-grid .service-card-item {
  border-color: rgba(255, 198, 0, 0.24);
}

.factory-problem-grid .service-card-item p {
  color: #e5f4ff;
  font-weight: 650;
}

.factory-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.factory-highlight-card {
  border-color: rgba(255, 198, 0, 0.42);
  background: linear-gradient(180deg, rgba(12, 23, 41, 0.98), rgba(11, 30, 53, 0.96));
}

.factory-idea-panel,
.factory-inspiration-block {
  background: linear-gradient(180deg, #0c1729, #0a1423);
  border: 1px solid rgba(54, 243, 255, 0.2);
  border-radius: 12px;
  padding: 0.95rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  margin-top: 1rem;
}

.factory-feature-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  margin-bottom: 0.45rem;
  padding: 0.48rem 0.6rem;
  border: 1px solid rgba(54, 243, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 17, 31, 0.78);
  color: #d8eafe;
  line-height: 1.35;
}

.factory-feature-pill::before {
  content: "+";
  color: var(--core-gold);
  font-weight: 800;
  line-height: 1;
}

.factory-textarea-preview {
  min-height: 132px;
  padding: 0.8rem;
  border: 1px solid rgba(54, 243, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 17, 31, 0.75);
  color: #bfd4ec;
  line-height: 1.55;
}

.factory-textarea-preview.large {
  min-height: 150px;
  color: #e4f3ff;
  font-size: 1.02rem;
}

.factory-idea-panel p {
  color: #c3d7ee;
  margin-top: 0.75rem;
}

.factory-mini-label {
  display: inline-block;
  margin: 0 0 0.45rem;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(255, 198, 0, 0.34);
  border-radius: 999px;
  background: rgba(255, 198, 0, 0.08);
  color: var(--core-gold) !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.factory-example-card .service-icon-list {
  grid-template-columns: 1fr;
  margin-top: 0.7rem;
}

@media (max-width: 992px) {
  .service-card-grid,
  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-problem-grid,
  .factory-inspiration-grid,
  .factory-example-grid,
  .portfolio-grid,
  .factory-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-flow span:not(:last-child)::after {
    display: none;
  }

  .three-column-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Reduce section and hero padding by ~25% on mobile */
  .service-hero,
  .service-section {
    padding: 1.3rem 0;
  }

  .service-hero.home-hero {
    min-height: 500px;
    background:
      linear-gradient(180deg, rgba(7, 17, 31, 0.95) 0%, rgba(7, 17, 31, 0.9) 58%, rgba(7, 17, 31, 0.74) 100%),
      url('/assets/images/RL-logo.png') center 18%/auto 72% no-repeat;
  }

  .service-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .service-lead {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
  }

  .service-sublead {
    font-size: 0.97rem;
    line-height: 1.55;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  .service-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .core-action {
    text-align: center;
    justify-content: center;
  }

  .product-hero .container {
    justify-items: center;
    text-align: center;
  }

  .product-card-logo {
    margin-inline: auto;
  }

  .runlevel-assistant-compact,
  .assistant-form {
    grid-template-columns: 1fr;
  }

  .runlevel-assistant-bar {
    padding: 0.5rem 0;
  }

  .runlevel-assistant {
    padding: 0.7rem;
  }

  .assistant-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .service-card-grid,
  .service-card-grid.two-columns,
  .benefit-grid,
  .portfolio-grid,
  .service-icon-list,
  .factory-problem-grid,
  .factory-comparison-grid,
  .factory-inspiration-grid,
  .factory-example-grid,
  .factory-flow {
    grid-template-columns: 1fr;
  }

  .factory-idea-panel,
  .factory-inspiration-block {
    padding: 0.75rem;
  }

  .factory-feature-pill {
    min-height: 38px;
    margin-bottom: 0.35rem;
  }

  /* Ensure cards look card-like on mobile */
  .service-card-item,
  .benefit-item {
    padding: 0.75rem;
    border-radius: 10px;
  }

  .cta-block {
    padding: 1.05rem;
  }

  /* Compact list spacing on mobile */
  .service-icon-list li {
    line-height: 1.5;
  }

  p {
    margin-bottom: 0.75rem;
  }
}

/* ============================================================
   Featured project spotlight section
   ============================================================ */
.featured-project-section {
  background: linear-gradient(135deg, #07111f 0%, #0a1e3a 50%, #071928 100%);
  border-top: 2px solid rgba(255, 198, 0, 0.35);
  border-bottom: 2px solid rgba(255, 198, 0, 0.35);
  padding: 2.5rem 0;
}

.featured-project-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.featured-project-badge {
  background: linear-gradient(165deg, rgba(10, 20, 38, 0.95), rgba(9, 24, 46, 0.92));
  border: 1px solid rgba(255, 198, 0, 0.35);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  position: sticky;
  top: 1rem;
}

.featured-icon {
  width: 72px;
  height: 72px;
  font-size: 2.2rem;
  margin: 0 auto 1rem;
}

.featured-badge-label {
  font-weight: 700;
  color: #f3fbff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.featured-badge-sub {
  color: #bfd4ec;
  font-size: 0.9rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .featured-project-inner {
    grid-template-columns: 1fr;
  }

  .featured-project-badge {
    position: static;
    order: -1;
  }
}


/* ============================================================
   Sitemap footer, project pages, and request flow
   ============================================================ */
.sitemap-footer {
  background: #050a14;
  color: #9ca9b8;
  padding: 0 0 1.8rem;
  border-top: 1px solid rgba(156, 169, 184, 0.18);
}

.site-footer {
  text-align: center;
}

.site-footer ul,
.site-footer li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: #a8b8cc;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--core-gold);
  text-decoration: underline;
}

.site-footer .footer-links,
.site-footer nav,
.site-footer .footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.sitemap-footer .footer-widget-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 0.2rem;
}

.sitemap-footer .footer-top-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(156, 169, 184, 0), rgba(156, 169, 184, 0.35), rgba(156, 169, 184, 0));
  margin: 0 0 1.8rem;
}

.footer-sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.3rem;
}

.sitemap-footer .footer-col h4 {
  color: #d6dce6;
  font-size: 0.95rem;
  margin: 0 0 0.65rem;
  text-align: center;
  letter-spacing: 0.04em;
}

.sitemap-footer .footer-brand {
  padding-right: 0;
  text-align: center;
}

.sitemap-footer .footer-eyebrow {
  margin: 0 0 0.5rem;
  color: #9ca9b8;
  font-size: 0.88rem;
  font-weight: 700;
}

.sitemap-footer .footer-description {
  margin: 0;
  color: #a8bedc;
  font-size: 0.84rem;
  line-height: 1.55;
}

.sitemap-footer .footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.sitemap-footer .footer-list li {
  margin: 0;
  text-align: center;
}

.sitemap-footer .footer-list a {
  color: #a8b8cc;
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.sitemap-footer .footer-list a:hover,
.sitemap-footer .footer-list a:focus {
  color: var(--core-gold);
  text-decoration: underline;
}

.footer-signoff {
  background: #050a14;
  color: #c7d7e8;
  padding: 0.95rem 0 1.25rem;
  border-top: 1px solid rgba(156, 169, 184, 0.16);
}

.footer-signoff p {
  margin: 0;
  font-size: 0.92rem;
}

.project-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.request-shell {
  display: grid;
  gap: 1rem;
}

.request-section-card {
  background: linear-gradient(180deg, #0c1729, #0a1423);
  border: 1px solid rgba(54, 243, 255, 0.2);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.request-section-card h2,
.request-section-card h3 {
  margin-top: 0;
}

.request-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.request-field-full {
  grid-column: 1 / -1;
}

.request-field label {
  display: block;
  margin-bottom: 0.35rem;
  color: #bfd4ec;
  font-size: 0.9rem;
}

.request-field input,
.request-field select,
.request-field textarea {
  width: 100%;
  background: #09111d;
  color: #eef6ff;
  border: 1px solid rgba(54, 243, 255, 0.24);
  border-radius: 8px;
  padding: 0.75rem 0.8rem;
}

.request-field textarea {
  min-height: 140px;
  resize: vertical;
}

.request-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: #d8eafe;
}

.request-check input {
  margin-top: 0.2rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.checkbox-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  appearance: auto;
}

.checkbox-row label,
.checkbox-row span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.request-note,
.request-helper {
  color: #bfd4ec;
}

/* ============================================================
   Stacked checkbox layout — for agreement/signoff text
   ============================================================ */
.check-block {
  display: block;
  margin-bottom: 0.75rem;
}

.check-block input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin: 0 0 0.5rem 0;
  vertical-align: top;
}

.check-block label {
  display: block;
  line-height: 1.45;
  color: #d8eafe;
  font-size: 0.88rem;
}

.notice-card,
.error-card {
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.notice-card {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.error-card {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #fecaca;
}

.request-id {
  display: inline-block;
  margin: 0.6rem 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 198, 0, 0.4);
  background: rgba(255, 198, 0, 0.08);
  color: var(--core-gold);
  font-weight: 700;
  font-family: monospace;
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.cost-card-price {
  color: var(--core-gold);
  font-weight: 700;
  margin-bottom: 0.45rem;
}

@media (max-width: 1100px) {
  .sitemap-footer .footer-brand {
    padding-right: 0;
  }

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

@media (max-width: 768px) {
  .footer-sitemap-grid,
  .project-page-grid,
  .request-form-grid,
  .cost-grid {
    grid-template-columns: 1fr;
  }

  .sitemap-footer .footer-brand {
    grid-column: span 1;
    text-align: center;
  }

  .sitemap-footer .footer-col h4 {
    text-align: center;
  }

  .sitemap-footer .footer-list li,
  .sitemap-footer .footer-list a {
    text-align: center;
  }
}
