/* Counsel: a website template for small law firms.
   Rebrand by editing the tokens in :root. Nothing else needs to change. */

:root {
  --bg: #f3f3f0;
  --surface: #e7e7e2;
  --ink: #131c2b;
  --muted: #545d6b;
  --line: rgb(19 28 43 / 0.15);
  --accent: #b84a24;
  --accent-ink: #ffffff;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  /* Shape rule: every corner on the site uses this one value. */
  --radius: 2px;

  --wrap: 1240px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --gap: clamp(1rem, 2vw, 1.5rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --header: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layers: header 10, mobile menu 20. */
  color-scheme: light dark;
  accent-color: var(--accent);
}

/* Dark theme follows the visitor's system setting.
   To lock one theme, delete this block (light) or move its values into :root (dark). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131e;
    --surface: #172030;
    --ink: #eceae5;
    --muted: #9da6b5;
    --line: rgb(236 234 229 / 0.16);
    --accent: #e08a63;
    --accent-ink: #0d131e;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.06;
  text-transform: none;
  text-wrap: balance;
}
h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section > h2 { margin-bottom: clamp(2rem, 4.5vw, 3.5rem); }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 0.75rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.site-header__inner { height: var(--header); display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; letter-spacing: -0.02em; text-transform: none; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn), .link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.nav a:not(.btn):hover, .link:hover { background-size: 100% 1px; }
.menu-toggle {
  display: none; background: none; cursor: pointer;
  border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); padding: 0.5rem 1rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.4rem; border-radius: var(--radius);
  font-weight: 500; white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--ink); color: var(--bg); }
.btn--ghost { box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--small { padding: 0.55rem 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Media */
.media { overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Rows: a title on the left, a line of text on the right. */
.rows li {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: baseline;
  padding-block: clamp(1.25rem, 2.6vw, 2rem); border-top: 1px solid var(--line);
}
.rows h3 { grid-column: 1 / span 5; font-size: clamp(1.5rem, 2.5vw, 2rem); }
.rows p { grid-column: 7 / span 6; color: var(--muted); }

/* Split: an image beside text. */
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; }
.split__media { grid-column: 1 / span 5; aspect-ratio: 4 / 5; }
.split__copy { grid-column: 7 / span 6; }
.split__copy h2 { margin-bottom: 1.75rem; }
.split__copy p { max-width: 52ch; color: var(--muted); }
.split__copy p + p { margin-top: 1rem; }

/* Quote */
.quote blockquote { max-width: 24ch; font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.6rem); letter-spacing: -0.02em; line-height: 1.1; text-transform: none; }
.quote footer { margin-top: 2rem; font-family: var(--font-body); font-size: 1rem; font-weight: 400; letter-spacing: 0; line-height: 1.5; text-transform: none; }
.quote footer strong { display: block; font-weight: 600; }
.quote footer span { color: var(--muted); }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact p { max-width: 44ch; color: var(--muted); }
.contact__mail {
  display: inline-block; margin-top: clamp(2rem, 4vw, 3rem);
  font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 5vw, 4rem);
  letter-spacing: -0.02em; line-height: 1.1; text-transform: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 3px no-repeat;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: 0.95rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer small { flex-basis: 100%; color: var(--muted); font-size: 0.875rem; }

/* Reveal on scroll. Content stays visible when JavaScript is off. */
.js [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .media img { transition: none; }
}

/* Small screens: every grid becomes one column. */
@media (max-width: 767px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; z-index: 20; top: var(--header); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1.1rem;
    padding: 1rem var(--gutter) 2rem; background: var(--bg); border-bottom: 1px solid var(--line);
    font-size: 1.25rem;
  }
  .nav.is-open { display: flex; }
  .rows li, .split { display: block; }
  .rows p { margin-top: 0.5rem; }
  .split__copy { margin-top: 2.5rem; }
}

/* Header: the current page is underlined, and the phone number stays visible. */
.nav a[aria-current="page"] { background-size: 100% 1px; }
.phone { font-weight: 600; white-space: nowrap; }

/* Home hero */
.hero { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; padding-block: clamp(2rem, 5vw, 4rem); }
.hero__copy { grid-column: 1 / span 7; }
.hero__copy h1 { font-size: clamp(2.1rem, 3.8vw, 3.1rem); max-width: 28ch; }
.hero__copy p { max-width: 46ch; margin-top: 1.25rem; font-size: 1.15rem; color: var(--muted); }
.hero__copy .actions { margin-top: 2rem; }
.hero__media { grid-column: 9 / span 4; aspect-ratio: 4 / 5; }

/* Top of the inner pages */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 4rem); max-width: 18ch; }
.page-head p { max-width: 52ch; margin-top: 1.25rem; font-size: 1.15rem; color: var(--muted); }

/* Points: short reassurances, two to a row. */
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gap); }
.points div { border-top: 1px solid var(--line); padding-block: 1.25rem 2rem; }
.points dt { font-family: var(--font-display); font-weight: var(--point-weight, 600); font-size: 1.35rem; letter-spacing: -0.01em; }
.points dd { max-width: 44ch; margin-top: 0.4rem; color: var(--muted); }

/* Areas: linked blocks, two to a row. */
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gap); }
.areas a { display: block; border-top: 1px solid var(--line); padding-block: 1.25rem 2rem; }
.areas h3 { font-size: 1.45rem; transition: color 0.25s; }
.areas p { max-width: 44ch; margin-top: 0.4rem; color: var(--muted); }
.areas a:hover h3 { color: var(--accent); }

/* One service in full, on the services page. */
.service { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding-block: clamp(2rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }
.service h2 { grid-column: 1 / span 4; font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.service__body { grid-column: 6 / span 7; }
.service__body p { max-width: 58ch; color: var(--muted); }
.ticks { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.7rem; height: 2px; background: var(--accent); }

/* Fees: what it is on the left, the price on the right. */
.fees li { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 2rem; align-items: baseline; padding-block: 1.25rem; border-top: 1px solid var(--line); }
.fees h3 { font-size: 1.35rem; }
.fees strong { font-size: 1.15rem; white-space: nowrap; }
.fees p { grid-column: 1; max-width: 52ch; color: var(--muted); }
.note { margin-top: 1.5rem; color: var(--muted); font-size: 0.95rem; }

/* Team. The square holds initials; swap it for a photo when you have one. */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3rem) var(--gap); }
.person { display: grid; grid-template-columns: 6rem 1fr; gap: 1.25rem; align-items: start; }
.person__mark { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); background: var(--surface); font-family: var(--font-display); font-size: 1.8rem; color: var(--accent); }
.person__mark img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.35rem; }
.person p { color: var(--muted); }
.person .role { margin-block: 0.25rem 0.6rem; font-weight: 500; color: var(--ink); }

/* Questions */
.faq { max-width: 56rem; }
.faq details { border-top: 1px solid var(--line); padding-block: 1.1rem; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.15rem; }
.faq p { max-width: 62ch; margin-top: 0.6rem; color: var(--muted); }

/* Contact details */
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gap); }
.details div { border-top: 1px solid var(--line); padding-block: 1.1rem 1.75rem; }
.details dt { color: var(--muted); font-size: 0.95rem; }
.details dd { margin-top: 0.3rem; font-size: 1.2rem; }

/* Closing band */
.band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; padding: clamp(2rem, 5vw, 4rem); border-radius: var(--radius); background: var(--surface); }
.band h2 { max-width: 18ch; font-size: clamp(1.8rem, 3.4vw, 2.75rem); }

/* Footer */
.site-footer address { font-style: normal; color: var(--muted); }
.site-footer .legal { flex-basis: 100%; max-width: 80ch; color: var(--muted); font-size: 0.875rem; }

@media (max-width: 767px) {
  .hero { display: block; }
  .hero__media { margin-top: 2.5rem; aspect-ratio: 4 / 3; }
  .points, .areas, .team, .details { grid-template-columns: 1fr; }
  .service { display: block; }
  .service__body { margin-top: 1rem; }
  .fees li { grid-template-columns: 1fr; }
  .fees strong { grid-column: 1; grid-row: auto; }
}

/* ---- Counsel: a deep navy block, a serif voice and one warm accent. ---- */
:root {
  --deep: #12203a;        /* the navy block */
  --on-deep: #f1efe9;     /* text on the navy block */
  --deep-muted: #a9b3c4;  /* quieter text on the navy block */
  --accent-soft: #e39a76; /* the accent, lightened for use on navy */
}
@media (prefers-color-scheme: dark) {
  :root { --deep: #162338; }
}

/* ---- The deep block: one dark colour used for the lead panel, page heads, the quote and the footer. ---- */
.site-header { border-bottom: 1px solid var(--line); }

/* Lead: a deep panel with the headline, beside a photograph that fills the rest of the screen. */
.lead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: min(80dvh, 48rem); }
@media (min-width: 1500px) { .lead { grid-template-columns: 1fr 1fr; } }
.lead__panel {
  display: flex; align-items: center; background: var(--deep); color: var(--on-deep);
  padding-block: clamp(3rem, 7vw, 6rem);
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) clamp(1.5rem, 4vw, 4rem);
}
.lead h1 { font-size: clamp(2.6rem, 4.8vw, 4.6rem); max-width: 12ch; }
.lead h1 em, .page-head h1 em { font-style: italic; color: var(--accent-soft); }
.lead p { max-width: 38ch; margin-top: 1.5rem; font-size: 1.15rem; color: var(--deep-muted); }
.lead .actions { margin-top: 2.25rem; }
.lead__media { position: relative; min-height: 20rem; background: var(--surface); }
.lead__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Buttons that sit on the deep block. */
.lead .btn--ghost { box-shadow: inset 0 0 0 1px rgb(241 239 233 / 0.35); }
.lead .btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--on-deep); }
.lead .btn--primary:hover { background: var(--on-deep); color: var(--deep); }

/* Blocks that run edge to edge in the deep colour while their content stays in the page column. */
.page-head, .quote { background: var(--deep); color: var(--on-deep); border-image: conic-gradient(var(--deep) 0 0) fill 0 / 0 / 0 100vw; }
.page-head { padding-block: clamp(3.5rem, 8vw, 6.5rem); margin-bottom: var(--section); }
.page-head h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
.page-head p { color: var(--deep-muted); }

/* Points: a short accent rule instead of a full line. */
.points { gap: 2.5rem var(--gap); }
.points div { border-top: 0; padding-block: 0; }
.points dt { font-size: 1.5rem; }
.points dt::before, .split__copy h2::before { content: ""; display: block; width: 2.5rem; height: 2px; margin-bottom: 1.1rem; background: var(--accent); }

/* Linked tiles that fill with the deep colour on hover. */
.areas { grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.areas a {
  display: flex; flex-direction: column; min-height: 14rem;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border-top: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background-color 0.35s, color 0.35s;
}
.areas h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.areas p { margin-top: 0.6rem; transition: color 0.35s; }
.areas a::after { content: "\2192"; margin-top: auto; padding-top: 1.5rem; font-size: 1.3rem; color: var(--accent); transition: transform 0.4s var(--ease), color 0.35s; }
.areas a:hover { background: var(--deep); color: var(--on-deep); }
.areas a:hover h3 { color: inherit; }
.areas a:hover p { color: var(--deep-muted); }
.areas a:hover::after { transform: translateX(0.5rem); color: var(--accent-soft); }

.quote footer span { color: var(--deep-muted); }

.fees strong { color: var(--accent); }

/* Team monograms on the deep colour. */
.person { grid-template-columns: 7rem 1fr; }
.person__mark { background: var(--deep); color: var(--on-deep); font-size: 2.1rem; }
.person h3 { font-size: 1.6rem; }

/* Footer on the deep colour. */
.site-footer { border-top: 0; background: var(--deep); color: var(--on-deep); padding-block: 3.5rem; }
.site-footer address, .site-footer .legal, .site-footer small { color: var(--deep-muted); }

@media (prefers-reduced-motion: reduce) {
  .areas a, .areas p, .areas a::after { transition: none; }
  .areas a:hover::after { transform: none; }
}
@media (max-width: 1023px) { .areas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) {
  .lead { grid-template-columns: 1fr; min-height: 0; }
  .lead__media { aspect-ratio: 4 / 3; min-height: 0; }
  .areas { grid-template-columns: 1fr; }
  .areas a { min-height: 0; }
}

.points dt { font-weight: 400; font-size: 1.6rem; letter-spacing: -0.015em; }
.quote blockquote { font-style: italic; }
.quote footer { font-style: normal; }
