/* doversecurity.co.uk - "Chalk Line" design system.
   Graphite + chalk + signal amber. Port-signage condensed headings, humanist body.
   One stylesheet. Self-hosted fonts in /assets/fonts.css. See DESIGN.md. */
:root {
  --graphite: #15181c;
  --graphite-2: #1f242a;
  --graphite-3: #2b323a;
  --chalk: #f3f1ea;
  --paper: #fbfaf6;
  --ink: #15181c;
  --ink-soft: #484f57;
  --mist-on-dark: #c9ced4;
  --rule: #d8d4c8;
  --rule-dark: #b9b4a5;
  --amber: #f2a413;
  --amber-soft: #ffd27a;
  --rust: #9a4306;
  --rust-deep: #7d3505;
  --slate: #34404b;
  --wa: #0a7a43;
  --wa-deep: #086136;
  --font-display: 'Barlow Semi Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-text: 'Source Sans 3', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1160px;
  --content: 720px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 104px;

  /* legacy aliases: pages carry inline styles that reference the old tokens */
  --mist: var(--chalk);
  --stone: var(--mist-on-dark);
  --steel: var(--mist-on-dark);
  --blue: var(--rust);
  --blue-deep: var(--rust-deep);
  --cyan: var(--amber);
  --cyan-bright: var(--amber);
  --graphite-deep: var(--graphite);
  --shadow: 0 1px 0 rgba(21,24,28,.06);
  --shadow-lg: 0 18px 40px -22px rgba(21,24,28,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-text); font-size: 18px; line-height: 1.62;
  color: var(--ink); background: var(--chalk); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, .display {
  font-family: var(--font-display); font-weight: 700; color: var(--graphite);
  line-height: 1.04; letter-spacing: 0.005em; text-transform: uppercase;
}
h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 1.7em 0 .55em; }
h3 { font-size: 1.35rem; margin: 1.4em 0 .4em; line-height: 1.12; }
h4 { font-size: 1.05rem; letter-spacing: .06em; }
p { margin: 0 0 1.1em; }
a { color: var(--rust); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust-deep); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--s5); }
.prose { max-width: var(--content); margin: 0 auto; padding: 0 var(--s5); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Topbar: signal amber strip */
.topbar { background: var(--amber); color: var(--graphite); font-size: .92rem; padding: .45rem 0; font-weight: 600; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.topbar a { color: var(--graphite); text-decoration: none; font-weight: 700; }
.topbar a:hover { text-decoration: underline; color: var(--graphite); }
.topbar span em { font-style: normal; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .85rem; }
.badge { display: inline-block; background: var(--graphite); color: var(--amber-soft); padding: .12rem .6rem; font-size: .8rem; font-weight: 700; margin-right: .6rem; letter-spacing: .03em; }

/* Header */
header.site { background: var(--paper); border-bottom: 2px solid var(--graphite); padding: .9rem 0; z-index: 50; }
header.site .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s6); }
.brand { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--graphite); text-decoration: none; text-transform: uppercase; letter-spacing: .02em; line-height: 1; display: flex; align-items: center; gap: .6rem; }
.brand:hover { color: var(--graphite); }
.brand .mark { width: 36px; height: 36px; flex: none; }
.brand small { display: block; font-family: var(--font-text); font-size: .68rem; font-weight: 700; letter-spacing: .18em; color: var(--ink-soft); margin-top: .25rem; }
nav.primary ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav.primary a { color: var(--graphite); text-decoration: none; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: 1.02rem; position: relative; padding: .3rem 0; }
nav.primary a:hover { color: var(--rust); }
nav.primary a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -.2rem; height: 3px; background: var(--amber); }
@media (min-width: 960px) { header.site { position: sticky; top: 0; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: .8rem 1.6rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent; border-radius: 0; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--graphite); color: var(--amber-soft); border-color: var(--graphite); }
.btn-primary:hover { background: var(--graphite-3); color: #fff; border-color: var(--graphite-3); }
.btn-ghost { background: transparent; color: var(--graphite); border-color: var(--graphite); }
.btn-ghost:hover { background: var(--graphite); color: var(--paper); }
.btn.wa-btn-lg { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa-btn-lg:hover { background: var(--wa-deep); border-color: var(--wa-deep); color: #fff; }
.btn.wa-btn-lg svg { width: 20px; height: 20px; }
.wa-btn { display: inline-flex; align-items: center; gap: .45rem; background: var(--wa); color: #fff !important; padding: .3rem .8rem; font-weight: 700; font-size: .85rem; text-decoration: none !important; }
.wa-btn:hover { background: var(--wa-deep); }
.wa-btn svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 700px) { .topbar .wa-btn { display: none; } }

/* Home hero: full-bleed photograph, dossier card overlapping the lower edge */
.hero { position: relative; background: var(--chalk); color: var(--ink); padding: 0; }
.hero figure.hero-media { margin: 0; height: clamp(260px, 52vw, 560px); overflow: hidden; background: var(--graphite-2); }
.hero figure.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 35% 50%; }
.hero .container { position: relative; padding-top: 0; padding-bottom: var(--s7); }
.hero .hero-copy { background: var(--paper); color: var(--ink); margin-top: calc(-1 * var(--s8)); padding: var(--s6) var(--s5) var(--s6); border-top: 6px solid var(--amber); position: relative; box-shadow: var(--shadow-lg); display: grid; gap: var(--s5); }
.hero h1 { color: var(--graphite); max-width: 22ch; margin-bottom: .35em; font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
.hero .lede { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: var(--s5); max-width: 62ch; }
.hero .section-eyebrow { color: var(--rust); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-aside { background: var(--graphite); color: var(--paper); padding: var(--s5); border-left: 6px solid var(--amber); align-self: start; }
.hero-aside .big { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--amber); display: block; }
.hero-aside .lab { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .92rem; font-weight: 600; color: #fff; display: block; margin: .4rem 0 .9rem; }
.hero-aside p { margin: 0; color: var(--mist-on-dark); font-size: .98rem; line-height: 1.5; }
@media (min-width: 960px) {
  .hero .container { padding-bottom: var(--s8); }
  .hero .hero-copy { grid-template-columns: 1.7fr 1fr; gap: var(--s6); padding: var(--s7) var(--s7); margin-top: calc(-1 * var(--s9)); }
}
.hero ~ .proofbar { margin-top: 0; }

/* Proof bar: factual strip under hero */
.proofbar { background: var(--graphite); color: var(--paper); padding: var(--s5) 0; border-top: 1px solid var(--graphite-3); }
.proofbar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: 1fr 1fr; }
.proofbar li { display: flex; gap: .7rem; align-items: center; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; font-size: 1rem; line-height: 1.15; }
.proofbar svg { width: 30px; height: 30px; flex: none; color: var(--amber); }
@media (min-width: 960px) { .proofbar ul { grid-template-columns: repeat(4, 1fr); } }

/* Inner hero: chalk band, amber spine, optional photo plate */
.hero.hero-light { background: var(--chalk); color: var(--ink); padding: var(--s7) 0 var(--s6); border-bottom: 1px solid var(--rule-dark); position: relative; overflow: hidden; }
.hero.hero-light::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--amber); }
.hero.hero-light .container { padding-bottom: 0; display: grid; gap: var(--s5); align-items: center; }
.hero.hero-light h1 { color: var(--graphite); font-size: clamp(2.2rem, 5.2vw, 3.7rem); max-width: 22ch; }
.hero.hero-light .lede { color: var(--ink-soft); font-size: 1.12rem; max-width: 64ch; }
.hero.hero-light .section-eyebrow { color: var(--rust); }
.hero-plate { margin: 0; border-top: 6px solid var(--graphite); background: var(--graphite-2); aspect-ratio: 3 / 2; overflow: hidden; }
.hero-plate img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 960px) {
  .hero.hero-light .container.has-plate { grid-template-columns: 1.5fr 1fr; gap: var(--s7); }
}

/* Sections */
section { padding: var(--s8) 0; background: var(--chalk); }
section.tight { padding: var(--s6) 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-eyebrow { font-family: var(--font-display); font-size: .92rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; color: var(--rust); margin: 0 0 .6em; display: flex; align-items: center; gap: .7rem; }
.section-eyebrow::before { content: ''; width: 28px; height: 3px; background: var(--amber); flex: none; }
.hero-light .crumb + .section-eyebrow, .hero-light .section-eyebrow { }

/* Grids */
.grid { display: grid; gap: var(--s5); }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-4 .card { display: grid; grid-template-columns: 52px 1fr; column-gap: var(--s4); align-content: start; }
.grid-4 .card .card-icon { grid-row: 1 / span 3; margin: 0; }
.grid-4 .card > :not(.card-icon) { grid-column: 2; }
.grid-4 .card h3 { margin-top: 0; }

/* Spec cards */
.card { position: relative; background: var(--paper); border: 1px solid var(--rule-dark); border-top: 4px solid var(--graphite); padding: var(--s5); border-radius: 0; transition: transform .15s, box-shadow .15s, border-top-color .15s; }
section.alt .card { background: var(--chalk); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-top-color: var(--amber); }
.card h3 { margin: .2em 0 .35em; font-size: 1.3rem; }
.card p { font-size: 1rem; color: var(--ink-soft); }
.card a.card-link { color: var(--graphite); text-decoration: none; }
.card a.card-link:hover { color: var(--rust); }
.card .card-icon { display: block; width: 44px; height: 44px; color: var(--graphite); margin-bottom: var(--s3); }
.card .card-icon svg { width: 100%; height: 100%; display: block; }
.card .more { display: inline-block; margin-top: .3rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: .95rem; font-weight: 700; color: var(--rust); text-decoration: none; }
.card .more::after { content: ' \2192'; }
.card .section-eyebrow { margin-bottom: .3rem; }

/* Promise band */
.guarantees { background: var(--graphite); color: var(--paper); border: 0; }
.guarantees h2, .guarantees .section-eyebrow { color: #fff; }
.guarantees .section-eyebrow { color: var(--amber); }
.guarantees .grid { gap: var(--s5); }
.guarantees .promise { background: var(--graphite-2); padding: var(--s6) var(--s5); border-top: 4px solid var(--amber); }
.guarantees .promise h3 { margin: .6rem 0 .5em; font-size: 1.35rem; color: #fff; }
.guarantees .promise p { margin: 0; font-size: 1rem; color: var(--mist-on-dark); line-height: 1.55; }
.guarantees .promise .icon { display: inline-flex; width: 48px; height: 48px; color: var(--amber); }
.guarantees .promise .icon svg { width: 100%; height: 100%; }
.guarantee-pill { display: inline-block; background: var(--graphite); color: var(--amber-soft); padding: .3rem .8rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .07em; font-size: .88rem; font-weight: 600; margin: .5rem .5rem 0 0; }

/* Photo figures */
.photo { margin: 0; background: var(--graphite-2); border-bottom: 5px solid var(--amber); }
.photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.photo figcaption { background: var(--graphite); color: var(--mist-on-dark); font-size: .88rem; padding: .6rem var(--s4); font-family: var(--font-display); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.stack { display: grid; gap: var(--s5); align-self: start; }

/* Panel */
.panel { background: var(--graphite); color: var(--paper); padding: var(--s6); border-radius: 0; border-left: 6px solid var(--amber); }
.panel h2 { color: #fff; margin-top: 0; }
.panel p { color: var(--mist-on-dark); }
.panel .section-eyebrow { color: var(--amber) !important; }
.panel a { color: var(--amber-soft); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.panel a:hover { color: #fff; }

/* Pricing table */
table.pricing { width: 100%; border-collapse: collapse; margin: 1.4rem 0 1.8rem; font-size: 1rem; background: var(--paper); }
table.pricing th, table.pricing td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.pricing thead th { background: var(--graphite); color: #fff; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: .88rem; font-weight: 600; }
table.pricing tbody tr:nth-child(even) { background: var(--chalk); }
table.pricing td strong { color: var(--graphite); font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
table.pricing caption { text-align: left; font-weight: 700; color: var(--graphite); margin-bottom: .4rem; }
@media (max-width: 600px) { table.pricing { display: block; overflow-x: auto; } }

/* Footer */
footer.site { background: var(--graphite); color: var(--mist-on-dark); padding: var(--s8) 0 var(--s6); margin-top: 0; border-top: 6px solid var(--amber); }
footer.site h4 { color: #fff; font-size: 1rem; margin: 0 0 .9em; letter-spacing: .14em; }
footer.site p { color: var(--mist-on-dark); }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: .45rem 0; color: var(--mist-on-dark); }
footer.site a { color: var(--mist-on-dark); text-decoration: none; font-size: .98rem; }
footer.site a:hover { color: var(--amber); text-decoration: underline; }
footer.site strong { color: #fff; }
.foot-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.foot-bottom { border-top: 1px solid var(--graphite-3); margin-top: var(--s6); padding-top: var(--s5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); font-size: .88rem; color: var(--mist-on-dark); }
.foot-bottom a { color: var(--mist-on-dark); }

/* Article */
article.guide { padding: var(--s7) 0; }
article.guide .meta { font-family: var(--font-display); font-size: .95rem; color: var(--ink-soft); margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
article.guide .meta a { color: var(--rust); }
article.guide blockquote { border-left: 5px solid var(--amber); margin: 1.8em 0; padding: .4em 0 .4em 1.4em; font-size: 1.25rem; line-height: 1.45; color: var(--slate); font-weight: 600; }
article.guide ul, article.guide ol, .prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
article.guide li, .prose li { margin: .4em 0; }
.callout { background: var(--paper); border: 1px solid var(--rule-dark); border-left: 6px solid var(--amber); padding: var(--s5); margin: 2em 0; }
.callout h4 { margin: 0 0 .4em; color: var(--graphite); font-size: 1.15rem; }
.callout.note { border-left-color: var(--graphite); }
.prose > h2:first-child { margin-top: 0; }

/* Breadcrumb */
.crumb { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1rem; font-weight: 600; }
.crumb a { color: var(--slate); text-decoration: none; }
.crumb a:hover { color: var(--rust); text-decoration: underline; }

/* Contact form */
.form-grid { display: grid; gap: 1.2rem; max-width: 600px; background: var(--paper); border: 1px solid var(--rule-dark); border-top: 6px solid var(--graphite); padding: var(--s6); }
.form-row { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-field { margin-bottom: 0; }
label, legend { font-weight: 700; font-size: .95rem; display: block; margin-bottom: .35rem; color: var(--graphite); }
input, textarea, select { width: 100%; padding: .8rem .9rem; border: 1px solid var(--slate); background: #fff; font-family: inherit; font-size: 1rem; color: var(--ink); border-radius: 0; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--graphite); }
textarea { min-height: 140px; resize: vertical; }
.form-radio-group { display: flex; gap: 1.5rem; }
.form-radio { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-weight: 600; }
.form-radio input { width: auto; }
.form-alert { padding: .9rem 1.1rem; font-size: .98rem; margin-bottom: 1rem; }
.form-alert--error { background: #fdeeee; border: 1px solid #e3b0b0; color: #7a1818; }
.form-alert--ok { background: #eaf4ee; border: 1px solid #a9d1b8; color: #0f5132; }
.form-alert[hidden] { display: none; }

/* Utility */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.divider-rule { height: 4px; background: var(--amber); margin: 0 0 2rem; width: 64px; }
.divider-rule.center { margin-left: auto; margin-right: auto; }

@media (max-width: 700px) {
  body { font-size: 17px; }
  section { padding: var(--s7) 0; }
  header.site .container { flex-direction: column; align-items: flex-start; gap: .9rem; }
  nav.primary ul { gap: .5rem 1.1rem; }
  nav.primary a { font-size: .98rem; }
  .brand { font-size: 1.5rem; }
  .panel { padding: var(--s5); }
  .form-grid { padding: var(--s5); }
  .hero .hero-copy { margin-top: calc(-1 * var(--s6)); }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
