:root {
  --ink: #1a1714;
  --muted: #5e564c;
  --paper: #f3efe6;
  --paper-2: #e7e0d4;
  --card: #fffcf7;
  --dark: #161412;
  --dark-2: #241f1b;
  --line: rgba(26, 23, 20, 0.12);
  --accent: #e24d1b;
  --accent-deep: #c24116;
  --header: 76px;
  --shadow: 0 18px 50px rgba(22, 20, 18, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: var(--header);
  font-family: Heebo, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, p, ul, ol {
  margin-top: 0;
}

h1, h2 {
  text-wrap: balance;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 5.6vw, 4.8rem);
  font-weight: 700;
}

h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.85rem, 3vw, 2.7rem);
}

h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}

::selection {
  background: #c24116;
  color: #fff;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 40;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.skip:focus {
  top: 0.7rem;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 30;
  height: var(--header);
  background: #161412;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: #f6f1e8;
}

.logo-mark {
  width: 32px;
  height: 32px;
}

.logo-type {
  font-family: Syne, Heebo, sans-serif;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 1.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a {
  color: #d9d2c6;
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #fff;
}

.nav-cta {
  background: var(--accent-deep);
  color: #fff !important;
  border-radius: 999px;
  padding: 0.48rem 1rem;
}

.nav-cta:hover {
  background: #a73612;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 6px auto;
  background: #f6f1e8;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--dark);
  background-size: 56px 56px, 56px 56px, auto;
  color: #f6f1e8;
  padding: 4.5rem 0 5.2rem;
}

.edge-label {
  display: none;
  position: absolute;
  inset-inline-start: 1.4rem;
  top: 50%;
  margin: 0;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: Syne, sans-serif;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: rgba(246, 241, 232, 0.38);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #e7b5a2;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.kicker::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--accent);
}

.kicker-dark {
  color: var(--accent-deep);
}

.lead,
.section-copy,
.about-text {
  color: #c9c1b4;
  font-size: 1.12rem;
  max-width: 40rem;
}

.section-copy,
.about-text {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.3rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
  color: #b7b0a4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: #a73612;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-ghost {
  background: transparent;
  color: #f6f1e8;
  box-shadow: inset 0 0 0 1px rgba(246, 241, 232, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-small {
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  margin-top: auto;
  align-self: flex-start;
}

.btn-block {
  width: 100%;
  margin-top: 0.4rem;
}

.stage {
  position: relative;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 18px -16px -16px 22px;
  border-radius: 22px;
  background: var(--accent-deep);
}

.installer {
  position: relative;
  background: var(--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.installer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d9d2c6;
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.dots {
  display: inline-flex;
  gap: 0.35rem;
}

.dots i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #5c534a;
  display: block;
}

.dots i:first-child {
  background: #c24116;
}

.installer-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.installer-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.75rem;
  border-radius: 12px;
  color: #f6f1e8;
}

.installer-list .is-run {
  background: rgba(255, 255, 255, 0.04);
}

.pill {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  background: #3a342e;
  color: #d9d2c6;
}

.is-done .pill {
  background: #1d4a3c;
  color: #d7efe4;
}

.is-run .pill {
  background: var(--accent-deep);
  color: #fff;
}

.bar {
  height: 4px;
  border-radius: 99px;
  background: #3a342e;
  overflow: hidden;
}

.bar-fill {
  display: block;
  width: 64%;
  height: 100%;
  background: var(--accent);
}

.installer-note {
  margin: 0.8rem 0 0;
  color: #b7b0a4;
  font-size: 0.92rem;
}

.marquee {
  overflow: hidden;
  background: var(--paper-2);
  border-block: 1px solid rgba(22, 20, 18, 0.08);
}

.marquee-track {
  display: flex;
  direction: ltr;
  width: max-content;
  animation: tick 32s linear infinite;
}

.marquee-group {
  display: flex;
  gap: 2rem;
  padding: 0.9rem 1rem;
}

.marquee-group span {
  direction: rtl;
  font-weight: 600;
  white-space: nowrap;
}

.marquee-group span::before {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-inline-end: 0.7rem;
  border-radius: 50%;
  background: var(--accent-deep);
  transform: translateY(-0.08rem);
}

@keyframes tick {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section {
  padding: 5.2rem 0;
  scroll-margin-top: calc(var(--header) + 12px);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  margin-bottom: 2.2rem;
}

.index,
.step-num {
  margin: 0.45rem 0 0;
  font-family: Syne, sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--accent-deep);
}

.step-num {
  margin: 0 0 0.9rem;
}

.service-grid,
.app-grid,
.process-grid {
  display: grid;
  gap: 1rem;
}

.service-grid {
  grid-template-columns: repeat(3, 1fr);
}

.app-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.service-card,
.app-card,
.step,
.contact-card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.service-card,
.app-card,
.step {
  padding: 1.25rem 1.2rem 1.3rem;
}

.service-card p:last-child,
.app-card p,
.step p,
.point p {
  margin-bottom: 0;
  color: var(--muted);
}

.service-card,
.app-card {
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.service-card:hover,
.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(194, 65, 22, 0.45);
}

.card-label,
.app-card .app-kicker {
  margin-bottom: 0.7rem;
  color: var(--accent-deep);
  font-size: 0.86rem;
  font-weight: 700;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
  border-top-width: 3px;
}

.app-card[data-cat="management"] { border-top-color: #1d4a3c; }
.app-card[data-cat="finance"] { border-top-color: #c24116; }
.app-card[data-cat="ops"] { border-top-color: #1d3d5c; }
.app-card[data-cat="clients"] { border-top-color: #8d5a32; }

.app-card[hidden] {
  display: none;
}

.section-apps {
  background: #faf7f2;
  padding-top: 4.6rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.chip.is-on {
  background: var(--dark);
  color: #f6f1e8;
  border-color: var(--dark);
}

.section-process {
  background: var(--paper-2);
}

.process-grid {
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  background: transparent;
  border-color: rgba(26, 23, 20, 0.14);
}

.band-dark {
  background: var(--dark);
  color: #f6f1e8;
}

.band-dark .section-copy,
.band-dark .about-text,
.band-dark .point p {
  color: #c9c1b4;
}

.about-grid,
.contact-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.about-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.about-text {
  font-size: 1.15rem;
  max-width: 38rem;
}

.about-points,
.contact-notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.point + .point {
  margin-top: 1rem;
}

.point {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-grid {
  grid-template-columns: 0.85fr 1.15fr;
}

.contact-notes {
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
}

.contact-notes li {
  padding-inline-start: 0.9rem;
  border-inline-start: 2px solid var(--accent-deep);
}

.contact-card,
.panel {
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #ddd4c6;
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
  font-weight: 400;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent-deep);
  outline: none;
  box-shadow: 0 0 0 3px rgba(194, 65, 22, 0.15);
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.form-status {
  min-height: 1.4rem;
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  color: #9a3412;
}

.form-status.is-ok {
  color: #1d4a3c;
}

form.is-done .form-grid,
form.is-done .btn-block {
  display: none;
}

.site-footer {
  overflow: hidden;
  background: var(--dark);
  color: #f6f1e8;
  padding: 0.5rem 0 2rem;
}

.footer-brand {
  margin: 0;
  font-family: Syne, sans-serif;
  font-weight: 800;
  font-size: clamp(4.5rem, 18vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: rgba(246, 241, 232, 0.08);
  -webkit-text-stroke: 1px rgba(246, 241, 232, 0.28);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  margin-top: 1.2rem;
  color: #c9c1b4;
}

.footer-row p {
  margin: 0;
}

.footer-row nav {
  display: flex;
  gap: 1rem;
}

.footer-row a {
  text-decoration: none;
}

.footer-row a:hover {
  color: #fff;
}

#install-dialog {
  width: min(34rem, calc(100% - 1.5rem));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

#install-dialog::backdrop {
  background: rgba(12, 10, 8, 0.66);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.panel-head h2 {
  font-size: 1.7rem;
  margin-bottom: 0.2rem;
}

.install-app-name {
  margin: 0;
  font-family: Syne, Heebo, sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem;
}

.text-btn:hover {
  color: var(--ink);
}

@media (min-width: 1280px) {
  .edge-label {
    display: block;
  }
}

@media (max-width: 1000px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.6rem 1.25rem 1.1rem;
    background: #161412;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav.is-open {
    display: flex;
    background: #1c1916;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .site-nav a {
    padding: 0.55rem 0;
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.3rem;
  }

  .hero-grid,
  .service-grid,
  .process-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3.2rem;
  }

  .stage {
    max-width: 460px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.6rem 0;
  }

  .stage::before {
    inset: 12px 8px -12px 8px;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
