/* ==========================================================================
   Better House Space — Global Stylesheet
   Structure: 1) Tokens 2) Base 3) Layout 4) Header/Footer 5) Components
              6) Page blocks 7) Forms 8) Utilities 9) Responsive
   ========================================================================== */

/* 1) Design tokens ------------------------------------------------------- */
:root {
  --ink: #10231f;
  --ink-soft: #3d534d;
  --ink-muted: #6b7d78;
  --brand: #1f6f5c;
  --brand-dark: #14503f;
  --brand-tint: #e7f2ee;
  --accent: #c9703f;
  --accent-tint: #fdeee5;
  --sand: #f8f5ef;
  --sand-deep: #efe8dc;
  --white: #ffffff;
  --line: #e2ddd2;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(16, 35, 31, 0.06);
  --shadow: 0 14px 38px rgba(16, 35, 31, 0.1);
  --shadow-lg: 0 26px 60px rgba(16, 35, 31, 0.16);
  --wrap: 1180px;
  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 2) Base ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
a:hover { color: var(--brand-dark); }

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

ul, ol { margin: 0 0 1.15em; padding-left: 1.15em; }
li { margin-bottom: 0.4em; }

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

::selection { background: var(--brand); color: #fff; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* 3) Layout -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
}

.section { padding: 84px 0; }
.section--sand { background: var(--sand); }
.section--tint { background: var(--brand-tint); }
.section--deep { background: var(--ink); color: #cfdcd8; }
.section--deep h2,
.section--deep h3 { color: #fff; }
.section--tight { padding: 60px 0; }

.section-head {
  max-width: 720px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head p { color: var(--ink-muted); font-size: 1.05rem; }
.section--deep .section-head p { color: #a9bdb8; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 7px 15px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.section--deep .eyebrow { background: rgba(201, 112, 63, 0.18); color: #f0b391; }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* 4) Header / Footer ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--brand); }
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--brand);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-text small {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.primary-nav { display: flex; align-items: center; gap: 26px; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.primary-nav a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.primary-nav a.is-active { color: var(--brand-dark); background: var(--brand-tint); }

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  padding: 11px 10px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-footer { background: var(--ink); color: #a9bdb8; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 70px 0 52px;
}
.site-footer h3 {
  color: #fff;
  font-size: 1.02rem;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.site-footer p { color: #9fb2ad; font-size: 0.94rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #bccbc7; font-size: 0.94rem; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-text strong { color: #fff; }
.site-footer .brand-text small { color: #8fa39e; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { flex: 0 0 auto; margin-top: 4px; color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }

/* 5) Components ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 0.96rem;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(31, 111, 92, 0.28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(201, 112, 63, 0.28); }
.btn-accent:hover { background: #b25f33; color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 11px 20px; font-size: 0.88rem; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #cfd9d4; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.96rem; color: var(--ink-muted); }

.icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--brand-tint);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.icon-badge svg { width: 26px; height: 26px; }
.card--accent .icon-badge { background: var(--accent-tint); color: var(--accent); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.92rem;
}
.link-arrow svg { transition: transform 0.2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 100px;
}

.check-list { list-style: none; padding: 0; margin: 0 0 1.3rem; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list svg { flex: 0 0 auto; margin-top: 5px; color: var(--brand); }

/* 6) Page blocks --------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(150deg, #f2f7f5 0%, var(--sand) 62%);
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 33em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 30px; }
.hero-media { position: relative; }
.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  width: 100%;
}
.hero-chip {
  position: absolute;
  bottom: -24px;
  left: -18px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  max-width: 270px;
  border: 1px solid var(--line);
}
.hero-chip strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.02rem; margin-bottom: 3px; }
.hero-chip span { font-size: 0.86rem; color: var(--ink-muted); line-height: 1.5; display: block; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.trust-row li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0;
}
.trust-row svg { color: var(--brand); flex: 0 0 auto; }

.media-split img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 5 / 4;
  object-fit: cover;
  width: 100%;
}

.step-list { counter-reset: none; list-style: none; padding: 0; margin: 0; }
.step-list li {
  position: relative;
  padding: 0 0 30px 54px;
  border-left: 2px dashed var(--line);
  margin-left: 17px;
  margin-bottom: 0;
}
.step-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.step-list li::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px var(--white);
}
.step-list li:nth-child(2)::before { background: var(--accent); }
.step-list li:nth-child(3)::before { background: var(--brand-dark); }
.step-list li:nth-child(4)::before { background: #7a8f89; }
.step-list h4 { margin-bottom: 6px; font-family: var(--serif); font-size: 1.12rem; }
.step-list p { font-size: 0.95rem; color: var(--ink-muted); margin: 0; }

.band {
  background: var(--brand-dark);
  color: #d5e5e1;
  border-radius: var(--radius-lg);
  padding: 52px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow);
}
.band h2 { color: #fff; margin-bottom: 12px; }
.band p { color: #bdd2cd; margin: 0; }
.band-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.blog-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.blog-card-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1 1 auto; }
.blog-card-body h3 { font-size: 1.16rem; margin-bottom: 10px; }
.blog-card-body h3 a { color: var(--ink); }
.blog-card-body h3 a:hover { color: var(--brand); }
.blog-card-body p { font-size: 0.94rem; color: var(--ink-muted); }
.blog-card-body .link-arrow { margin-top: auto; padding-top: 16px; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--brand-tint);
  border-radius: 100px;
  padding: 6px 13px;
  margin-bottom: 14px;
}
.tag--accent { color: var(--accent); background: var(--accent-tint); }

.page-head {
  background: linear-gradient(150deg, #f2f7f5 0%, var(--sand) 70%);
  padding: 76px 0 66px;
  text-align: center;
}
.page-head p { max-width: 44em; margin: 0 auto; color: var(--ink-soft); font-size: 1.05rem; }
.breadcrumbs {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 10px; color: #b9c4c0; }

.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.info-card h3 { font-size: 1.08rem; }
.info-card p { font-size: 0.94rem; color: var(--ink-muted); margin: 0; }
.info-card a { word-break: break-word; }

.legal-body { max-width: 860px; margin: 0 auto; }
.legal-body h2 { margin-top: 2.2em; font-size: 1.5rem; }
.legal-body h3 { margin-top: 1.5em; font-size: 1.12rem; }
.legal-body li { color: var(--ink-soft); }
.legal-note {
  background: var(--sand);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  margin-bottom: 34px;
  font-size: 0.96rem;
}

.article-hero img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.article-body { max-width: 780px; margin: 0 auto; }
.article-body h2 { margin-top: 2em; font-size: 1.55rem; }
.article-body h3 { margin-top: 1.6em; }
.article-body p { font-size: 1.045rem; }
.article-body blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  background: var(--brand-tint);
  border-radius: var(--radius);
  border-left: 4px solid var(--brand);
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}
.article-body blockquote p { margin: 0; font-size: 1.1rem; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--sand);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 44px;
}
.author-box .avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.3rem;
  flex: 0 0 auto;
}
.author-box p { font-size: 0.93rem; margin: 0; color: var(--ink-muted); }
.author-box strong { color: var(--ink); display: block; }

.accordion { border-top: 1px solid var(--line); }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 22px 44px 22px 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  position: relative;
}
.accordion-trigger::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--brand);
  line-height: 1;
  transition: transform 0.2s ease;
}
.accordion-trigger[aria-expanded="true"]::after { content: "\2013"; }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-panel-inner { padding: 0 4px 24px; font-size: 0.96rem; color: var(--ink-muted); }

/* 7) Forms --------------------------------------------------------------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 42px 42px 46px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; margin-bottom: 22px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.field .hint { font-size: 0.82rem; color: var(--ink-muted); margin: 6px 0 0; font-weight: 400; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: #a9b5b1; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 111, 92, 0.14);
}
.field textarea { min-height: 150px; resize: vertical; }
.field.error input,
.field.error select,
.field.error textarea { border-color: #c0453c; box-shadow: 0 0 0 4px rgba(192, 69, 60, 0.12); }
.error-text { color: #c0453c; font-size: 0.83rem; margin: 7px 0 0; font-weight: 600; display: none; }
.field.error .error-text { display: block; }

.check {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 17px 18px;
  margin-bottom: 24px;
}
.check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
  cursor: pointer;
}
.check label { font-size: 0.91rem; font-weight: 400; color: var(--ink-soft); line-height: 1.6; cursor: pointer; }
.check.error { border-color: #c0453c; background: #fdf3f2; }
.check .error-text { display: none; }
.check.error .error-text { display: block; }

.form-note { font-size: 0.86rem; color: var(--ink-muted); margin: 18px 0 0; }

.form-alert {
  display: none;
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin-bottom: 26px;
  font-size: 0.96rem;
  font-weight: 600;
}
.form-alert.show { display: block; }
.form-alert.success { background: var(--brand-tint); color: var(--brand-dark); border: 1px solid #bcdcd2; }
.form-alert.warn { background: var(--accent-tint); color: #8f4a20; border: 1px solid #f2cdb6; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .icon-badge { margin: 0; width: 46px; height: 46px; border-radius: 12px; }
.contact-list .icon-badge svg { width: 22px; height: 22px; }
.contact-list strong { display: block; color: var(--ink); font-size: 0.98rem; }

/* 8) Utilities ----------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 34px; }
.mt-3 { margin-top: 52px; }
.lead { font-size: 1.1rem; }
.muted { color: var(--ink-muted); }
.nowrap { white-space: nowrap; }
.hide-visually {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease;
  z-index: 90;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--brand-dark); transform: translateY(-3px); }

/* 9) Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
  .hero-grid { grid-template-columns: 1fr; gap: 46px; }
  .hero-chip { left: 0; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .band { grid-template-columns: 1fr; padding: 40px 34px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px 22px 24px;
    display: none;
  }
  .primary-nav.open { display: flex; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .primary-nav a { display: block; padding: 13px 14px; border-radius: var(--radius-sm); font-size: 1rem; }
  .nav-cta { width: 100%; margin-top: 8px; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 62px 0; }
  .hero { padding: 62px 0 74px; }
  .form-card { padding: 30px 22px 34px; }
  .page-head { padding: 56px 0 48px; }
  .author-box { flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-chip { position: static; margin-top: 18px; max-width: 100%; }
  .band { padding: 32px 24px; }
  .card { padding: 26px 22px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
