/* ==========================================================================
   Solutions 2.0 — styles
   Brand colours are taken directly from the supplied logo files.
   ========================================================================== */

:root {
  /* Brand palette */
  --forest: #045E53;      /* logo green: primary brand colour */
  --pine: #0B3B35;        /* deep green for bands */
  --deep: #06302A;        /* contact section and footer */
  --ivory: #F7F2E8;       /* primary background */
  --parchment: #EEE6D6;   /* alternate section background */
  --sand: #CAB59A;        /* logo accent, used sparingly */
  --charcoal: #23272A;    /* body text */
  --slate: #555B58;       /* secondary text */

  /* Semantic tokens (swapped in dark mode) */
  --bg: var(--ivory);
  --bg-alt: var(--parchment);
  --text: var(--charcoal);
  --text-muted: var(--slate);
  --heading: var(--pine);
  --accent: var(--forest);
  --on-accent: #FBF8F2;
  --band: var(--pine);
  --on-band: #EFE7D8;
  --on-band-muted: #BFCBC5;
  --panel: var(--forest);
  --line: rgba(4, 94, 83, 0.2);
  --field-bg: #FFFDF8;
  --error: #9E2F22;

  /* Type */
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
  --header-h: 76px;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E211E;
    --bg-alt: #132A26;
    --text: #E9E2D4;
    --text-muted: #B3B0A6;
    --heading: #F1EADC;
    --accent: #CAB59A;
    --on-accent: #0E211E;
    --band: #07302A;
    --panel: #0A4A41;
    --line: rgba(202, 181, 154, 0.22);
    --field-bg: #102623;
    --error: #F0A391;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E211E;
  --bg-alt: #132A26;
  --text: #E9E2D4;
  --text-muted: #B3B0A6;
  --heading: #F1EADC;
  --accent: #CAB59A;
  --on-accent: #0E211E;
  --band: #07302A;
  --panel: #0A4A41;
  --line: rgba(202, 181, 154, 0.22);
  --field-bg: #102623;
  --error: #F0A391;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: .6rem 1rem; text-decoration: none;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The "key line": the bar with serif terminals from the logo, used as a rule */
.keyline {
  position: relative;
  display: block;
  height: 3px;
  background: var(--accent);
  margin-inline: 1px;
}
.keyline::before, .keyline::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2px; height: 15px;
  background: var(--accent);
  transform: translateY(-50%);
  border-radius: 1px;
}
.keyline::before { left: -1px; }
.keyline::after { right: -1px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: .85rem 1.9rem;
  font: 600 .95rem/1.2 var(--sans);
  letter-spacing: .01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--heading); }
.btn--ghost { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--ghost:hover { background: var(--accent); color: var(--on-accent); }
.btn--light { background: var(--on-band); color: var(--pine); }
.btn--light:hover { background: #fff; }
.btn--small { min-height: 2.6rem; padding: .6rem 1.1rem; font-size: .875rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand { display: block; flex: none; }
.logo { width: clamp(150px, 16vw, 188px); }
.logo--on-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--on-light { display: none; }
  :root:not([data-theme="light"]) .logo--on-dark { display: block; }
}
:root[data-theme="dark"] .logo--on-light { display: none; }
:root[data-theme="dark"] .logo--on-dark { display: block; }

.site-nav { display: flex; align-items: center; gap: 2.25rem; }
.site-nav ul { display: flex; gap: 2rem; }
.site-nav ul a {
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  padding-block: .4rem;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0 1.5px;
  transition: background-size .25s ease, color .2s ease;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="true"] { background-size: 100% 1.5px; color: var(--heading); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent;
  color: var(--heading);
  cursor: pointer;
  padding: 0;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 24px; height: 1.5px;
  background: currentColor;
  margin-inline: auto;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem var(--gutter) 1.75rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a {
    display: block;
    padding-block: .85rem;
    border-bottom: 1px solid var(--line);
    background: none;
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--heading);
  }
  .site-nav .btn { align-self: flex-start; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: stretch;
}

.hero-copy { display: flex; flex-direction: column; justify-content: center; padding-block: clamp(1rem, 4vw, 3rem); }

.hero-title {
  position: relative;
  font-family: var(--serif);
  font-weight: 500;
  font-size: min(6rem, calc((100vw - 2 * var(--gutter)) / 9.2));
  line-height: 1.02;
  letter-spacing: -.01em;
  color: var(--heading);
}
/* Two fixed lines: "Legal Advice with a" / "Business Perspective." */
.hero-title span { display: block; white-space: nowrap; }

.hero-keyline {
  width: min(100%, 34rem);
  margin-block: clamp(2rem, 4vw, 2.75rem);
  transform-origin: left center;
}

.hero-lede {
  position: relative;
  max-width: 34rem;
  font-size: clamp(1.075rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }

/* Oversized "2.0" from the logo, set as a quiet watermark aligned to the right edge of the content */
.hero-mark {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  top: 54%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(13rem, 25vw, 26rem);
  line-height: .8;
  letter-spacing: -.02em;
  color: color-mix(in srgb, var(--accent) 6%, var(--bg));
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero-grid { position: relative; z-index: 1; }

/* One orchestrated load moment: the key line draws in under the headline */
@media (prefers-reduced-motion: no-preference) {
  .hero-mark { animation: fade 1.4s .2s ease both; }
  .hero-title, .hero-lede, .cta-row { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-lede { animation-delay: .35s; }
  .cta-row { animation-delay: .45s; }
  .hero-keyline { animation: draw 1.1s .2s cubic-bezier(.65, 0, .25, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-block: 1rem 0; }
  .hero-mark { display: none; }
}

/* ==========================================================================
   Shared section styles
   ========================================================================== */
.section { padding-block: var(--section-y); }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--heading);
  text-wrap: balance;
}

.section-intro {
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 1.25rem;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .section-intro { margin-top: 0; }
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; } }

/* ==========================================================================
   About
   ========================================================================== */
.about { background: var(--bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}

.portrait { position: sticky; top: calc(var(--header-h) + 2rem); }
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 2px;
  box-shadow: 14px 14px 0 0 var(--line);
}
.portrait figcaption {
  margin-top: 1.4rem;
  font-size: .875rem;
  color: var(--text-muted);
}

.about-copy .section-title { max-width: 14ch; }
.prose { margin-top: 2rem; max-width: 38rem; }
.prose p + p { margin-top: 1.1rem; }

.statement {
  margin-top: 2.75rem;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
  max-width: 34rem;
}
.statement p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  line-height: 1.25;
  color: var(--heading);
}

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 26rem; }
}

/* ==========================================================================
   Expertise
   ========================================================================== */
.practice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
}
.practice {
  padding-block: 1.9rem 2rem;
  border-bottom: 1px solid var(--line);
}
.practice h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--heading);
  margin-bottom: .55rem;
}
.practice p { color: var(--text-muted); max-width: 30rem; }

.counsel-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: center;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--band);
  color: var(--on-band);
  border-radius: 2px;
}
.counsel-copy { position: relative; max-width: 38rem; }
.counsel-copy h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: .75rem;
}
.counsel-copy p { color: var(--on-band-muted); }
.counsel-band .btn { position: relative; }

@media (max-width: 880px) {
  .practice-list { grid-template-columns: 1fr; }
  .counsel-band { grid-template-columns: 1fr; }
  .counsel-band .btn { justify-self: start; }
}

/* ==========================================================================
   Approach (a genuine sequence, so it is numbered)
   ========================================================================== */
.approach { background: var(--bg-alt); }
.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.approach-head { position: sticky; top: calc(var(--header-h) + 2rem); }

.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
}
.steps h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--heading);
  margin-bottom: .4rem;
}
.steps p { color: var(--text-muted); max-width: 32rem; }

@media (max-width: 880px) {
  .approach-grid { grid-template-columns: 1fr; }
  .approach-head { position: static; }
}

/* ==========================================================================
   Why Solutions 2.0
   ========================================================================== */
.why { background: var(--bg-alt); padding-top: 0; }
.why .section-title { max-width: 20ch; }
.why .wrap::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: var(--section-y); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.why-grid article {
  padding: .25rem clamp(1.25rem, 3vw, 2.5rem) .5rem;
  border-left: 1px solid var(--line);
}
.why-grid article:first-child { padding-left: 0; border-left: 0; }
.why-grid h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.85rem;
  line-height: 1.15;
  color: var(--heading);
  margin-bottom: .75rem;
}
.why-grid p { color: var(--text-muted); max-width: 22rem; }

@media (max-width: 880px) {
  .why-grid { grid-template-columns: 1fr; gap: 0; }
  .why-grid article,
  .why-grid article:first-child {
    padding: 1.75rem 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  background: var(--deep);
  color: var(--on-band);
}
.contact .section-title { color: #F4EDE0; max-width: 16ch; }
.contact .section-intro { color: var(--on-band-muted); }

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

.contact-card { font-style: normal; margin-top: 3.5rem; }
.contact-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: .6rem;
}
.contact-name {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 500;
  color: #F4EDE0;
  line-height: 1.2;
}
.contact-role { color: var(--on-band-muted); margin-top: .2rem; }

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  gap: 2rem 3rem;
  margin-top: 2.75rem;
}
.contact-details a,
.contact-details div > p:not(.contact-label) {
  white-space: nowrap;
  font-size: 1.1rem;
  color: #F4EDE0;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-details a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1100px) { .contact-details { grid-template-columns: 1fr; } }
.contact-details .contact-label { white-space: nowrap; }

.contact-form { color: var(--on-band); padding-top: .5rem; }
.field { margin-bottom: 1.6rem; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.75rem; }
@media (max-width: 560px) { .field-pair { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .6rem;
  color: var(--on-band-muted);
}
.optional { text-transform: none; letter-spacing: .02em; font-weight: 500; margin-left: .35rem; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--ivory);
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 1.05rem 1.3rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 11rem; }
.field input::placeholder,
.field textarea::placeholder { color: #9A9C95; opacity: 1; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sand);
  box-shadow: 0 0 0 3px rgba(202, 181, 154, .35);
}
.field [aria-invalid="true"] { border-color: #F0A391; }
.field-error { font-size: .85rem; color: #F4B3A3; margin-top: .4rem; }
.field-error:empty { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: .85rem; color: var(--on-band-muted); margin-block: 0 1.5rem; }
.contact-form .btn {
  min-height: 3.6rem;
  padding: 1rem 3rem;
  background: var(--ivory);
  color: var(--pine);
  font-size: 1rem;
}
.contact-form .btn:hover { background: #fff; }
.contact-form .btn:focus-visible { outline-color: var(--sand); }
.contact-form .btn[disabled] { opacity: .6; cursor: progress; }

.form-status:empty { display: none; }
.form-status {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--sand);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: var(--on-band);
  font-size: .95rem;
}
.form-status.is-error { border-left-color: #F0A391; }
.form-status a { color: var(--sand); font-weight: 600; }
.form-status p + p { margin-top: .5rem; }

@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--deep);
  color: var(--on-band-muted);
  border-top: 1px solid rgba(202, 181, 154, .18);
  padding-block: 3.25rem 2.5rem;
  font-size: .9rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem 4rem;
  align-items: center;
}
.footer-wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #F4EDE0;
}
.footer-wordmark span { font-size: 1.2em; letter-spacing: .1em; margin-left: .15em; font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.footer-tagline { margin-top: .75rem; }
.site-footer nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 2.25rem; }
.site-footer nav a { text-decoration: none; color: var(--on-band); font-size: 1rem; }
.site-footer nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  font-size: .85rem;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .site-footer nav ul { justify-content: flex-start; }
}

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