:root {
  --ink: #161719;
  --graphite: #25282b;
  --panel: #ffffff;
  --paper: #f7f4ef;
  --paper-deep: #eee7dc;
  --muted: #666f72;
  --line: #ded6ca;
  --rs-red: #D40808;
  --red: var(--rs-red);
  --red-dark: #9f0606;
  --teal: #1c7874;
  --amber: #c4812c;
  --green: #49745d;
  --shadow: 0 24px 70px rgba(22, 23, 25, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px clamp(18px, 5vw, 72px);
  color: #fff;
  background: rgba(5, 6, 7, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  min-width: 0;
}

.brand-logo-frame {
  display: block;
  width: clamp(132px, 15vw, 190px);
  height: 52px;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  align-items: center;
  gap: 8px;
}

.site-nav a {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.language-option {
  min-width: 34px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible,
.language-option.is-active {
  color: #fff;
  background: var(--rs-red);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
}

.hero {
  position: relative;
  min-height: 86svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/redsmart-operations-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(14, 15, 16, 0.72) 0%, rgba(14, 15, 16, 0.22) 42%, rgba(14, 15, 16, 0.86) 100%),
    linear-gradient(90deg, rgba(126, 24, 33, 0.74) 0%, rgba(22, 23, 25, 0.22) 48%, rgba(28, 120, 116, 0.34) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: 150px 0 74px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffc8bf;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 6.85rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 690px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
}

.hero-actions,
.contact-panel,
.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: var(--red);
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}

.fact {
  min-height: 132px;
  padding: 28px clamp(18px, 4vw, 44px);
  border-right: 1px solid var(--line);
}

.fact:last-child {
  border-right: 0;
}

.fact span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact strong {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1;
}

.section,
.process-band {
  padding: clamp(70px, 9vw, 118px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 36px;
}

.section-heading.compact {
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 5vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

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

.service-grid,
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card,
.app-card {
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(22, 23, 25, 0.04);
}

.service-card {
  display: flex;
  flex-direction: column;
}

.icon {
  display: inline-grid;
  width: 52px;
  height: 40px;
  place-items: center;
  margin-bottom: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--graphite);
  font-size: 0.72rem;
  font-weight: 900;
}

.service-card:nth-child(2) .icon {
  background: var(--teal);
}

.service-card:nth-child(3) .icon {
  background: var(--red);
}

.service-card:nth-child(4) .icon {
  background: var(--amber);
}

h3 {
  margin-bottom: 12px;
  font-size: 1.26rem;
  line-height: 1.12;
}

.service-card p,
.app-card p,
.timeline p,
.contact-panel p {
  color: var(--muted);
}

.split-section {
  background: #fffaf4;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.app-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.status {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.active .status {
  color: #fff;
  background: var(--green);
}

.planned .status {
  color: #fff;
  background: var(--amber);
}

.process-band {
  background: var(--graphite);
  color: #fff;
}

.process-band .eyebrow {
  color: #f0b0a9;
}

.process-band .section-heading p {
  color: rgba(255, 255, 255, 0.7);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.timeline li {
  min-height: 260px;
  padding: 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.timeline li:last-child {
  border-right: 0;
}

.timeline span {
  display: block;
  margin-bottom: 72px;
  color: #f0b0a9;
  font-weight: 900;
}

.timeline strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.18rem;
}

.timeline p {
  color: rgba(255, 255, 255, 0.68);
}

.contact-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 7vw, 92px);
  align-items: center;
}

.contact-panel {
  align-items: flex-start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.contact-panel p {
  width: 100%;
  margin-bottom: 12px;
  font-size: 1.02rem;
}

.contact-methods {
  width: 100%;
}

.email-link {
  flex: 1 1 240px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.email-link span,
.email-link strong {
  display: block;
}

.email-link span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.email-link strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.74);
  background: var(--ink);
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

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

  .intro-band {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .fact:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .timeline li:nth-child(2) {
    border-right: 0;
  }

  .timeline li:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

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

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
    padding: 12px 16px;
  }

  .brand-logo-frame {
    width: 138px;
    height: 42px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(22, 23, 25, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .language-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .language-option {
    flex: 1;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-content {
    width: min(100% - 32px, 860px);
    padding-bottom: 48px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .service-grid,
  .portfolio-grid,
  .timeline,
  .intro-band {
    grid-template-columns: 1fr;
  }

  .fact,
  .timeline li {
    border-right: 0;
  }

  .fact {
    min-height: 108px;
    border-bottom: 1px solid var(--line);
  }

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

  .timeline li {
    min-height: 210px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

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

  .timeline span {
    margin-bottom: 38px;
  }

  .site-footer {
    flex-direction: column;
  }
}
