/* =========================================================
   Rapid Home Revamp — site styles
   ========================================================= */

:root {
  --brand: #0b4f4a;
  --brand-600: #0a6059;
  --brand-100: #dcefeb;
  --brand-50: #f0f8f6;
  --accent: #f2a541;
  --accent-600: #e08e22;
  --ink: #0e1e1c;
  --text: #3a4a48;
  --muted: #64736f;
  --line: #dce6e3;
  --surface: #f5f8f7;
  --bg: #ffffff;
  --danger: #b42318;
  --success: #0f7b4b;
  --radius: 18px;
  --shadow: 0 16px 40px -18px rgba(14, 30, 28, 0.28);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section-alt { background: var(--surface); }

.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 16px; font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 14px;
}

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

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

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-600); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-600); color: #fff; }
.btn-outline { border-color: rgba(255, 255, 255, 0.7); color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--brand); }
.btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--brand); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

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

/* ---------- Header ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 400;
}
.skip-link:focus { left: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s;
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(14, 30, 28, 0.35); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; color: var(--ink); }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark .icon { width: 22px; height: 22px; stroke-width: 2.2; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  position: relative;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.97rem;
  padding: 6px 0;
}
.site-nav a:hover { text-decoration: none; color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.site-nav .nav-cta {
  padding: 11px 22px;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--accent);
  line-height: 1.2;
}
.site-nav .nav-cta:hover { background: var(--accent-600); color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.2);
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 14px; }
  .site-nav a { font-size: 1.05rem; }
  .nav-cta { text-align: center; }
}

/* ---------- Banners (hero areas) ---------- */
.banner {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #083b38 100%);
}
.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(7, 40, 37, 0.94) 0%, rgba(7, 40, 37, 0.78) 48%, rgba(7, 40, 37, 0.38) 100%);
}
.banner-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.banner-home .banner-inner { padding: 120px 0 112px; }
.banner-page .banner-inner { padding: 96px 0 88px; }
.banner-plain::before { display: none; }
.banner .eyebrow { color: var(--accent); }
.banner h1 { color: #fff; }
.banner .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
  max-width: 600px;
  margin-top: 20px;
}
.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.banner-points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 0.95rem;
}
.banner-points li { display: flex; align-items: center; gap: 8px; }
.banner-points .icon { color: var(--accent); }

/* ---------- Media & lists ---------- */
.media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.media-pair img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.media-pair img:nth-child(2) { margin-top: 48px; }

.media-single {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 14px;
}
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 600;
}
.checklist .icon { color: var(--brand-600); margin-top: 3px; width: 20px; height: 20px; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-100);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon .icon { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.97rem; margin: 0; }

.info-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.info-card .card-icon { margin: 0; width: 48px; height: 48px; flex-shrink: 0; }
.info-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.info-card p { margin: 0; font-size: 0.95rem; }
.info-card a { color: var(--text); }

/* Service cards */
.svc {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.svc-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--brand-100);
}
.svc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}
.svc h3 { margin-bottom: 8px; }
.svc p { font-size: 0.95rem; margin: 0 0 16px; }
.svc-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-600);
}
.svc-link .icon { width: 16px; height: 16px; transition: transform 0.2s; }
.svc:hover .svc-link .icon { transform: translateX(4px); }
.svc-link:hover { text-decoration: none; color: var(--brand); }

/* Process steps */
.step {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; font-size: 0.97rem; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  border-radius: 28px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; max-width: 560px; }
.cta-band p { color: rgba(255, 255, 255, 0.86); margin: 12px 0 0; max-width: 560px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-card h2 { font-size: 1.7rem; margin-bottom: 8px; }
.form-card > p { color: var(--muted); margin-bottom: 24px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.req { color: var(--danger); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #c4d3cf;
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 79, 74, 0.15);
}
.field .is-invalid { border-color: var(--danger); }
.field .is-invalid:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.15); }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text);
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.check.is-invalid span { color: var(--danger); }
.form-note { font-size: 0.86rem; color: var(--muted); margin: 14px 0 0; }

/* ---------- Toast notifications ---------- */
.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 380px;
  max-width: calc(100% - 40px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.35);
  padding: 16px 16px 16px 18px;
  border-left: 6px solid var(--brand);
  animation: toastIn 0.35s ease both;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--brand);
}
.toast.success .toast-icon { background: var(--success); }
.toast.error .toast-icon { background: var(--danger); }
.toast-icon .icon { width: 16px; height: 16px; stroke-width: 3; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 800; font-size: 0.98rem; color: var(--ink); }
.toast-msg { font-size: 0.9rem; color: var(--text); margin-top: 2px; overflow-wrap: anywhere; }
.toast-close {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  font-family: inherit;
}
.toast.hide { animation: toastOut 0.3s ease both; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(12px); }
}

/* ---------- Legal prose ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin: 44px 0 12px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose .updated {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-600);
  background: var(--brand-50);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.narrow { max-width: 640px; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 40px;
}
.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0;
  margin-bottom: 18px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.site-footer a { color: rgba(255, 255, 255, 0.78); }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: #fff; }
.footer-about { margin-top: 18px; max-width: 340px; font-size: 0.95rem; }
.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
}
.footer-contact .icon { color: var(--accent); margin-top: 3px; width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .cta-band { padding: 40px; }
}

@media (max-width: 680px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid,
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .form-card { padding: 26px; }
  .media-pair img:nth-child(2) { margin-top: 24px; }
  .banner-home .banner-inner { padding: 88px 0 80px; }
  .banner-page .banner-inner { padding: 72px 0 64px; }
  .cta-band { padding: 32px 24px; }
  .toast-region { left: 16px; right: 16px; bottom: 16px; width: auto; max-width: none; }
}

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