/* The Ruel Law Firm | ruellaw.net */

:root {
  --navy: #16243a;
  --navy-deep: #101a2b;
  --ink: #232a33;
  --body: #3f4854;
  --muted: #6a7280;
  --gold: #a98a3f;
  --gold-bright: #c9a55a;
  --paper: #faf8f3;
  --line: #e5dfd2;
  --line-dark: #2c3b54;
  --white: #ffffff;
  --serif: "Libre Caslon Text", "Georgia", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p + p { margin-top: 1em; }

a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand img { width: auto; height: 38px; flex-shrink: 0; }

.brand-name {
  font-family: var(--serif);
  font-size: 1.28rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-name span { color: var(--gold); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.site-nav a {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 1.1rem; }

.header-phone {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.header-phone svg { width: 17px; height: 17px; fill: currentColor; }

.header-phone:hover { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

.nav-toggle svg { width: 20px; height: 20px; display: block; stroke: var(--ink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-bright); color: var(--navy-deep); }

.btn-outline-light { border-color: rgba(255,255,255,0.7); color: var(--white); background: transparent; }
.btn-outline-light:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

.btn-outline-navy { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* ---------- Kicker / section labels ---------- */

.kicker {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.rule {
  width: 56px;
  height: 2px;
  background: var(--gold);
  border: none;
  margin: 1.1rem 0 1.4rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  overflow: hidden;
}

.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media picture { width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: center 62%; }

.hero-overlay { position: absolute; inset: 0; background: rgba(13, 21, 36, 0.62); }

.hero-content {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 9.5rem) 1.25rem;
}

.hero-content .kicker { color: var(--gold-bright); }

.hero h1 { color: var(--white); max-width: 15ch; }

.hero-tagline {
  margin-top: 1.3rem;
  font-size: 1.18rem;
  max-width: 52ch;
  color: rgba(255,255,255,0.88);
}

.hero-ctas { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Trust band ---------- */

.trust-band { background: var(--white); border-bottom: 1px solid var(--line); }

.trust-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1140px;
  margin: 0 auto;
}

.trust-item {
  padding: 1.6rem 1.5rem;
  text-align: center;
  border-left: 1px solid var(--line);
}

.trust-item:first-child { border-left: none; }

.trust-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--navy);
}

.trust-item span { font-size: 0.95rem; color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: clamp(3.2rem, 8vw, 5.5rem) 0; }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy); color: rgba(255,255,255,0.9); }
.section-navy h2, .section-navy h3 { color: var(--white); }

.split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split-flip { grid-template-columns: 5fr 7fr; }

.split-top { align-items: start; }

.framed-photo { position: relative; }

.framed-photo::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  background: var(--navy);
}

.framed-photo.framed-gold::before { background: var(--gold); }

.framed-photo img { position: relative; width: 100%; }

/* ---------- Practice area list ---------- */

.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-top: 2.5rem;
}

.practice-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem 1.8rem;
  position: relative;
  text-decoration: none;
  display: block;
  color: var(--body);
  background: var(--white);
}

.practice-cell::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.practice-cell:hover::after { width: 100%; }

.practice-num {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.7rem;
}

.practice-cell h3 { margin-bottom: 0.55rem; }

.practice-cell p { font-size: 0.98rem; color: var(--body); }

.practice-more {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.practice-cell:hover .practice-more { color: var(--gold); }

/* ---------- Testimonials ---------- */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 2.5rem;
}

.rating-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.rating-stars { display: inline-flex; gap: 2px; }
.rating-stars svg { width: 19px; height: 19px; fill: var(--gold); }

.rating-text { font-size: 1rem; color: var(--body); }
.rating-text strong { color: var(--ink); font-weight: 700; }

.testimonial {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  padding: 2rem 1.9rem;
}

.testimonial blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
}

.testimonial cite {
  display: block;
  margin-top: 1.1rem;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- CTA band ---------- */

.cta-band { background: var(--navy); color: var(--white); }

.cta-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(2.8rem, 7vw, 4.2rem) 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
}

.cta-inner h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2rem); max-width: 24ch; }

.cta-inner p { color: rgba(255,255,255,0.75); margin-top: 0.4rem; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Page hero (interior) ---------- */

.page-hero {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero-media { position: absolute; inset: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .hero-overlay { background: rgba(13, 21, 36, 0.72); }

.page-hero-content {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(3.2rem, 8vw, 5.2rem) 1.25rem;
}

.page-hero h1 { color: var(--white); }
.page-hero .kicker { color: var(--gold-bright); margin-bottom: 0.6rem; }
.page-hero p { max-width: 60ch; margin-top: 0.9rem; color: rgba(255,255,255,0.85); }

/* ---------- Content prose ---------- */

.prose h2 { margin: 2.2rem 0 0.9rem; }
.prose h3 { margin: 1.8rem 0 0.6rem; }
.prose ul, .prose ol { margin: 1em 0 1em 1.3em; }
.prose li + li { margin-top: 0.45em; }

.lead { font-size: 1.16rem; color: var(--ink); }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); margin-top: 2rem; }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink);
  padding: 1.1rem 0.2rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 400;
}

.faq details[open] summary::after { content: "\2212"; }

.faq .faq-a { padding: 0 0.2rem 1.2rem; max-width: 65ch; }

/* ---------- Resources ---------- */

.resource-group { margin-top: 2.6rem; }

.resource-group h2 {
  font-size: 1.35rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.resource-list { list-style: none; margin-top: 1.1rem; }

.resource-list li { border-bottom: 1px solid var(--line); }

.resource-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.2rem;
  text-decoration: none;
  font-weight: 600;
}

.resource-list a::after {
  content: "\2197";
  color: var(--gold);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.resource-list a:hover { color: var(--gold); }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info-list { list-style: none; margin-top: 1.6rem; }

.contact-info-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}

.contact-info-list strong {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  min-width: 92px;
}

.contact-form { background: var(--paper); border: 1px solid var(--line); padding: 2.2rem 2rem; }

.contact-form h2 { font-size: 1.5rem; }

.form-field { margin-top: 1.2rem; }

.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.form-field input, .form-field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #cfc7b4;
  background: var(--white);
  color: var(--ink);
}

.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: var(--gold);
}

.form-note { font-size: 0.88rem; color: var(--muted); margin-top: 1rem; }

.form-status { font-size: 0.95rem; font-weight: 600; margin-top: 1rem; }
.form-status:empty { display: none; }
.form-status.is-success { color: #1d6b3f; border-left: 3px solid #1d6b3f; padding-left: 0.8rem; }
.form-status.is-error { color: #a3282d; border-left: 3px solid #a3282d; padding-left: 0.8rem; }
.form-status a { color: inherit; }

button[type="submit"]:disabled { opacity: 0.65; cursor: default; }

.map-embed { border: 1px solid var(--line); margin-top: 2.5rem; }
.map-embed iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.78); font-size: 0.98rem; }

.footer-grid {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 5fr 4fr 3fr;
  gap: 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.footer-brand img { width: auto; height: 34px; }

.footer-grid h3 {
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-grid p { margin-top: 1rem; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.55rem; }

.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); }

.site-footer a.footer-brand { color: var(--white); }
.site-footer a.footer-brand:hover { color: var(--gold-bright); }

.footer-phone { font-size: 1.15rem; font-weight: 700; color: var(--white); }

.footer-bottom { border-top: 1px solid var(--line-dark); }

.footer-bottom-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.4rem 1.25rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

.footer-bottom-inner p + p { margin-top: 0.5rem; }

/* ---------- Utility ---------- */

.center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus { left: 0; }

/* ---------- Mobile ---------- */

/* The Free Consultation button only appears when brand + nav + phone + button
   genuinely fit inside the header. Below this it is dropped, and the phone
   number carries the call to action instead. */
@media (max-width: 1560px) {
  .header-cta { display: none; }
}

@media (max-width: 1120px) {
  .site-nav ul { gap: 1.05rem; }
  .site-nav a { font-size: 0.92rem; }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 0; }

  .site-nav a { display: block; padding: 0.8rem 1.5rem; font-size: 1.05rem; }

  .nav-toggle { display: block; }

  .header-phone span { display: none; }

  .split, .split-flip, .contact-grid { grid-template-columns: 1fr; }

  .split-flip .framed-photo { order: -1; }

  .framed-photo { margin: 0 14px 14px 0; }

  .practice-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; gap: 1.2rem; }

  .trust-items { grid-template-columns: 1fr; }

  .trust-item { border-left: none; border-top: 1px solid var(--line); padding: 1.1rem; }

  .trust-item:first-child { border-top: none; }

  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .brand-name { font-size: 1.05rem; }
  .brand img { height: 30px; }
  .hero-ctas .btn { width: 100%; text-align: center; }
}
