/* ==========================================================================
   bettercontent.agency

   Palette lifted from the Hestia customizer values in the mirror's inline CSS:
     #ce3966  accent           (14 uses, plus rgba at .12/.14/.2/.42)
     #a81d84  header gradient
     #9c27b0  secondary purple
     #d2d2d2  #E5E5E5          borders and rules
     #363537  #32373c          body and heading ink
   Quicksand 300/400/500/700 - the only family the customizer actually set.
   Hestia's untouched Roboto / Roboto Slab defaults are not loaded.
   ========================================================================== */

:root {
  --accent:      #ce3966;
  --accent-dark: #b02d55;
  --purple:      #a81d84;
  --purple-2:    #9c27b0;
  --ink:         #32373c;
  --body:        #363537;
  --muted:       #6b6870;
  --border:      #e5e5e5;
  --rule:        #d2d2d2;
  --bg:          #ffffff;
  --bg-soft:     #faf7f9;
  --overlay:     #34142d;
  --danger:      #b3261e;
  --success:     #0f7a4a;
  --wrap:        1140px;
  --wrap-narrow: 760px;
  --radius:      6px;
  --shadow:      0 14px 40px rgba(52, 20, 45, .12);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/*
 * scroll-behavior: smooth is applied to in-page anchor CLICKS only, never to
 * the root. On the root it also animates the browser's load-time jump to a
 * fragment, and that animation is routinely cut short - after the contact form
 * POSTs back to /#contact, the visitor was left at the top of the page with the
 * "your message has been sent" panel 2,000px below them, looking at a page that
 * appeared to have done nothing. Scoping it here keeps the nicety without
 * breaking the confirmation.
 */
@media (prefers-reduced-motion: no-preference) {
  .js-smooth-scroll { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: Quicksand, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  background: var(--bg);
}

img, picture, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--purple); }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .6em;
}
h1 { font-size: 2.3rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1.25em; }

ul, ol { padding-left: 1.2em; }
li { margin-bottom: .4em; }

address { font-style: normal; line-height: 1.85; }
code { background: var(--bg-soft); padding: .1em .35em; border-radius: 3px; font-size: .92em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  border: 2px solid var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 12px 30px;
  border-radius: var(--radius);
  text-align: center;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(206, 57, 102, .28);
}
.btn:hover, .btn:focus {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
.btn-ghost {
  background: transparent; color: var(--accent); box-shadow: none;
}
.btn-ghost:hover, .btn-ghost:focus { background: var(--accent); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-submit { font-size: 1.05rem; padding: 14px 34px; }

/* ---------- header / nav ---------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; padding-top: 12px; padding-bottom: 12px;
}

.site-logo { margin: 0; line-height: 0; }
.site-logo img { width: 170px; height: auto; }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block; width: 18px; height: 2px; background: var(--ink); position: relative;
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after  { top: 6px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 9px 14px; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.site-nav a:hover, .site-nav a:focus { background: var(--bg-soft); color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-bottom: 8px; }
  .site-nav a { padding: 11px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
}

/* ---------- hero ---------- */

.hero {
  background-size: cover; background-position: center;
  color: #fff; text-align: center;
  padding: 96px 0 128px;
}
.hero-inner { max-width: 760px; }
.hero h1 { color: #fff; font-size: 2.9rem; margin-bottom: .25em; }
.hero-sub {
  font-size: 1.35rem; font-weight: 300; margin-bottom: 1.6em; color: rgba(255,255,255,.94);
}
.hero-cta { margin: 0; }

@media (max-width: 640px) {
  .hero { padding: 64px 0 88px; }
  .hero h1 { font-size: 2.05rem; }
  .hero-sub { font-size: 1.12rem; }
}

/* the raised card the Hestia layout floats over the hero */
.main-raised {
  max-width: 1180px;
  margin: -60px auto 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
@media (max-width: 900px) {
  .main-raised { margin: -40px 12px 0; }
}

/* ---------- sections ---------- */

.features, .home-blog { padding: 64px 0; }
.home-blog { background: var(--bg-soft); }

.section-title { text-align: center; font-size: 2rem; margin-bottom: .3em; }
.section-intro {
  text-align: center; max-width: 720px; margin: 0 auto 2.4em;
  font-size: 1.1rem; color: var(--muted);
}
.section-body {
  max-width: 720px; margin: -1.6em auto 2.6em; text-align: center;
  color: var(--muted);
}
.section-body p:last-child { margin-bottom: 0; }

.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px;
}
.feature { margin: 0; text-align: center; }
.feature h3 { margin-bottom: .5em; }
.feature h3::before {
  content: ""; display: block; width: 46px; height: 4px; margin: 0 auto 18px;
  background: linear-gradient(90deg, var(--purple), var(--accent)); border-radius: 2px;
}
.feature p { color: var(--muted); margin: 0; }

@media (max-width: 820px) {
  .feature-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- cards ---------- */

.card-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-bottom: 2.4em;
}
@media (max-width: 1000px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-thumb { display: block; line-height: 0; }
.card-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.06rem; line-height: 1.35; margin-bottom: .5em; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover, .card-body h3 a:focus { color: var(--accent); }
.card-body p { font-size: .93rem; color: var(--muted); margin-bottom: .8em; }
.card-body .more { margin: auto 0 0; font-size: .9rem; font-weight: 600; }
.card-body .more a { text-decoration: none; }

.entry-meta {
  font-size: .82rem; color: var(--muted); margin-bottom: .5em;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.entry-meta a { text-decoration: none; }
.entry-meta .sep { margin: 0 .5em; }

/* ---------- contact section ---------- */

.contact-section {
  background-size: cover; background-position: center;
  color: #fff; padding: 68px 0 76px;
}
.contact-section .section-title { color: #fff; margin-bottom: 1.6em; }

.contact-cols {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start;
}
@media (max-width: 900px) {
  .contact-cols { grid-template-columns: 1fr; gap: 34px; }
}

.contact-block { margin-bottom: 32px; }
.contact-block h3 { color: #fff; font-size: 1.1rem; margin-bottom: .4em; }
.contact-block address { color: rgba(255,255,255,.92); }
.contact-block a { color: #fff; }
.contact-block a:hover, .contact-block a:focus { color: #ffd7e4; }
.hours { color: rgba(255,255,255,.72); font-size: .92rem; }

/* ---------- forms ---------- */

.contact-form-wrap {
  background: #fff; color: var(--body);
  border-radius: var(--radius); padding: 28px 28px 30px;
  box-shadow: var(--shadow);
}
.form-legend { margin-top: 0; font-size: 1.3rem; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-weight: 600; font-size: .92rem;
  margin-bottom: 5px; color: var(--ink);
}
.field .req { color: var(--accent); }

.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--body);
  padding: 11px 13px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(206, 57, 102, .2); outline-offset: 0;
}

/* honeypot: off-screen for people, still in the DOM for bots */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.form-consent { font-size: .84rem; color: var(--muted); margin: 4px 0 16px; }

.form-errors, .form-success { border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.form-errors {
  background: #fdecea; border: 1px solid #f5c6c2; color: var(--danger);
}
.form-errors ul { margin: .4em 0 0; }
.form-errors p { margin: 0; }
.form-success {
  background: #e9f7f0; border: 1px solid #b7e2ce; color: var(--success);
}
.form-success h3 { color: var(--success); margin-bottom: .4em; }
.form-success:focus { outline: 3px solid var(--success); outline-offset: 3px; }
.form-success p { margin: 0; color: #2a6b4f; }

/* ---------- article + listing ---------- */

.site-main { padding-bottom: 8px; }
.layout { padding-top: 44px; padding-bottom: 56px; }
.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
@media (max-width: 980px) {
  .has-sidebar { grid-template-columns: 1fr; gap: 34px; }
}

.entry-header { margin-bottom: 24px; }
.entry-featured { margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; }
.entry-content h2 { margin-top: 1.7em; font-size: 1.45rem; }
.entry-content figure { margin: 1.8em 0; }
.entry-content img { border-radius: var(--radius); margin: 0 auto; }
.entry-content ul.stat-list {
  background: var(--bg-soft); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px 18px 40px; margin: 1.6em 0;
}
.entry-content ul.stat-list li:last-child { margin-bottom: 0; }

.entry-cta {
  margin-top: 2.4em; padding: 20px 24px;
  background: var(--bg-soft); border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}
.entry-cta p { margin: 0; }

.page-intro { color: var(--muted); font-size: 1.06rem; }

.post-list { list-style: none; margin: 24px 0 0; padding: 0; }
.post-list > li {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px;
  padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--border);
}
.post-list > li:last-child { border-bottom: 0; margin-bottom: 0; }
.post-list img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.post-list h2 { font-size: 1.35rem; margin-bottom: .35em; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover, .post-list h2 a:focus { color: var(--accent); }
.post-list .more { font-weight: 600; margin: 0; }
.post-list .more a { text-decoration: none; }
.post-list-plain > li { grid-template-columns: 1fr; }

@media (max-width: 640px) {
  .post-list > li { grid-template-columns: 1fr; gap: 14px; }
}

.empty-state {
  background: var(--bg-soft); border-radius: var(--radius); padding: 28px; text-align: center;
}

/* ---------- sidebar ---------- */

/* The posts run to ~1,100 words against a ~625px sidebar, so without this the
   right-hand column is empty for most of the scroll. */
@media (min-width: 981px) {
  .sidebar { position: sticky; top: 92px; }
}

.sidebar .widget {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 22px;
}
.widget-title {
  font-size: 1rem; text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 1em; padding-bottom: .6em; border-bottom: 2px solid var(--accent);
}
.recent-posts { list-style: none; margin: 0; padding: 0; }
.recent-posts li { display: flex; gap: 12px; margin-bottom: 16px; }
.recent-posts li:last-child { margin-bottom: 0; }
.recent-posts img { border-radius: 4px; width: 75px; height: 75px; object-fit: cover; }
.recent-posts a { font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--ink); line-height: 1.35; display: block; }
.recent-posts a:hover, .recent-posts a:focus { color: var(--accent); }
.recent-posts time { display: block; font-size: .78rem; color: var(--muted); margin-top: 3px; }

.sidebar .notice { background: var(--bg-soft); margin: -20px -22px; padding: 22px; border-radius: var(--radius); }
.sidebar .notice p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: rgba(255,255,255,.78); margin-top: 40px; }
.footer-top { padding: 48px 0 36px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr; gap: 40px; }
@media (max-width: 860px) { .footer-cols { grid-template-columns: 1fr; gap: 30px; } }

.site-footer .widget-title { color: #fff; border-bottom-color: var(--accent); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: var(--accent); text-decoration: underline; }
.site-footer address strong { color: #fff; }
.site-footer .hours { color: rgba(255,255,255,.6); }

.recent-list, .footer-links ul { list-style: none; margin: 0; padding: 0; }
.recent-list li { margin-bottom: 14px; }
.recent-list time { display: block; font-size: .78rem; color: rgba(255,255,255,.55); }
.footer-links li { margin-bottom: 8px; }

.footer-bar {
  border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0;
  font-size: .87rem;
}
.footer-bar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-bar p { margin: 0; }
.footer-bar nav { display: flex; gap: 18px; flex-wrap: wrap; }
