/* ===========================================================
   Richard Stevens — Chartered Surveyor
   Classic professional theme: navy + cream, serif headings
   Structure mirrors the original richardstevenssurveyor.co.uk
   =========================================================== */

:root {
  --navy:        #16314f;
  --navy-deep:   #0f2438;
  --navy-soft:   #1d3c5f;
  --brass:       #b08d57;
  --brass-dark:  #94733f;
  --cream:       #f6f2e9;
  --cream-deep:  #efe9da;
  --paper:       #fffdf8;
  --ink:         #232323;
  --muted:       #5c5c5c;
  --line:        #e2dccd;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
  --maxw-narrow: 760px;
  --radius: 6px;
  --shadow: 0 14px 40px -20px rgba(15, 36, 56, 0.45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin: 0 0 1rem; }

a { color: var(--navy-soft); text-decoration: none; }
a:hover { color: var(--brass-dark); }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--maxw-narrow); }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; letter-spacing: .01em;
  padding: .8rem 1.6rem; border-radius: var(--radius); cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--brass); color: #fff; border-color: var(--brass); }
.btn-primary:hover { background: var(--brass-dark); border-color: var(--brass-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 242, 233, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--navy); }
.brand-sub { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-dark); margin-top: 2px; }

.main-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; }
.nav-menu a { color: var(--navy); font-weight: 500; font-size: 1rem; }
.nav-menu a:hover { color: var(--brass-dark); }
.nav-cta a { background: var(--navy); color: #fff !important; padding: .5rem 1rem; border-radius: var(--radius); font-weight: 600; }
.nav-cta a:hover { background: var(--navy-deep); }

.nav-toggle { display: none; position: relative; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 50%; width: 22px; height: 2px; background: var(--navy);
  transform: translateX(-50%); transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-bar { top: 50%; translate: 0 -50%; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Hero / Home ---------- */
.hero { background: var(--cream-deep); padding: clamp(2.5rem, 6vw, 5rem) 0; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.2fr .9fr; gap: 3rem; align-items: center; }
.eyebrow { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-dark); font-weight: 600; margin: 0 0 1rem; }
.hero h1 { margin-bottom: .6rem; }
.hero-sub { font-size: 1.4rem; color: var(--brass-dark); font-weight: 500; margin-bottom: 1rem; }
.hero-text p { max-width: 56ch; color: #3a3b38; font-size: 1.06rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.hero-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border: 6px solid var(--paper); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--cream-deep); }
.section-head { max-width: 64ch; margin: 0 0 2.5rem; }
.section-head-center { margin-left: auto; margin-right: auto; text-align: center; }
.section-intro { color: var(--muted); font-size: 1.1rem; }

/* ---------- Services (list with dividers, like original) ---------- */
.services-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: start; }
.services-image { position: sticky; top: 5rem; }
.service-list { display: grid; gap: 0; }
.service-item { padding: 1.8rem 0; border-top: 1px solid var(--line); }
.service-item:first-child { border-top: none; padding-top: 0; }
.service-item h3 { font-size: 1.35rem; position: relative; padding-left: 1rem; }
.service-item h3::before { content: ""; position: absolute; left: 0; top: .15em; width: 4px; height: 1.1em; background: var(--brass); border-radius: 0 3px 3px 0; }
.service-item p { color: var(--muted); max-width: 75ch; margin: .5rem 0 0; padding-left: 1rem; }

/* ---------- Process: Advice, to the point ---------- */
.section-dark { background: radial-gradient(circle at 30% 0%, #1d3c5f, #0f2438 75%); color: #e6dfd0; }
.section-dark h2 { color: #fff; }
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.process li { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 2rem 1.6rem; text-align: center; }
.process-num { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brass); color: #fff; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.process li p { margin: 0; color: #e6dfd0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: start; }
.about-history h3 { margin-top: 0; }
.about-history p { color: #3a3b38; font-size: 1.04rem; }
.about-cta { margin-top: 2rem; padding: 1.6rem 1.8rem; background: var(--cream-deep); border-left: 4px solid var(--brass); border-radius: 0 var(--radius) var(--radius) 0; }
.about-cta h3 { margin-top: 0; }
.about-cta p { color: var(--muted); }
.section-alt .about-cta { background: var(--paper); }

.about-side { display: grid; gap: 1.5rem; }
.about-figure { margin: 0; }
.about-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.cred-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.about-creds { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; margin-top: 3rem; }
.about-creds-col { display: flex; flex-direction: column; gap: 1.5rem; }
.about-creds-col .about-cta { margin-top: 0; }
.cred-card h3 { margin-top: 0; color: var(--brass-dark); }
.cred-list { list-style: none; margin: 0; padding: 0; }
.cred-list li { padding: .55rem 0; border-bottom: 1px solid var(--line); color: #3a3b38; font-size: .98rem; }
.cred-list li:last-child { border-bottom: none; }
.cred-list span { display: inline-block; min-width: 3.4em; font-weight: 700; color: var(--navy); }

/* Experience timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1.5rem 2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; background: var(--brass); border: 3px solid var(--paper); border-radius: 50%; box-shadow: 0 0 0 1px var(--brass); }
.timeline-years { display: block; font-weight: 700; color: var(--navy); font-size: .95rem; letter-spacing: .02em; }
.timeline li p { margin: .25rem 0 0; color: var(--muted); font-size: .98rem; }

/* ---------- Testimonials ---------- */
.testimonial-list { display: flex; flex-direction: column; gap: 2.5rem; }
.testimonial-name { color: var(--navy); font-size: 1.3rem; margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--brass); display: inline-block; }
.testimonial blockquote { margin: 0; padding: 0 0 0 1.5rem; border-left: 3px solid var(--line); }
.testimonial blockquote p { color: #3a3b38; font-size: 1.05rem; }
.testimonial blockquote p:last-child { margin-bottom: 0; }

/* Testimonials with a photo: two-column, photo on left */
.testimonial-with-photo { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
.testimonial-photo-col img { width: 100%; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.testimonial-photo-col img.ba-hidden { display: none; }

/* Before/after toggle buttons */
.ba-toggle-btns { display: flex; gap: .5rem; margin-top: .6rem; }
.ba-toggle-btn { flex: 1; padding: .3rem .4rem; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; border: 1.5px solid var(--brass); border-radius: 3px; background: transparent; color: var(--brass-dark); cursor: pointer; transition: background .15s, color .15s; }
.ba-toggle-btn.active { background: var(--brass); color: #fff; }

@media (max-width: 680px) { .testimonial-with-photo { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3.5rem; align-items: start; }
.contact-list { list-style: none; margin: 1.5rem 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.contact-label { font-weight: 600; color: var(--brass-dark); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; padding-top: 3px; }
.contact-list a { font-size: 1.05rem; }
.contact-list address { font-style: normal; color: var(--ink); line-height: 1.5; }
.service-area { margin-top: 1.5rem; }
.service-area h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.service-area p { color: var(--muted); margin: 0; }
.contact-map { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.contact-map iframe { display: block; }

/* ---------- Contact form (mirrors original Squarespace fields) ---------- */
.contact-form-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.contact-form fieldset { border: none; margin: 0 0 1.1rem; padding: 0; }
.contact-form legend { font-weight: 600; color: var(--navy); font-size: .95rem; margin-bottom: .5rem; padding: 0; }
.req { color: var(--brass-dark); }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row { display: flex; flex-direction: column; margin: 0 0 1.1rem; }
.form-row label { font-weight: 600; color: var(--navy); margin-bottom: .35rem; font-size: .95rem; }
.form-name .form-row label { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field-hint { font-size: .85rem; color: var(--muted); margin-top: .35rem; }
.form-checkboxes .field-hint { order: -1; }

.form-row input, .form-row textarea, .form-row select {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid #cfc7b5; border-radius: var(--radius);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(176,141,87,.2);
}
.form-row textarea { resize: vertical; }

.form-checkboxes { display: flex; flex-direction: column; gap: .55rem; }
.checkbox { display: flex; align-items: center; gap: .6rem; font-weight: 400; color: var(--ink); cursor: pointer; font-size: 1rem; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brass); }

.field-error { border-color: #a8392f !important; box-shadow: 0 0 0 3px rgba(168,57,47,.15) !important; }
.form-status { margin: 1rem 0 0; font-weight: 500; min-height: 1.4em; }
.form-status.success { color: #2f6b3a; }
.form-status.error { color: #a8392f; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c9d1da; padding: 2.5rem 0; }
.footer-inner { text-align: center; }
.footer-nav { margin-bottom: 1.25rem; color: #8995a1; font-size: .95rem; }
.footer-nav a { color: #e0e6ec; }
.footer-nav a:hover { color: #fff; }
.footer-name { font-family: var(--serif); font-size: 1.2rem; color: #fff; margin: 0 0 .4rem; letter-spacing: .05em; }
.footer-meta { font-size: .92rem; margin: 0 0 .4rem; color: #aeb8c2; }
.footer-meta a { color: #e0e6ec; }
.footer-meta a:hover { color: #fff; }
.footer-tag { font-size: .92rem; color: #aeb8c2; margin: 1rem auto 0; max-width: 55ch; }
.footer-copy { font-size: .82rem; color: #8995a1; margin: 1rem 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo { max-width: 360px; }
  .about-grid, .contact-grid, .about-creds, .services-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .services-image { position: static; }
  .process { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 0 1.5rem; max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
  }
  .nav-menu.open { max-height: 460px; padding: .5rem 1.5rem 1.25rem; }
  .nav-menu li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-cta a { display: inline-block; margin-top: .5rem; }
  .form-2col { grid-template-columns: 1fr; gap: 0; }
}

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