:root {
  --ink: #121817;
  --muted: #5b6965;
  --paper: #f5f4ee;
  --soft: #ebeee8;
  --panel: #ffffff;
  --line: #d5d9cf;
  --teal: #006e69;
  --teal-2: #008a83;
  --amber: #c9822b;
  --berry: #8b3650;
  --danger: #b84639;
  --shadow: 0 20px 48px rgba(14, 22, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
  padding: 14px 32px;
  background: rgba(245, 244, 238, 0.94);
  border-bottom: 1px solid rgba(18, 24, 23, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 235px;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.nav a {
  padding: 10px 12px;
  border-radius: 6px;
}

.nav a:hover {
  background: rgba(0, 110, 105, 0.1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  line-height: 1;
}

.button svg {
  width: 18px;
  height: 18px;
}

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

.button.primary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button.secondary {
  color: var(--ink);
  background: var(--soft);
  border-color: var(--line);
}

.button.light {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.35);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.language-select select {
  width: auto;
  min-height: 42px;
  padding: 9px 34px 9px 10px;
}

.hero {
  min-height: 82vh;
  display: flex;
  align-items: center;
  padding: 80px 32px 72px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 12, 12, 0.86) 0%, rgba(5, 12, 12, 0.58) 46%, rgba(5, 12, 12, 0.08) 100%),
    url("./assets/uavcustom-hero-drone.png") center right / cover no-repeat;
}

.hero-copy {
  width: min(680px, 100%);
  margin-left: max(0px, calc((100vw - 1180px) / 2));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: 5rem;
  line-height: 0.95;
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
  line-height: 1.65;
}

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

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 740px;
  margin-top: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-strip span {
  padding: 18px;
  background: rgba(5, 12, 12, 0.24);
}

.hero-strip strong {
  display: block;
  margin-bottom: 7px;
  color: var(--amber);
}

.section {
  padding: 86px 32px;
}

.section.white {
  background: #fff;
}

.heading,
.audit-grid,
.service-grid,
.builder,
.admin-grid,
.contact,
.checkout-grid,
.admin-gate,
.dark {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.heading {
  margin-bottom: 34px;
}

.heading.center {
  max-width: 760px;
  text-align: center;
}

.heading h2,
.dark h2,
.contact h2 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.08;
}

.heading p:not(.eyebrow),
.dark p,
.contact p {
  color: var(--muted);
  line-height: 1.7;
}

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

.audit-grid article {
  min-height: 235px;
  padding: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.audit-grid span {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--berry);
  font-weight: 900;
}

.audit-grid h3,
.service-grid h3,
.panel-title h3,
.workbench-head h3 {
  margin: 0;
}

.audit-grid p,
.service-grid p {
  color: var(--muted);
  line-height: 1.65;
}

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

.service-grid article,
.panel,
.workbench,
.contact-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.is-hidden {
  display: none !important;
}

.service-grid article {
  padding: 26px;
}

.service-grid svg {
  width: 28px;
  height: 28px;
  margin-bottom: 22px;
  color: var(--teal-2);
}

.dark {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding: 58px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
}

.dark p {
  color: rgba(255, 255, 255, 0.72);
}

.steps {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
}

.steps li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.06);
}

.steps span {
  color: var(--amber);
  font-weight: 900;
}

.builder {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 22px;
}

.panel-title,
.workbench-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-title.compact {
  margin-top: 28px;
  margin-bottom: 14px;
}

.panel-title svg {
  color: var(--teal-2);
}

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

.purpose-button {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 12px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.purpose-button span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.purpose-button.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.purpose-button.is-active span {
  color: rgba(255, 255, 255, 0.78);
}

.fields {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal-2);
  outline: 3px solid rgba(0, 138, 131, 0.15);
}

.ready-list {
  display: grid;
  gap: 10px;
}

.ready-card {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.ready-card h4 {
  margin: 0;
}

.meta,
.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  color: #245147;
  background: rgba(36, 81, 71, 0.1);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 850;
}

.tag.warn,
.pill.warn {
  color: #81520a;
  background: rgba(201, 130, 43, 0.16);
}

.tag.danger,
.pill.danger {
  color: var(--danger);
  background: rgba(184, 70, 57, 0.12);
}

.workbench {
  overflow: hidden;
}

.workbench-head {
  justify-content: space-between;
  padding: 22px 22px 0;
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.component-card {
  display: grid;
  gap: 12px;
  min-height: 170px;
  padding: 20px;
  background: #fff;
}

.component-card h4 {
  margin: 0;
}

.hint {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.quote-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.quote-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quote-output {
  display: none;
  max-height: 320px;
  margin: 0;
  padding: 20px 22px;
  overflow: auto;
  white-space: pre-wrap;
  color: #dfe9e6;
  background: #0d1514;
}

.quote-output.visible {
  display: block;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 18px;
  align-items: start;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.mode-button {
  min-height: 42px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 850;
}

.mode-button.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.order-panel {
  display: grid;
  gap: 16px;
}

.checkout-summary {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkout-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding: 13px 14px;
  background: #fff;
}

.checkout-row + .checkout-row {
  border-top: 1px solid var(--line);
}

.checkout-row span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.payment-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.payment-panel h3 {
  margin: 0;
}

.payment-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
}

.admin-gate {
  display: grid;
  min-height: calc(100vh - 74px);
  place-items: center;
}

.gate-panel {
  width: min(520px, 100%);
}

.rule-panel {
  grid-column: 1 / -1;
}

.file-box {
  min-height: 112px;
  place-items: center;
  padding: 18px;
  color: var(--teal);
  background: #fff;
  border: 1px dashed var(--teal);
  border-radius: 8px;
  text-align: center;
}

.note,
.status {
  color: var(--muted);
  line-height: 1.55;
}

.table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  color: var(--muted);
  background: var(--paper);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td input {
  max-width: 110px;
  min-height: 36px;
}

.compat-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 330px;
  margin: 16px 0;
  overflow: auto;
}

.compat-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.compat-list input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.contact {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 46px;
}

address {
  margin-top: 28px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.8;
}

address a {
  color: var(--teal);
  font-weight: 900;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 32px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
}

@media (max-width: 1040px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
  }

  .audit-grid,
  .service-grid,
  .dark,
  .builder,
  .admin-grid,
  .checkout-grid,
  .contact {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .topbar,
  .section,
  .hero,
  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .brand {
    min-width: 0;
  }

  .topbar > .button,
  .header-actions,
  .nav {
    width: min(100%, 340px);
  }

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

  .language-select {
    display: grid;
    grid-template-columns: 70px 1fr;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .nav a {
    text-align: center;
  }

  .hero {
    min-height: 84vh;
    align-items: flex-end;
    padding-top: 52px;
    padding-bottom: 44px;
    background:
      linear-gradient(180deg, rgba(5, 12, 12, 0.32) 0%, rgba(5, 12, 12, 0.88) 62%, rgba(5, 12, 12, 0.94) 100%),
      url("./assets/uavcustom-hero-drone.png") 66% center / cover no-repeat;
  }

  .hero-copy {
    max-width: 340px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 1rem;
  }

  .hero-strip,
  .purpose-grid,
  .component-grid,
  .compat-list,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .heading h2,
  .dark h2,
  .contact h2 {
    font-size: 2rem;
  }

  .dark {
    padding: 36px;
  }

  .steps li {
    grid-template-columns: 1fr;
  }

  .workbench-head,
  .quote-bar,
  .payment-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-panel,
  .checkout-row {
    grid-template-columns: 1fr;
  }
}
