/* Fencing Specialist — the national fencing knowledge site.
   Character: a field guide you would keep in the ute. Warm paper, ink navy,
   brass accent, serif display over humanist body. Deliberately unlike the
   flagship's industrial navy/hi-vis: this site's job is reading, not quoting. */

@font-face { font-family: "Fraunces"; font-weight: 500 800; font-style: normal; font-display: swap;
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 300 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/sourcesans3-var.woff2") format("woff2"); }

:root {
  --paper: #faf7f1;
  --paper-deep: #f1ebe0;
  --card: #ffffff;
  --ink: #1f2937;
  --ink-strong: #101826;
  --ink-soft: #52606f;
  --navy: #14263f;
  --brass: #a1651c;
  --brass-bright: #c07a20;
  --eucalypt: #47624e;
  --line: #e2d9c8;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 10px;
  --shadow-1: 0 1px 2px rgba(31, 41, 55, .07), 0 6px 20px rgba(31, 41, 55, .07);
  --shadow-2: 0 2px 6px rgba(31, 41, 55, .1), 0 16px 40px rgba(31, 41, 55, .12);
  --wrap: 1120px;
  --wrap-narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0; font-family: var(--font-body); font-size: 1.09rem; line-height: 1.68;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brass-bright); }
::placeholder { color: rgba(82, 96, 111, .4); }
:focus-visible { outline: 3px solid var(--brass-bright); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 640; font-variation-settings: "opsz" 100; line-height: 1.12; color: var(--ink-strong); margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.05em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.wrap-narrow { max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(2.8rem, 6.5vw, 5rem); }
.section-tight { padding-block: clamp(1.8rem, 4.5vw, 3rem); }

.kicker { font-family: var(--font-body); font-weight: 600; font-size: .84rem; letter-spacing: .16em; text-transform: uppercase; color: var(--eucalypt); }
.lede { font-size: 1.22rem; color: var(--ink-soft); max-width: 60ch; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-body);
  font-weight: 600; font-size: 1.02rem; text-decoration: none; border-radius: 999px;
  padding: .68rem 1.5rem; border: 1.5px solid transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-primary { background: var(--navy); color: var(--paper); }
.btn-primary:hover { background: #1d3557; color: var(--paper); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--paper); }

/* header — white masthead with a rule, like a journal (white so the supplied
   logo PNG sits on its own background colour, no re-cut needed) */
.masthead { background: var(--card); border-bottom: 2px solid var(--navy); position: sticky; top: 0; z-index: 60; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }
.brand img { width: 188px; height: auto; }
.nav-primary { display: flex; align-items: center; gap: .2rem; }
.nav-primary a:not(.btn) {
  font-weight: 600; font-size: 1rem; color: var(--ink-strong); text-decoration: none;
  padding: .5rem .7rem; border-radius: 6px;
}
.nav-primary a:not(.btn):hover { background: var(--paper); color: var(--ink-strong); }
body[data-page="guides"] .nav-primary a[href="/blog/"],
body[data-page="services"] .nav-primary a[href="/fencing-services/"],
body[data-page="locations"] .nav-primary a[href="/locations/"],
body[data-page="about"] .nav-primary a[href="/about/"] { box-shadow: inset 0 -3px 0 var(--brass); color: var(--ink-strong); }
.nav-primary a.btn-primary { color: var(--paper); margin-left: .4rem; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--ink-strong); }
@media (max-width: 1023px) {
  .nav-toggle { display: block; }
  .nav-primary { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--card); border-bottom: 2px solid var(--navy); padding: .5rem 1rem 1rem; box-shadow: var(--shadow-2); }
  .nav-primary.open { display: flex; }
  .nav-primary a:not(.btn) { padding: .8rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-primary a.btn-primary { margin: .8rem .5rem 0; color: var(--paper); }
  .brand img { width: 158px; }
}

/* hero + page heads — paper, big serif, brass rule */
.page-head { padding-block: clamp(2.4rem, 6vw, 4.6rem); background: var(--paper); }
.page-head .rule { width: 64px; height: 4px; background: var(--brass); margin: 1.1rem 0 0; }
.crumbs { font-size: .88rem; color: var(--ink-soft); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--brass); text-decoration: underline; }

/* cards — journal entries */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.gcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow .18s ease, transform .18s ease; }
.gcard:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); color: inherit; }
.gcard-media { aspect-ratio: 16/9; background: var(--paper-deep); }
.gcard-media img { width: 100%; height: 100%; object-fit: cover; }
.gcard-body { padding: 1.2rem 1.3rem 1.35rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.gcard-body h3 { font-size: 1.32rem; margin: 0; }
.gcard-body p { margin: 0; color: var(--ink-soft); font-size: .99rem; }
.chip { align-self: flex-start; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--eucalypt); background: #eef0e9; border-radius: 999px; padding: .18rem .7rem; }
.gcard-more { margin-top: auto; padding-top: .55rem; font-weight: 600; font-size: .92rem; color: var(--brass); }

/* article prose */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.1em; }
.prose h3 { margin-top: 1.7em; }
.prose img { border-radius: var(--radius); box-shadow: var(--shadow-1); margin-block: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.6rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--brass); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-soft); }
.prose blockquote p:last-child { margin: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.6rem 0; font-size: .97rem; background: var(--card); }
.prose th { font-weight: 600; text-align: left; background: var(--navy); color: var(--paper); }
.prose th, .prose td { padding: .6rem .8rem; border: 1px solid var(--line); }
.prose tr:nth-child(even) td { background: var(--paper); }
.table-scroll { overflow-x: auto; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.5rem; }

/* pull panel for the flagship handoff (the one commercial surface per page) */
.crew-panel { background: var(--navy); color: var(--paper); border-radius: var(--radius); padding: 1.5rem 1.7rem; margin-top: 2.6rem; }
.crew-panel h2, .crew-panel h3 { color: var(--paper); margin-top: 0; }
.crew-panel p { color: #cdd8e4; }
.crew-panel a.btn-primary { background: var(--brass-bright); color: #14263f; }
.crew-panel a.btn-primary:hover { background: #d18a2e; color: #14263f; }
.crew-panel a:not(.btn) { color: #e8c894; }

/* forms */
label { font-weight: 600; font-size: .95rem; color: var(--ink-strong); display: block; margin-bottom: .3rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid #c9bda6; border-radius: 8px; padding: .65rem .8rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brass); outline: 2px solid rgba(161,101,28,.22); outline-offset: 0; }
textarea { min-height: 130px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
[data-lead-success], [data-lead-error] { padding: 1rem 1.2rem; border-radius: 8px; font-weight: 500; }
[data-lead-success] { background: #e9f2e7; border: 1px solid #b3d1ab; color: #285430; }
[data-lead-error] { background: #f7e8e4; border: 1px solid #e0b3a6; color: #7c2d12; }
.form-note { font-size: .9rem; color: var(--ink-soft); }

/* footer — deep paper with navy rule */
.site-foot { background: var(--card); border-top: 2px solid var(--navy); margin-top: 2rem; }
.site-foot a:not(.btn) { color: var(--ink); text-decoration: none; }
.site-foot a:not(.btn):hover { color: var(--brass); text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2rem; padding-block: 2.6rem 1.8rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand img { width: 180px; margin-bottom: .8rem; }
.foot-brand p { font-size: .95rem; color: var(--ink-soft); max-width: 36ch; }
.foot-h { font-weight: 600; font-size: .84rem; letter-spacing: .14em; text-transform: uppercase; color: var(--eucalypt); margin: 0 0 .8rem; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .98rem; }
.foot-legal { border-top: 1px solid var(--line); padding-block: 1.1rem; font-size: .86rem; color: var(--ink-soft); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* featured guide (home) */
.feature { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; }
.feature:hover { box-shadow: var(--shadow-2); color: inherit; }
.feature img { width: 100%; height: 100%; object-fit: cover; }
.feature > div { padding: clamp(1.4rem, 3vw, 2.4rem); }
@media (max-width: 780px) { .feature { grid-template-columns: 1fr; } }

/* misc */
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.4rem; font-weight: 600; }
.pagination .pg { color: var(--ink-soft); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--brass-bright); color: #14263f; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.sticky-aside { position: sticky; top: 92px; }
.notice { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--eucalypt); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.3rem; margin: 1.4rem 0; }
.checklist { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .55rem; }
.checklist li { display: flex; gap: .6rem; align-items: baseline; }
.checklist li::before { content: "✓"; color: var(--eucalypt); font-weight: 700; flex: 0 0 auto; }
.refs { border-top: 2px solid var(--line); margin-top: 2.6rem; padding-top: 1.2rem; font-size: .94rem; color: var(--ink-soft); }
.refs ol { padding-left: 1.2rem; }

/* third-party chat widget: own stacking context BELOW site overlays (kernel README) */
l2-chat { position: relative; z-index: 50; }
