:root {
  color-scheme: light;
  --ink: #16201c;
  --muted: #59645f;
  --line: #d8ddd7;
  --surface: #f7f8f5;
  --panel: #ffffff;
  --mint: #d8f1dc;
  --green: #20735b;
  --blue: #245b9b;
  --red: #b84d47;
  --yellow: #f3c54b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding-block: 16px;
  padding-inline-start: clamp(20px, 5vw, 72px);
  padding-inline-end: 8px;
  background: rgba(247, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.header-controls,
.hero-actions,
.button-row,
.footer-brand {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
}

.header-controls {
  justify-content: flex-end;
  gap: 12px;
}

.primary-action,
.secondary-action,
.app-menu summary {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 700;
}

.primary-action,
.app-menu summary {
  color: #ffffff;
  background: var(--ink);
}

.secondary-action {
  background: #ffffff;
}

.app-menu {
  position: relative;
}

.app-menu summary {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  cursor: pointer;
  list-style: none;
}

.app-menu summary::-webkit-details-marker {
  display: none;
}

.hamburger-icon {
  display: grid;
  gap: 5px;
  width: 20px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 40px));
  padding: 12px;
  background: #101816;
  border: 1px solid rgba(216, 221, 215, 0.26);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(22, 32, 28, 0.28);
}

.menu-panel section + section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(216, 221, 215, 0.18);
}

.menu-panel h2 {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.2;
}

.menu-item {
  display: grid;
  min-height: 54px;
  align-items: center;
  margin-top: 8px;
  padding: 12px 14px;
  color: #dce7e2;
  background: #1c2a26;
  border: 1px solid rgba(216, 221, 215, 0.14);
  border-radius: 8px;
  font-weight: 800;
}

.menu-item.strong {
  color: var(--ink);
  background: #79d7df;
}

.language-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.language-options button {
  min-height: 48px;
  padding: 10px 12px;
  color: #dce7e2;
  background: #1c2a26;
  border: 1px solid rgba(216, 221, 215, 0.14);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.language-options button[aria-pressed="true"] {
  color: var(--ink);
  background: #79d7df;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vw, 92px) clamp(20px, 5vw, 72px) clamp(36px, 6vw, 64px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.22)),
    url("./assets/hero-dispatch.png");
  background-size: cover;
  background-position: center;
}

.hero-copy {
  min-width: 0;
  max-width: 660px;
}

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

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(3.2rem, 5.8vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-subtitle {
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 3vw, 2.7rem);
  font-weight: 800;
}

.hero-text {
  max-width: 600px;
  color: #2c3833;
  font-size: 1.12rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 20px);
  align-items: center;
  min-width: 0;
}

.phone-screen {
  width: 100%;
  min-width: 0;
  padding: 18px;
  background: #101816;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 22px 80px rgba(22, 32, 28, 0.28);
}

.owner-screen {
  transform: translateY(-24px);
}

.technician-screen {
  transform: translateY(24px);
}

.phone-top,
.inbox-row,
.route-stop {
  border-radius: 8px;
}

.phone-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 14px;
  color: #ffffff;
  background: #1c2a26;
}

.inbox-row,
.route-stop {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 14px;
  background: #f7f8f5;
}

.inbox-row strong,
.route-stop strong {
  color: var(--ink);
}

.inbox-row small,
.route-stop small {
  color: var(--muted);
}

.inbox-row.active {
  border-left: 5px solid var(--yellow);
}

.route-stop.current {
  border-left: 5px solid var(--green);
}

.button-row {
  gap: 8px;
  flex-wrap: wrap;
}

.button-row span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 10px;
  color: #ffffff;
  background: var(--green);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (min-width: 1181px) and (max-width: 1400px) {
  .hero .button-row {
    gap: 5px;
  }

  .hero .button-row span {
    padding: 6px;
    font-size: 0.72rem;
  }
}

.workflow-section,
.screens-section,
.ops-section {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

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

.workflow-grid article,
figure {
  margin: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.step-number {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--blue);
  font-weight: 900;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.workflow-grid p,
.section-heading p,
figcaption,
.ops-list {
  color: var(--muted);
}

.screens-showcase {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(300px, 0.8fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
}

.screen-carousel {
  display: grid;
  grid-template-columns: 52px minmax(0, 680px) 52px;
  gap: 16px;
  align-items: center;
}

@media (min-width: 901px) {
  .screen-carousel {
    grid-template-columns: 52px minmax(0, 434px) 52px;
    justify-content: center;
  }
}

.screen-carousel-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.screen-gallery {
  display: flex;
  transition: transform 220ms ease;
}

.screen-gallery figure {
  flex: 0 0 100%;
  min-width: 100%;
  border: 0;
}

.carousel-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.mobile-screen-image {
  display: block;
  width: 100%;
  max-width: 390px;
  height: auto;
  margin-bottom: 14px;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(22, 32, 28, 0.16);
}

.screen-context {
  min-height: 430px;
  padding: clamp(24px, 4vw, 42px);
  color: #dce7e2;
  background: #101816;
  border: 1px solid rgba(216, 221, 215, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(22, 32, 28, 0.16);
}

.screen-context article {
  display: none;
}

.screen-context article.is-active {
  display: grid;
  gap: 16px;
}

.screen-context h3 {
  max-width: 520px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.65rem, 2.5vw, 2.45rem);
  line-height: 1.05;
}

.screen-context p,
.screen-context li {
  color: #b8c9c2;
  font-size: 1.02rem;
}

.screen-context ul {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.screen-context li {
  position: relative;
  padding-left: 24px;
}

.screen-context li::before {
  position: absolute;
  left: 0;
  color: #79d7df;
  content: "✓";
  font-weight: 900;
}

.context-action {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  margin-top: 8px;
  padding: 10px 14px;
  color: var(--ink);
  background: #79d7df;
  border-radius: 8px;
  font-weight: 800;
}

.ops-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: start;
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ops-list {
  margin: 0;
  padding-left: 20px;
  font-size: 1.08rem;
}

.ops-list li + li {
  margin-top: 14px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(140px, 0.6fr));
  align-items: start;
  gap: 16px;
  padding: 36px clamp(20px, 5vw, 72px);
  background: #ffffff;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  gap: 16px;
  align-items: flex-start;
}

.footer-brand p {
  margin: 4px 0 0;
}

.footer-group {
  display: grid;
  gap: 10px;
}

.footer-group h2 {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
}

.footer-group a {
  color: var(--muted);
  font-weight: 700;
}

.legal-page {
  padding: clamp(48px, 8vw, 90px) clamp(20px, 5vw, 72px);
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--green);
  font-weight: 800;
}

.legal-document {
  max-width: 880px;
}

.legal-document h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 5.8rem);
}

.legal-lede {
  max-width: 760px;
  margin-bottom: 36px;
  color: #2c3833;
  font-size: 1.2rem;
}

.legal-document section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.legal-document section h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.legal-document section p {
  max-width: 780px;
  color: var(--muted);
}

[dir="rtl"] .menu-panel {
  right: auto;
  left: 0;
}

[dir="rtl"] .screen-context li {
  padding-right: 24px;
  padding-left: 0;
}

[dir="rtl"] .screen-context li::before {
  right: 0;
  left: auto;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
  }

  .phone-screen {
    max-width: 310px;
    justify-self: center;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
  }

  .header-controls {
    justify-self: end;
    justify-content: flex-end;
  }

  .menu-panel {
    width: min(360px, calc(100vw - 24px));
  }
  .ops-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .workflow-grid,
  .screen-gallery,
  .screens-showcase {
    grid-template-columns: 1fr;
  }

  .screens-showcase {
    align-items: stretch;
  }

  .screen-carousel {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .carousel-button {
    width: 44px;
    height: 44px;
  }

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

@media (max-width: 540px) {
  .hero-visual {
    align-items: stretch;
  }

  .phone-screen {
    padding: 10px;
    border-radius: 20px;
    font-size: 0.72rem;
  }

  .owner-screen,
  .technician-screen {
    transform: none;
  }

  .phone-top {
    margin-bottom: 10px;
    padding: 8px;
  }

  .inbox-row,
  .route-stop {
    margin-bottom: 8px;
    padding: 8px;
  }

  .button-row {
    gap: 5px;
  }

  .button-row span {
    min-height: 28px;
    padding: 5px 6px;
    font-size: 0.68rem;
  }

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

  .screen-context {
    min-height: 0;
  }
}
