/* TheRightContract LLC
   Layout: quiet white pages, deep-green bands, thin tapered gold rules taken from the logo's base line.
   Single light theme by choice: the logo is deep green on white and must stay on a light ground. */
:root {
  --green-900: #0c2e2b;
  --green-800: #103936;       /* logo green */
  --green-700: #1b4d48;
  --green-100: #e7efed;
  --gold-600: #8b6a3e;        /* logo gold, dark end */
  --gold-400: #c4a06a;
  --gold-200: #f3d9a7;        /* logo gold, light end */
  --ink: #16211f;
  --ink-soft: #4a5753;
  --line: #dde5e2;
  --paper: #ffffff;
  --paper-tint: #f5f8f7;
  --font-display: "Source Serif 4", "Noto Serif", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--gold-600); }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--green-800); line-height: 1.2; margin: 0; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-600); display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: linear-gradient(90deg, var(--gold-600), var(--gold-200)); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--ink-soft); max-width: 62ch; }
.prose { max-width: 68ch; display: grid; gap: 1.1em; color: var(--ink-soft); }

/* Gold rule echoing the logo's tapered base line */
.gold-rule {
  height: 2px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--gold-600) 12%, var(--gold-200) 50%, var(--gold-600) 88%, transparent);
}

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255,255,255,0.96); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 1; min-width: 0; }
.brand-mark { width: 44px; height: auto; flex-shrink: 0; }
.brand-word { width: 200px; height: auto; min-width: 0; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 46px; height: 46px; cursor: pointer; color: var(--green-800); flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.site-nav a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.98rem;
  border-radius: var(--radius); position: relative;
}
.site-nav a:hover { color: var(--green-700); background: var(--paper-tint); }
.site-nav a[aria-current="page"] { color: var(--green-800); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-200));
}
.site-nav a.nav-cta { background: var(--green-800); color: #fff; margin-left: 8px; padding-inline: 18px; }
.site-nav a.nav-cta:hover { background: var(--green-700); color: #fff; }
.site-nav a.nav-cta[aria-current="page"]::after { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .brand-word { width: 168px; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--paper);
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(12,46,43,0.08);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 20px; gap: 2px; }
  .site-nav a { padding: 14px 12px; }
  .site-nav a[aria-current="page"]::after { left: 12px; right: auto; width: 32px; bottom: 8px; }
  .site-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 380px) { .brand-word { width: 140px; } .brand-mark { width: 38px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: inherit;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--green-800); color: #fff; }
.btn-primary:hover { background: var(--green-700); color: #fff; }
.btn-ghost { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn-ghost:hover { background: var(--green-800); color: #fff; }
.btn-gold { background: var(--gold-200); color: var(--green-900); }
.btn-gold:hover { background: #f8e5bf; color: var(--green-900); }
.btn svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tint { background: var(--paper-tint); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 52px); max-width: 720px; }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero-logo { position: relative; display: grid; place-items: center; padding: clamp(24px, 4vw, 48px); }
.hero-logo img { width: min(100%, 380px); position: relative; }
.hero-logo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, var(--green-100), transparent 68%);
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-soft); font-size: 0.95rem; padding-top: 8px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--gold-600); flex-shrink: 0; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo { order: -1; padding: 0; }
  .hero-logo img { width: min(62%, 240px); }
}

/* Page banner (inner pages) */
.page-banner {
  background: var(--green-800); color: #fff; position: relative; overflow: hidden;
  padding-block: clamp(48px, 7vw, 88px);
}
.page-banner::after {
  content: ""; position: absolute; inset: 0; opacity: 0.09; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23f3d9a7' stroke-width='1'%3E%3Cpath d='M36 6 L46 26 L66 36 L46 46 L36 66 L26 46 L6 36 L26 26 Z'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}
.page-banner .wrap { position: relative; z-index: 1; display: grid; gap: 16px; }
.page-banner h1 { color: #fff; }
.page-banner .eyebrow { color: var(--gold-200); }
.page-banner .lead { color: #d3e0dd; }
.page-banner + .gold-rule { margin-top: -2px; }

/* Service cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.svc-card {
  display: flex; flex-direction: column; gap: 14px; padding: 28px; min-width: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
  scroll-margin-top: 110px;
}
.svc-card:hover { border-color: var(--gold-400); box-shadow: 0 10px 28px rgba(12,46,43,0.07); }
.svc-card:target { border-color: var(--gold-600); box-shadow: 0 0 0 3px var(--gold-200); }
.svc-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-800); flex-shrink: 0;
}
.svc-icon svg { width: 26px; height: 26px; }
.svc-card p { color: var(--ink-soft); font-size: 0.99rem; }
.svc-card .svc-foot { margin-top: auto; padding-top: 6px; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--green-800);
  text-decoration: none; font-size: 0.97rem;
}
.text-link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.text-link:hover { color: var(--gold-600); }
.text-link:hover svg { transform: translateX(3px); }
a.svc-card { text-decoration: none; color: inherit; }
a.svc-card:hover h3 { color: var(--green-700); }

/* Compact home list */
.area-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1020px) { .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .area-grid { grid-template-columns: 1fr; } }
.area-grid .svc-card { padding: 24px; gap: 12px; }
.area-grid h3 { font-size: 1.12rem; }

/* Approach list */
.approach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.approach li { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; min-width: 0; }
.approach li:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.approach h3 { font-size: 1.12rem; display: flex; gap: 10px; align-items: center; }
.approach h3::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold-400); flex-shrink: 0; }
.approach p { color: var(--ink-soft); font-size: 0.98rem; }
ul.approach { list-style: none; margin: 0; padding: 0; }
@media (max-width: 860px) {
  .approach { grid-template-columns: 1fr; }
  .approach li, .approach li:not(:nth-child(3n+1)) { padding: 22px 0; border-left: 0; }
}

/* Two-column split */
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Fact panel */
.facts { background: var(--paper-tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 4px; }
.facts h2 { font-size: 1.3rem; margin-bottom: 8px; }
.facts dl { margin: 0; display: grid; }
.facts div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-600); font-weight: 600; }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* Coverage strip */
.coverage { display: grid; grid-template-columns: auto 1fr; gap: 20px 40px; align-items: center; }
.coverage-badge {
  font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--green-800); font-weight: 600;
  display: flex; align-items: center; gap: 14px;
}
.coverage-badge svg { width: 34px; height: 34px; color: var(--gold-600); }
.coverage p { color: var(--ink-soft); max-width: 68ch; }
@media (max-width: 700px) { .coverage { grid-template-columns: 1fr; } }

/* Note box */
.note {
  border-left: 3px solid var(--gold-400); background: var(--paper-tint); padding: 18px 22px;
  color: var(--ink-soft); font-size: 0.96rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: 80ch;
}

/* CTA band */
.cta-band { background: var(--green-800); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: clamp(40px, 6vw, 64px); }
.cta-band h2 { color: #fff; font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.cta-band p { color: #c9d8d4; margin-top: 8px; max-width: 56ch; }
.cta-band .cta-copy { min-width: 0; flex: 1 1 380px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-grid > * { min-width: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.copy-btn {
  font: inherit; font-size: 0.85rem; padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); color: var(--green-800); cursor: pointer;
}
.copy-btn:hover { border-color: var(--gold-400); }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); box-shadow: 0 16px 40px rgba(12,46,43,0.06); }
.form-card h2 { font-size: 1.6rem; margin-bottom: 6px; }
.form-card > p { color: var(--ink-soft); margin-bottom: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.field .req { color: var(--gold-600); }
.field .opt { color: var(--ink-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid #c9d4d1; border-radius: var(--radius); padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(196,160,106,0.35); }
.field [aria-invalid="true"] { border-color: #a3392b; }
.field .err { color: #a3392b; font-size: 0.86rem; min-height: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.93rem; color: var(--ink-soft); }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green-800); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 18px; padding: 14px 18px; border-radius: var(--radius); font-size: 0.97rem; }
.form-status.ok { background: var(--green-100); color: var(--green-900); border: 1px solid #b9d0cb; }
.form-status.bad { background: #fbeeec; color: #7a2a20; border: 1px solid #ecc8c2; }
.form-submit { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-submit small { color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--paper-tint); border-top: 1px solid var(--line); padding-top: clamp(44px, 6vw, 64px); font-size: 0.96rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.footer-grid > * { min-width: 0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-brand { display: grid; gap: 14px; justify-items: start; }
.footer-brand img { width: 96px; }
.footer-brand .tagline { font-family: var(--font-display); color: var(--green-800); font-size: 1.08rem; max-width: 30ch; }
.site-footer h2 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-600); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--gold-600); text-decoration: underline; }
.site-footer address { font-style: normal; color: var(--ink-soft); display: grid; gap: 6px; }
.footer-base { border-top: 1px solid var(--line); padding-block: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 0.88rem; }

/* 404 */
.notfound { min-height: 56vh; display: grid; place-items: center; text-align: center; padding-block: 72px; }
.notfound .wrap { display: grid; gap: 18px; justify-items: center; }
.notfound img { width: 84px; }
.notfound .code { font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.2em; color: var(--gold-600); }

/* Closing card in the services grid */
.svc-card-cta { background: var(--green-800); border-color: var(--green-800); justify-content: center; }
.svc-card-cta h3 { color: #fff; }
.svc-card-cta p { color: #c9d8d4; }
.svc-card-cta:hover { border-color: var(--gold-400); }
