:root {
  --navy: #0e1620;
  --navy-mid: #162232;
  --navy-2: #161616;
  --steel: #cbd9e4;
  --steel-deep: #8aa0b2;
  --teal: #2bb8a3;
  --teal-bright: #3dceb8;
  --bg: #e7eef3;
  --paper: #f4f7f9;
  --card: #ffffff;
  --ink: #121417;
  --muted: #4d5b66;
  --line: #c3d0da;
  --ok: #0f6b3c;
  --ok-bg: #d8f3e4;
  --out: #8f2430;
  --out-bg: #f8d7db;
  --low: #6a4b00;
  --low-bg: #f4e4b2;
  --shadow: 0 14px 36px rgba(14, 22, 32, 0.12);
  --radius: 14px;
  --max: 1120px;
  --header-h: 76px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Lato", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, .brand-name {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tagline {
  font-family: "Lusitana", Georgia, "Times New Roman", serif;
  font-style: italic;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--steel);
  color: var(--navy);
  padding: 8px 12px;
  z-index: 40;
}
.skip:focus { left: 8px; top: 8px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Header
   ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navy);
  color: var(--steel);
  border-bottom: 1px solid rgba(203, 217, 228, 0.16);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
  color: inherit;
}
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(203, 217, 228, 0.35);
  flex-shrink: 0;
}
.brand-name {
  display: block;
  font-weight: 900;
  font-size: 1.02rem;
  color: #f4f7f9;
  white-space: nowrap;
}
.brand-sub {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--steel);
  border: 1px solid rgba(203, 217, 228, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  text-decoration: none;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 9px;
  border-radius: 8px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(203, 217, 228, 0.1);
}
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--teal-bright);
}

.has-sub { position: relative; }
.has-sub > a { display: inline-block; }
.has-sub ul {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 260px;
  background: var(--navy-mid);
  border: 1px solid rgba(203, 217, 228, 0.2);
  border-radius: 12px;
  padding: 8px;
  margin: 0;
  list-style: none;
  box-shadow: var(--shadow);
  z-index: 20;
}
.has-sub:hover ul,
.has-sub:focus-within ul,
.has-sub.open ul { display: block; }
.has-sub ul a {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 9px 12px;
}

.nav-cta {
  background: var(--steel) !important;
  color: var(--navy) !important;
  margin-left: 6px;
}
.nav-cta:hover { background: #eef3f6 !important; }

/* Layout
   ---------------------------------------------------------------------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.sample-banner {
  background: var(--low-bg);
  color: var(--low);
  border-left: 4px solid #c49214;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 20px 0 0;
}

.page-hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(8, 14, 20, 0.82) 0%, rgba(8, 14, 20, 0.48) 55%, rgba(8, 14, 20, 0.28) 100%),
    var(--hero-image, url("../assets/cover.jpg")) center / cover no-repeat,
    #0b1c22;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
}
.page-hero.home-hero { min-height: min(74vh, 640px); }
.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 20px 48px;
  width: 100%;
}
.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--steel);
}
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.page-hero .lede {
  margin: 0 0 18px;
  max-width: 42rem;
  color: var(--steel);
  font-size: 1.12rem;
}
.page-hero .tagline {
  margin: 0 0 22px;
  color: var(--teal-bright);
  font-size: 1.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 18px 0 0;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.crumbs a { color: var(--navy-mid); font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Buttons
   ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
  min-height: 46px;
  background: var(--navy);
  color: var(--steel);
}
.btn:hover { filter: brightness(1.08); }
.btn-steel { background: var(--steel); color: var(--navy); }
.btn-ghost {
  background: transparent;
  border-color: var(--steel);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Trust / bands
   ---------------------------------------------------------------------- */
.trust {
  background: var(--navy-mid);
  color: var(--steel);
  padding: 22px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust h2, .section-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-bright);
}
.trust p { margin: 0; color: #f4f7f9; font-weight: 700; }

.section { padding: 56px 0; }
.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 900;
}
.section .intro {
  margin: 0 0 28px;
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-dark {
  background: var(--navy);
  color: var(--steel);
}
.section-dark h2 { color: #fff; }
.section-dark .intro { color: var(--steel); }
.section-paper { background: var(--paper); }

/* Product cards
   ---------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: 0 1px 0 rgba(14, 22, 32, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--steel-deep);
}
.card .kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.card h3 { margin: 0; font-size: 1.22rem; font-weight: 900; }
.card p { margin: 0; color: var(--muted); flex: 1; }
.card .more {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.88rem;
}

.custom-band {
  margin-top: 28px;
  background: var(--navy-mid);
  color: var(--steel);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 18px;
  align-items: center;
}
.custom-band h2 { color: #fff; margin-bottom: 8px; }
.custom-band p { margin: 0; max-width: 46rem; }

/* Detail
   ---------------------------------------------------------------------- */
.detail {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 28px;
  align-items: start;
  padding-bottom: 20px;
}
.prose h2 { font-size: 1.35rem; margin: 28px 0 10px; }
.prose h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.2rem; }
.prose li { margin: 0 0 6px; }
.prose .lead { font-size: 1.12rem; color: var(--navy-mid); }

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 96px;
}
.side-card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.side-card .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.spec-list { list-style: none; padding: 0; margin: 0 0 12px; }
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.spec-list span { color: var(--muted); }

.machine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.machine {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 22px;
}
.machine h3 { margin: 0 0 8px; }
.machine p { margin: 0; color: var(--muted); }
.machine dl { margin: 14px 0 0; }
.machine dt {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}
.machine dd { margin: 2px 0 10px; }

/* Stock table
   ---------------------------------------------------------------------- */
.stock-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 28px;
}
.stat {
  background: var(--navy);
  color: var(--steel);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat strong {
  display: block;
  font-size: 1.8rem;
  color: #fff;
  font-weight: 900;
}
.stat span { font-size: 0.9rem; }

table.stock {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
table.stock th, table.stock td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.stock th {
  background: var(--navy);
  color: var(--steel);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
table.stock tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-low { background: var(--low-bg); color: var(--low); }
.badge-out { background: var(--out-bg); color: var(--out); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

/* Forms
   ---------------------------------------------------------------------- */
.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.form h2 { margin: 0 0 8px; }
.form-note { color: var(--muted); margin: 0 0 18px; }
.form label, .form .field {
  display: block;
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 0.92rem;
}
.form input, .form textarea, .form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  font-weight: 400;
}
.form textarea { resize: vertical; min-height: 110px; }
.form fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
}
.form legend { font-weight: 700; padding: 0 6px; }
.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  margin: 6px 0;
}
.inline input { width: auto; margin: 0; }
.kind-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 18px;
}
.kind-toggle button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
}
.kind-toggle button[aria-pressed="true"] {
  background: var(--navy);
  color: var(--steel);
  border-color: var(--navy);
}
.line-items { display: grid; gap: 8px; margin: 0 0 12px; }
.line-row {
  display: grid;
  grid-template-columns: 1fr 90px 40px;
  gap: 8px;
  align-items: center;
}
.form-error { color: var(--out); font-weight: 700; }
.form-fine { color: var(--muted); font-size: 0.88rem; }
.order-done {
  background: var(--ok-bg);
  color: var(--ok);
  border-radius: var(--radius);
  padding: 22px;
}
.order-done h2 { color: var(--ok); }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Footer
   ---------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-2);
  color: var(--steel);
  padding: 48px 0 28px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
}
.site-footer h2 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-bright);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 7px; }
.site-footer a { color: var(--steel); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .fine {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(203, 217, 228, 0.14);
  color: var(--steel-deep);
  font-size: 0.85rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Admin
   ---------------------------------------------------------------------- */
.orders { display: grid; gap: 14px; }
.order-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.order-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.order-meta { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 980px) {
  .trust-grid,
  .card-grid,
  .card-grid.four,
  .machine-grid,
  .stock-summary,
  .footer-grid,
  .detail,
  .contact-cards,
  .custom-band { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(203, 217, 228, 0.16);
    padding: 10px 16px 18px;
    flex-direction: column;
    align-items: stretch;
  }
  body.nav-open .site-nav { display: flex; }
  .has-sub ul {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 10px;
    min-width: 0;
    background: transparent;
  }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

@media (max-width: 680px) {
  .trust-grid,
  .card-grid,
  .card-grid.two,
  .card-grid.four,
  .machine-grid,
  .stock-summary,
  .footer-grid,
  .detail,
  .contact-cards,
  .custom-band,
  .grid-2,
  .kind-toggle { grid-template-columns: 1fr; }
  .page-hero h1 { max-width: none; }
  .brand-name { font-size: 0.92rem; }
  .line-row { grid-template-columns: 1fr 80px 40px; }
  .stock-summary { grid-template-columns: 1fr 1fr; }
  /* Stock table becomes stacked cards on phones */
  table.stock, table.stock tbody, table.stock tr, table.stock td { display: block; width: 100%; }
  table.stock thead { display: none; }
  table.stock tr { border-bottom: 1px solid var(--line); padding: 10px 12px; }
  table.stock tr:last-child { border-bottom: 0; }
  table.stock td { border: 0; padding: 3px 0; }
  table.stock td[data-label] { display: flex; justify-content: space-between; gap: 12px; }
  table.stock td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.85rem; }
  table.stock td.stock-action .btn { width: 100%; justify-content: center; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.card { transition: none; }
}

.opt { font-weight: 400; color: var(--muted); }
