:root {
  color-scheme: dark;
  --ink: #f5f8f0;
  --muted: #aeb9ac;
  --dim: #6d776d;
  --black: #050706;
  --panel: #0b1110;
  --panel-2: #111816;
  --line: rgba(210, 255, 205, 0.16);
  --acid: #d6ff6f;
  --green: #1dd985;
  --amber: #e5ad52;
  --steel: #6f8582;
  --danger: #ff775f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 12%, rgba(29, 217, 133, 0.18), transparent 32rem),
    linear-gradient(180deg, rgba(5, 7, 6, 0.2), var(--black) 42rem);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 7, 6, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 9rem;
}

.brand-mark {
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-line {
  color: var(--acid);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.35rem);
  color: var(--muted);
  font-size: 0.9rem;
}

.nav a {
  transition: color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  background: rgba(214, 255, 111, 0.08);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  padding: 7rem clamp(1rem, 4vw, 4rem) 3rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 6, 0.98) 0%, rgba(5, 7, 6, 0.85) 38%, rgba(5, 7, 6, 0.34) 72%, rgba(5, 7, 6, 0.78) 100%),
    linear-gradient(180deg, rgba(5, 7, 6, 0.1) 0%, rgba(5, 7, 6, 0.84) 100%),
    url("/assets/rackpay-industrial-fuel-credit-hero.jpg") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(180deg, transparent, black 30%, transparent 92%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 78rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.eyebrow {
  color: var(--acid);
  font-size: clamp(0.78rem, 1vw, 0.86rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.1rem;
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 42rem;
  margin-bottom: 1.5rem;
  color: #dce4d7;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--acid);
  color: #101604;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.signal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 24, 20, 0.78), rgba(7, 10, 9, 0.86));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.signal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.signal {
  min-height: 8.5rem;
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.signal:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.signal strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1;
}

.signal span {
  color: var(--muted);
  font-size: 0.86rem;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 4rem);
}

.section-inner {
  width: min(100%, 78rem);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(18rem, 0.5fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

h2 {
  max-width: 13ch;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.02rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.feature-card {
  min-height: 22rem;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  background: linear-gradient(180deg, rgba(16, 24, 21, 0.94), rgba(7, 10, 9, 0.98));
}

.card-index {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(214, 255, 111, 0.35);
  color: var(--acid);
  font-weight: 900;
}

.feature-card h3 {
  max-width: 12rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  line-height: 1.05;
}

.feature-card p,
.feature-card li {
  color: var(--muted);
}

.feature-card ul {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.feature-card li::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--green);
  vertical-align: 0.08rem;
}

.structure {
  background: #080d0c;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.structure-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 0.6fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.phase {
  color: var(--acid);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.control-room {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(214, 255, 111, 0.09), transparent 36%),
    #0c1211;
  overflow: hidden;
}

.control-screen {
  padding: 1rem;
}

.screen-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.limit-stack {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.limit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.limit-bar {
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
}

.limit-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--acid));
}

.limit:nth-child(2) .limit-bar span {
  width: 48%;
}

.limit:nth-child(3) .limit-bar span {
  width: 72%;
}

.limit:nth-child(4) .limit-bar span {
  width: 34%;
}

.limit-fill-high {
  width: 86%;
}

.limit small {
  color: var(--muted);
  font-size: 0.8rem;
}

.planner {
  background: linear-gradient(180deg, #0b1110, #050706);
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(18rem, 0.5fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
}

.planner-panel,
.quote-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 19, 17, 0.86);
}

.planner-panel {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.field {
  margin-bottom: 1.3rem;
}

.field label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.field output {
  color: var(--ink);
  font-weight: 900;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--acid);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.segmented button {
  min-height: 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  border-color: rgba(214, 255, 111, 0.65);
  background: rgba(214, 255, 111, 0.12);
  color: var(--ink);
}

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

.checks label {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-height: 2.8rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--muted);
}

.checks input {
  accent-color: var(--acid);
}

.quote-panel {
  display: grid;
  align-content: space-between;
  padding: 1.25rem;
}

.quote-panel h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.quote-panel p {
  color: var(--muted);
}

.quote-number {
  margin: 1.5rem 0;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 0.9;
}

.quote-label {
  color: var(--acid);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fine-print {
  color: var(--dim);
  font-size: 0.82rem;
}

.cta-band {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 4rem);
  background:
    linear-gradient(90deg, rgba(5, 7, 6, 0.97), rgba(5, 7, 6, 0.7)),
    url("/assets/rackpay-industrial-fuel-credit-hero.jpg") center 65% / cover no-repeat;
}

.cta-band .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(16rem, 0.5fr);
  gap: 2rem;
  align-items: end;
}

.cta-band h2 {
  max-width: 11ch;
}

.cta-copy {
  color: #dce4d7;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 4rem);
  color: var(--dim);
  font-size: 0.86rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 6rem 1rem 2rem;
  background:
    linear-gradient(90deg, rgba(5, 7, 6, 0.98), rgba(5, 7, 6, 0.72)),
    url("/assets/rackpay-industrial-fuel-credit-hero.jpg") center / cover no-repeat;
}

.portal-card {
  width: min(100%, 28rem);
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 13, 12, 0.92);
  box-shadow: var(--shadow);
}

.portal-card h1 {
  max-width: none;
  margin-bottom: 0.5rem;
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 0.92;
}

.portal-card p {
  color: var(--muted);
}

.portal-form {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0;
}

.portal-form input {
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.portal-form input:disabled,
.portal-form button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.portal-status {
  color: var(--acid);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 900px) {
  .nav a:not(.portal-link) {
    display: none;
  }

  .hero {
    align-items: end;
  }

  .hero-inner,
  .section-heading,
  .structure-grid,
  .planner-grid,
  .cta-band .section-inner {
    grid-template-columns: 1fr;
  }

  .signal-panel {
    max-width: 35rem;
  }

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

  .feature-card {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 0.8rem 1rem;
  }

  .brand-line {
    max-width: 9rem;
    line-height: 1.2;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5rem);
  }

  .hero {
    min-height: 90svh;
    padding-top: 6.5rem;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(5, 7, 6, 0.88) 0%, rgba(5, 7, 6, 0.76) 38%, rgba(5, 7, 6, 0.96) 100%),
      url("/assets/rackpay-industrial-fuel-credit-hero.jpg") 64% center / cover no-repeat;
  }

  .signal-grid,
  .checks,
  .segmented {
    grid-template-columns: 1fr;
  }

  .signal,
  .signal:nth-child(2n),
  .signal:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal:last-child {
    border-bottom: 0;
  }

  .hero .signal-panel {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}
