/* margatesecurity.co.uk - "Turner Sky" design system.
   Plum ink + sand + sea teal, with a peach sunset accent. Soft serif headings, rounded forms,
   an arched photo window echoing Victorian seafront arcades. One stylesheet; fonts in /assets/fonts.css. See DESIGN.md. */
:root {
  --plum: #1d1430;
  --plum-2: #2a1f45;
  --plum-3: #3d3060;
  --sand: #f7f0e5;
  --cream: #fffaf1;
  --sand-deep: #ece1cf;
  --ink: #1d1430;
  --ink-soft: #4d4563;
  --mist-on-dark: #d9d2ea;
  --rule: #e1d6c4;
  --rule-dark: #bfb29b;
  --teal: #0e6764;
  --teal-deep: #0a4f4d;
  --peach: #ffa98a;
  --peach-soft: #ffd3c2;
  --wa: #0a7a43;
  --wa-deep: #086136;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-text: 'Hanken Grotesk', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1160px;
  --content: 720px;
  --r: 18px;
  --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 */
  --paper: var(--cream);
  --mist: var(--sand);
  --stone: var(--mist-on-dark);
  --steel: var(--mist-on-dark);
  --blue: var(--teal);
  --blue-deep: var(--teal-deep);
  --cyan: var(--peach);
  --cyan-bright: var(--peach);
  --graphite: var(--plum);
  --graphite-deep: var(--plum);
  --amber: var(--peach);
  --shadow: 0 1px 2px rgba(29,20,48,.08);
  --shadow-lg: 0 22px 44px -24px rgba(29,20,48,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-text); font-size: 18px; line-height: 1.65; color: var(--ink); background: var(--sand); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, .display { font-family: var(--font-display); font-weight: 600; color: var(--plum); line-height: 1.1; letter-spacing: -0.012em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); margin: 0 0 .45em; font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 1.7em 0 .55em; }
h3 { font-size: 1.35rem; margin: 1.4em 0 .4em; line-height: 1.2; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--peach); 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 */
.topbar { background: var(--plum); color: var(--mist-on-dark); font-size: .92rem; padding: .5rem 0; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.topbar a { color: var(--mist-on-dark); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar span em { font-style: italic; font-family: var(--font-display); color: var(--peach); font-size: 1rem; }
.badge { display: inline-block; background: var(--peach); color: var(--plum); padding: .14rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; margin-right: .6rem; }

/* Header */
header.site { background: var(--cream); border-bottom: 1px solid var(--rule); padding: .95rem 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.65rem; font-weight: 600; color: var(--plum); text-decoration: none; letter-spacing: -.01em; line-height: 1; display: flex; align-items: center; gap: .65rem; }
.brand:hover { color: var(--plum); }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand small { display: block; font-family: var(--font-text); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: .3rem; }
nav.primary ul { display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav.primary a { color: var(--plum); text-decoration: none; font-weight: 600; font-size: .98rem; padding: .45rem .85rem; border-radius: 999px; display: inline-block; }
nav.primary a:hover { background: var(--sand-deep); color: var(--plum); }
nav.primary a.active { background: var(--plum); color: #fff; }
@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: .75rem 1.7rem; font-family: var(--font-text); font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-ghost:hover { background: var(--plum); color: #fff; }
.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 .85rem; border-radius: 999px; 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: copy on sand, tall arched photo window with a sunset-coloured survey seal */
.hero { position: relative; background: var(--sand); color: var(--ink); padding: var(--s7) 0 var(--s7); overflow: hidden; }
.hero .container { display: grid; gap: var(--s6); align-items: center; }
.hero figure.hero-media { position: relative; margin: 0; order: -1; }
.hero figure.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 28% 50%; border-radius: 999px 999px var(--r) var(--r); background: var(--plum-2); }
.hero .hero-copy-wrap { order: 0; }
.hero h1 { color: var(--plum); max-width: 17ch; }
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: var(--s5); max-width: 58ch; }
.hero .section-eyebrow { color: var(--teal); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-aside { position: absolute; left: -6px; bottom: 6%; width: 148px; height: 148px; border-radius: 50%; background: var(--peach); color: var(--plum); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: rotate(-8deg); box-shadow: var(--shadow-lg); padding: 10px; }
.hero-aside .big { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.hero-aside .lab { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.15; margin-top: .25rem; }
.hero-aside p { display: none; }
@media (min-width: 960px) {
  .hero { padding: var(--s8) 0; }
  .hero .container { grid-template-columns: 1.15fr .85fr; gap: var(--s8); }
  .hero figure.hero-media { order: 1; }
  .hero figure.hero-media img { aspect-ratio: 4 / 5; }
  .hero-aside { left: -36px; bottom: 9%; width: 172px; height: 172px; }
  .hero-aside .big { font-size: 3rem; }
}

/* Proof bar: pill chips */
.proofbar { background: var(--plum); padding: var(--s5) 0; }
.proofbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem 1rem; justify-content: center; }
.proofbar li { display: inline-flex; align-items: center; gap: .55rem; background: var(--plum-2); color: #fff; border: 1px solid var(--plum-3); border-radius: 999px; padding: .5rem 1.1rem .5rem .8rem; font-weight: 600; font-size: .98rem; line-height: 1.2; }
.proofbar svg { width: 24px; height: 24px; flex: none; color: var(--peach); }

/* Inner hero: sand band, soft wave rule, optional arched photo */
.hero.hero-light { background: var(--sand); padding: var(--s7) 0 var(--s7); border-bottom: 1px solid var(--rule); }
.hero.hero-light .container { padding-bottom: 0; display: grid; gap: var(--s5); align-items: center; }
.hero.hero-light h1 { font-size: clamp(2.1rem, 4.8vw, 3.4rem); max-width: 22ch; }
.hero.hero-light .lede { color: var(--ink-soft); font-size: 1.12rem; max-width: 64ch; }
.hero-plate { margin: 0; }
.hero-plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 999px 999px var(--r) var(--r); background: var(--plum-2); }
@media (min-width: 960px) {
  .hero.hero-light .container.has-plate { grid-template-columns: 1.4fr .6fr; gap: var(--s7); }
  .hero-plate img { aspect-ratio: 4 / 5; }
}

/* Sections */
section { padding: var(--s8) 0; background: var(--sand); }
section.tight { padding: var(--s6) 0; }
section.alt { background: var(--cream); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-eyebrow { font-family: var(--font-text); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--teal); margin: 0 0 .7em; display: flex; align-items: center; gap: .6rem; }
.section-eyebrow::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--peach); flex: none; box-shadow: 0 0 0 3px var(--peach-soft); }

/* 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 { grid-template-columns: repeat(5, 1fr); gap: var(--s4); } }

/* Soft tiles */
.card { position: relative; background: var(--cream); border: 1px solid var(--rule); padding: var(--s5); border-radius: var(--r); transition: transform .15s, box-shadow .15s, border-color .15s; }
section.alt .card { background: var(--sand); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.card h3 { margin: .3em 0 .4em; font-size: 1.2rem; }
.card p { font-size: .98rem; color: var(--ink-soft); }
.card a.card-link { color: var(--plum); text-decoration: none; }
.card a.card-link:hover { color: var(--teal); }
.card .card-icon { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--plum); color: var(--peach); margin-bottom: var(--s3); }
.card .card-icon svg { width: 28px; height: 28px; display: block; }
.card .more { display: inline-block; margin-top: .3rem; font-weight: 700; font-size: .95rem; color: var(--teal); text-decoration: none; }
.card .more::after { content: ' \2192'; }
.card .section-eyebrow { margin-bottom: .3rem; }

/* Promise band */
.guarantees { background: var(--plum); color: #fff; border: 0; }
.guarantees h2 { color: #fff; }
.guarantees .section-eyebrow { color: var(--peach); }
.guarantees .section-eyebrow::before { box-shadow: 0 0 0 3px var(--plum-3); }
.guarantees .promise { background: var(--plum-2); padding: var(--s6) var(--s5); border-radius: var(--r); border: 1px solid var(--plum-3); }
.guarantees .promise h3 { margin: .7rem 0 .5em; font-size: 1.3rem; 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: 52px; height: 52px; border-radius: 50%; background: var(--peach); color: var(--plum); align-items: center; justify-content: center; }
.guarantees .promise .icon svg { width: 28px; height: 28px; }
.guarantee-pill { display: inline-block; background: var(--plum); color: var(--peach-soft); padding: .3rem .9rem; border-radius: 999px; font-size: .88rem; font-weight: 600; margin: .5rem .5rem 0 0; }

/* Photo figures */
.photo { margin: 0; }
.photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); background: var(--plum-2); }
.photo figcaption { font-family: var(--font-display); font-style: italic; color: var(--ink-soft); font-size: .98rem; padding: .6rem .3rem 0; }
.stack { display: grid; gap: var(--s5); align-self: start; }

/* Panel */
.panel { background: var(--plum); color: #fff; padding: var(--s6); border-radius: var(--r); }
.panel h2 { color: #fff; margin-top: 0; }
.panel p { color: var(--mist-on-dark); }
.panel .section-eyebrow { color: var(--peach) !important; }
.panel a { color: var(--peach-soft); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.panel a:hover { color: #fff; }

/* Pricing table */
table.pricing { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.4rem 0 1.8rem; font-size: 1rem; background: var(--cream); border: 1px solid var(--rule-dark); border-radius: 14px; overflow: hidden; }
table.pricing th, table.pricing td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.pricing tbody tr:last-child td { border-bottom: 0; }
table.pricing thead th { background: var(--plum); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
table.pricing td strong { color: var(--plum); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
table.pricing caption { text-align: left; font-weight: 700; color: var(--plum); margin-bottom: .4rem; }
@media (max-width: 600px) { table.pricing { display: block; overflow-x: auto; } }

/* Footer */
footer.site { background: var(--plum); color: var(--mist-on-dark); padding: var(--s8) 0 var(--s6); margin-top: 0; border-radius: 40px 40px 0 0; }
footer.site h4 { color: #fff; font-size: 1.1rem; margin: 0 0 .8em; }
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(--peach); 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(--plum-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-size: .88rem; color: var(--ink-soft); margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
article.guide .meta a { color: var(--teal); }
article.guide blockquote { border-left: 4px solid var(--peach); margin: 1.8em 0; padding: .4em 0 .4em 1.4em; font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--plum-3); }
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(--cream); border: 1px solid var(--rule-dark); border-left: 6px solid var(--peach); padding: var(--s5); margin: 2em 0; border-radius: 0 var(--r) var(--r) 0; }
.callout h4 { margin: 0 0 .4em; color: var(--plum); font-size: 1.2rem; }
.callout.note { border-left-color: var(--teal); }
.prose > h2:first-child { margin-top: 0; }

/* Breadcrumb */
.crumb { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1rem; font-weight: 500; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--teal); text-decoration: underline; }

/* Contact form */
.form-grid { display: grid; gap: 1.2rem; max-width: 600px; background: var(--cream); border: 1px solid var(--rule-dark); border-radius: var(--r); 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(--plum); }
input, textarea, select { width: 100%; padding: .8rem 1rem; border: 1px solid var(--ink-soft); background: #fff; font-family: inherit; font-size: 1rem; color: var(--ink); border-radius: 12px; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--peach); outline-offset: 0; border-color: var(--plum); }
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; border-radius: 12px; }
.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: 9px; width: 9px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 4px var(--peach-soft); margin: 0 0 2rem; }
.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: .8rem; }
  nav.primary a { padding: .35rem .7rem; font-size: .95rem; }
  .brand { font-size: 1.45rem; }
  .panel { padding: var(--s5); }
  .form-grid { padding: var(--s5); }
  .btn { width: 100%; }
  footer.site { border-radius: 28px 28px 0 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
