/* Droneforge — droneforge.co.uk
   Design tokens, base typography, layout primitives, and component styles. */

:root {
  --ink: #0e1422;
  --ink-2: #1a2238;
  --ink-3: #2a334d;
  --paper: #f6f5f0;
  --paper-2: #ecebe4;
  --rule: #d8d6cc;
  --muted: #5d6478;
  --accent: #c0853a;        /* forge amber */
  --accent-2: #8a5a23;
  --accent-soft: #f3e6cf;
  --signal: #2f6b55;        /* deep teal for callouts */
  --warn: #8b2f2f;
  --max: 1180px;
  --measure: 68ch;
  --shadow-sm: 0 1px 2px rgba(14,20,34,.06), 0 1px 3px rgba(14,20,34,.05);
  --shadow-md: 0 6px 14px rgba(14,20,34,.08), 0 2px 4px rgba(14,20,34,.06);
  --shadow-lg: 0 24px 60px rgba(14,20,34,.18), 0 6px 14px rgba(14,20,34,.10);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", "Source Serif Pro", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; margin-top: 2.2em; }
h3 { font-size: 1.25rem; line-height: 1.3; margin-top: 1.8em; color: var(--ink-2); }
h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-2); font-family: "Inter", sans-serif; font-weight: 700; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

ul, ol { padding-left: 1.2em; max-width: var(--measure); }
li { margin-bottom: .4em; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* Top navigation -------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 245, 240, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand__mark {
  width: 28px; height: 28px;
  display: inline-grid; place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: var(--accent);
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: .8rem;
}
.brand__co { color: var(--muted); font-weight: 500; font-family: "Inter", sans-serif; font-size: .82rem; margin-left: .15rem; }
.nav__links {
  margin-left: auto;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav__links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 500;
}
.nav__links a:hover { color: var(--accent-2); }
.nav__links a.is-active { color: var(--accent-2); }
.nav__cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: .5rem .9rem;
  border-radius: 999px;
  font-weight: 600 !important;
  font-size: .88rem !important;
}
.nav__cta:hover { background: var(--accent-2); color: var(--paper) !important; }

/* Layout ---------------------------------------------------------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.4rem; }
.section { padding: 4.5rem 0; }
.section--tight { padding: 2.5rem 0; }
.section--dark { background: var(--ink); color: #d9dceb; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #f4f1e8; }
.section--dark h4 { color: var(--accent); }
.section--dark a { color: var(--accent); }
.section--dark a:hover { color: #fff; }
.section--cream { background: var(--paper-2); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 1rem;
}
.section--dark .eyebrow { color: var(--accent); }

.lede { font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.section--dark .lede { color: #c8ccdd; }

/* Hero ------------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(circle at 80% 10%, rgba(192,133,58,.18), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(47,107,85,.18), transparent 50%),
    linear-gradient(180deg, #0a1020 0%, #0e1422 100%);
  color: #e6e8f0;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #1a2238;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 30%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 40%, transparent 80%);
}
.hero__inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 1.4rem; }
.hero__title { color: #f6f1e3; max-width: 18ch; }
.hero__sub { color: #c8ccdd; font-size: 1.25rem; max-width: 56ch; margin-top: 1rem; }
.hero__meta { color: #8e93a8; font-size: .92rem; margin-top: 1.5rem; }
.hero__cta { margin-top: 2rem; display: flex; gap: .8rem; flex-wrap: wrap; }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.3rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #1a1300; }
.btn--primary:hover { background: #d39749; color: #1a1300; }
.btn--ghost { background: transparent; color: #e6e8f0; border-color: rgba(255,255,255,.25); }
.btn--ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--accent-2); color: var(--paper); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

/* Cards & key facts ----------------------------------------------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}
.fact {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.section--dark .fact {
  background: #141b2e;
  border-color: #232c45;
  color: #d9dceb;
}
.fact__num {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 2rem;
  color: var(--accent-2);
  line-height: 1;
  display: block;
  margin-bottom: .35rem;
}
.section--dark .fact__num { color: var(--accent); }
.fact__label { font-size: .92rem; color: var(--muted); }
.section--dark .fact__label { color: #a9aec5; }

/* Build-your-own-drone feature card ------------------------------------ */
.build-feature {
  position: relative;
  margin: 4rem 0;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(192,133,58,.95) 0%, rgba(138,90,35,.95) 100%),
    var(--ink);
  color: #1a1300;
  padding: clamp(2.2rem, 5vw, 4rem);
  min-height: 360px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 820px) {
  .build-feature { grid-template-columns: 1.2fr 1fr; }
}
.build-feature::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 18px);
  pointer-events: none;
  opacity: .35;
}
.build-feature__body { position: relative; z-index: 1; }
.build-feature__eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 800;
  color: #1a1300;
  background: rgba(255,255,255,.45);
  padding: .35rem .7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.build-feature h2 { color: #1a1300; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 1rem; }
.build-feature p { color: #2b1f08; max-width: 48ch; margin-bottom: 1.4rem; }
.build-feature .btn--primary { background: #1a1300; color: #f3e6cf; }
.build-feature .btn--primary:hover { background: #000; color: #fff; }
.build-feature__placeholder {
  position: relative;
  z-index: 1;
  border: 2px dashed rgba(26,19,0,.45);
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  color: #2b1f08;
  font-size: .92rem;
  letter-spacing: .04em;
}
.build-feature__placeholder strong { display: block; font-size: 1.05rem; margin-bottom: .35rem; color: #1a1300; }

/* Build page reserved canvas ------------------------------------------- */
.build-canvas {
  border: 2px dashed var(--rule);
  background:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(192,133,58,.06) 18px 19px);
  border-radius: 14px;
  min-height: clamp(420px, 60vh, 720px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  margin: 2rem 0 4rem;
  color: var(--muted);
}
.build-canvas h3 { color: var(--ink); margin-bottom: .8rem; }
.build-canvas p { margin: 0 auto .6rem; max-width: 52ch; }

/* Section grid for two-up content -------------------------------------- */
.grid-2 {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 1.2rem 1.4rem;
  border-radius: 0 8px 8px 0;
  margin: 1.6rem 0;
  font-size: 1rem;
}
.callout--signal { background: #e6efea; border-left-color: var(--signal); }
.callout strong { color: var(--accent-2); }

/* Briefing layout: TOC sidebar + content -------------------------------- */
.brief {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3rem 0 5rem;
}
@media (min-width: 980px) {
  .brief { grid-template-columns: 240px 1fr; gap: 3.5rem; }
}
.toc {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: .92rem;
  border-left: 1px solid var(--rule);
  padding-left: 1.2rem;
}
.toc__title { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--muted); margin-bottom: .8rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: .55rem; }
.toc a { color: var(--ink-2); text-decoration: none; display: block; line-height: 1.35; }
.toc a:hover, .toc a.is-active { color: var(--accent-2); }
.toc a.is-active { font-weight: 600; }

.prose { max-width: 72ch; }
.prose h2:first-child { margin-top: 0; }
.prose .pageref {
  display: inline-block;
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .6rem;
  font-weight: 600;
}

/* Pager between briefing pages ----------------------------------------- */
.pager {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.pager a {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  max-width: 45%;
}
.pager a small { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.pager a strong { font-weight: 600; color: var(--ink); }
.pager a:hover strong { color: var(--accent-2); }
.pager .next { text-align: right; margin-left: auto; }

/* Tables ---------------------------------------------------------------- */
table.timeline {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0 2.4rem;
  font-size: .96rem;
}
table.timeline th, table.timeline td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.timeline th {
  background: var(--paper-2);
  font-weight: 600;
  color: var(--ink-2);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}
table.timeline tr:hover td { background: rgba(192,133,58,.05); }
table.timeline td:first-child { font-family: "Fraunces", serif; font-weight: 600; color: var(--accent-2); width: 80px; }

/* Index page sectioning ------------------------------------------------- */
.section-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}
@media (min-width: 720px) { .section-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .section-list { grid-template-columns: repeat(3, 1fr); } }

.section-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.section-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.section-card__num {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  color: var(--accent-2);
  font-weight: 600;
}
.section-card h3 { margin: .35rem 0 .5rem; font-size: 1.15rem; }
.section-card p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Footer ---------------------------------------------------------------- */
.footer {
  background: #0a1020;
  color: #8e93a8;
  padding: 3rem 0 2rem;
  font-size: .92rem;
}
.footer a { color: #d9dceb; }
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.4rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .footer__inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer h4 { color: #f4f1e8; margin: 0 0 .8rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-family: "Inter", sans-serif; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .4rem; }
.footer__bottom {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding: 1.3rem 1.4rem 0;
  border-top: 1px solid #1a2238;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .82rem;
  color: #6c7188;
}

/* Skip link & a11y ------------------------------------------------------ */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; z-index: 100; }

/* Prose lists styling --------------------------------------------------- */
.prose ul li::marker { color: var(--accent-2); }

/* Print-friendly basics ------------------------------------------------- */
@media print {
  .nav, .footer, .pager, .toc { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .prose { max-width: none; }
}
