/* Royal Technology — dark graphite + satin gold; palette extracted from brand mark */
:root {
  --bg: #16161a;
  --bg-soft: #1e1e24;
  --panel: #202027;
  --panel-edge: #2e2e37;
  --plate: #4e4e4e;
  --text: #e9e6df;
  --muted: #a8a49a;
  --gold: #d7b775;
  --gold-bright: #e8cc87;
  --gold-dim: #8a6d1f;
  --ok: #7fb069;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16.5px;
}

::selection { background: rgba(215, 183, 117, 0.35); }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); text-decoration: underline; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 22, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-edge);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.mark { display: flex; align-items: center; }

.mark img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: block;
  border: 1px solid var(--panel-edge);
}

.wordmark {
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.wordmark .royal { color: var(--gold); }

.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  align-items: center;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}
.site-header nav a:hover { color: var(--gold-bright); text-decoration: none; }

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--panel-edge);
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.14;
  font-weight: 700;
  max-width: 19ch;
}

h1 .gold { color: var(--gold-bright); }

.lede {
  margin-top: 22px;
  max-width: 62ch;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
}

.stat .num {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.2;
}

.stat .lbl {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- sections ---------- */
section.block {
  padding: 64px 0;
  border-bottom: 1px solid var(--panel-edge);
}
section.block:last-of-type { border-bottom: none; }

h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 12px;
}

h2 .gold { color: var(--gold-bright); }

.section-lede {
  color: var(--muted);
  max-width: 68ch;
  margin-bottom: 36px;
}

/* capability bands */
.capband {
  margin-bottom: 44px;
}
.capband:last-child { margin-bottom: 0; }

.capband h3 {
  font-size: 1.18rem;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 650;
}

.capband .cap-intro {
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 16px;
}

.trace-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 10px 26px;
  padding-left: 0;
}

.trace-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text);
  font-size: 0.97rem;
}

.trace-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  background: var(--gold);
  /* circuit-node dot: ring with dark center, echoing the logo vias */
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold-dim);
  border-radius: 2px;
}

/* ---------- work section ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.work-card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.work-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
  opacity: 0.7;
}

.work-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--gold-bright);
  font-weight: 650;
}

.work-card p { color: var(--muted); font-size: 0.94rem; }

/* ---------- engagement ---------- */
.engage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.engage-item {
  background: var(--bg-soft);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 20px 22px;
}

.engage-item h3 {
  font-size: 0.98rem;
  color: var(--gold-bright);
  margin-bottom: 6px;
  font-weight: 650;
}

.engage-item p { color: var(--muted); font-size: 0.93rem; }


/* ---------- contact form ---------- */
.contact-note { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }

.form-row { margin-bottom: 16px; max-width: 560px; }
.form-row label,
.hp label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
}
input:focus, textarea:focus { outline: 2px solid var(--gold-dim); border-color: var(--gold); }
textarea { resize: vertical; min-height: 120px; }

.cf-turnstile { margin: 4px 0 18px; }

button[type="submit"] {
  background: var(--gold);
  color: #16161a;
  border: none;
  border-radius: 8px;
  padding: 11px 26px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
}
button[type="submit"]:hover { background: var(--gold-bright); }
button[type="submit"]:disabled { opacity: 0.55; cursor: wait; }

.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.form-status { margin-top: 14px; font-size: 0.92rem; color: var(--gold-bright); min-height: 1.2em; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--panel-edge);
  padding: 40px 0 48px;
  background: var(--bg-soft);
}

.footer-flex {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-flex img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  border: 1px solid var(--panel-edge);
  display: block;
}

.footer-name {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.88rem;
  font-weight: 600;
}
.footer-name .royal { color: var(--gold); }

.footer-note { color: var(--muted); font-size: 0.86rem; margin-top: 8px; }

.footer-links {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 8px; }
  .site-header nav { margin-left: 0; width: 100%; gap: 18px; }
  .hero { padding: 56px 0 56px; }
  h1 { max-width: none; }
  .footer-links { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (prefers-color-scheme: light) {
  /* intentionally unchanged: the brand plate is graphite; keep dark in light mode */
}