/* Spero Law — reproduces the live site's settings: palette, type scale, section sizing.
   Block positions come from the per-page grid CSS that build.py inlines in each page. */
:root {
  --navy: #0a2375;
  --lime: #e5ff04;
  --periwinkle: #8491ba;
  --black: #000;
  --white: #fff;
  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-cta: "Inter Tight", "InterTight", "Helvetica Neue", Arial, sans-serif;

  /* Squarespace site settings */
  --sqs-site-max-width: 1800px;
  --sqs-site-gutter: 4vw;
  --sqs-mobile-site-gutter: 6vw;
  --header-h: calc(3.2vw + 100px);
}

/* Type scale: size values from the site's style settings, same formula as Squarespace */
h1 { --v: 4.5; }
h2 { --v: 2.8; }
h3 { --v: 1.6; }
h4 { --v: 1.2; }
p, li, .sqs-html-content, label, input, textarea, .source { --v: 1.2; }
.sqsrte-large { --v: 1.5; }
.sqsrte-small, .list-desc, .list-desc p, .caption, .req { --v: 1; }
blockquote { --v: 1.8; }
.sqs-button { --v: 1.25; }
.folder > button, .folder-content a { --v: 1.1; }
.header-cta { --v: 1.08; }

h1, h2, h3, h4, p, li, blockquote, label, input, textarea, .source, .sqs-button, .sqsrte-large, .sqsrte-small,
.folder > button, .folder-content a, .header-cta, .caption, .req, .list-desc {
  font-size: min(calc((var(--v) - 1) * 1.2vw + 1rem), max(calc((var(--v) - 1) * 21.6px + 1rem), calc(var(--v) * 1rem)));
}
@media (max-width: 767px) and (orientation: portrait) {
  h1, h2, h3, h4, p, li, blockquote, label, input, textarea, .source, .sqs-button, .sqsrte-large, .sqsrte-small,
  .folder > button, .folder-content a, .header-cta, .caption, .req, .list-desc {
    font-size: calc((var(--v) - 1) * calc(.012 * min(100vh, 900px)) + 1rem);
  }
}
/* Overrides from the site's custom CSS */
@media (max-width: 960px) { h1 { font-size: 3rem; } h2 { font-size: 2.5rem; } h3 { font-size: 2rem; } }
@media (max-width: 640px) { h1 { font-size: 2rem; } h2 { font-size: 1.75rem; } h3 { font-size: 1.5rem; } }

/* Home hero: the small eyebrow line is the page's h1 for search engines, the slogan keeps the h1 look */
.page-section h1.eyebrow { font-size: 1rem; font-weight: 580; line-height: 1.5em; color: var(--pS); }
.page-section p.as-h1 { --v: 4.5; font-weight: 600; letter-spacing: 0; line-height: calc(1.25em * (1 + (1 - var(--v)) / 25)); hyphens: manual; color: var(--h); }
@media (max-width: 960px) { .page-section p.as-h1 { font-size: 3rem; } }
@media (max-width: 640px) { .page-section p.as-h1 { font-size: 2rem; } }
/* "Partner, Lawyer" line under each lawyer's name (Law Society rule 4.2-1.1) */
.page-section p.lawyer-role { margin-top: .4em; text-transform: uppercase; letter-spacing: .04em; }
/* Headings in narrow grid columns (e.g. "Experience" on the bios at tablet and laptop widths):
   shrink to fit the column instead of breaking mid-word */
.fe-block .sqs-html-content { container-type: inline-size; }
@media (min-width: 961px) { @container (max-width: 280px) { .sqs-html-content h2 {
  font-size: min(calc((var(--v) - 1) * 1.2vw + 1rem), max(calc((var(--v) - 1) * 21.6px + 1rem), calc(var(--v) * 1rem)), 17cqi); } } }
@media (min-width: 768px) and (max-width: 960px) { @container (max-width: 280px) { .sqs-html-content h2 { font-size: min(2.5rem, 17cqi); } } }
/* Past-results statement under Notable Cases (Law Society rule 4.2-1, Commentary [2](a)) */
.page-section p.cases-note { margin-top: .75em; font-size: .85em; font-style: italic; opacity: .85; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* 580 in Figtree matches the stroke weight of the live site's Dunbar Text at 500 */
body { margin: 0; font-family: var(--font); font-weight: 580; line-height: 1.5; color: var(--black); background: var(--navy); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: 0; line-height: calc(1.25em * (1 + (1 - var(--v)) / 25)); hyphens: manual; }
p, li { line-height: 1.5em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; z-index: 100; }
.skip:focus { left: 16px; top: 16px; background: var(--lime); color: var(--navy); padding: 8px 16px; }

/* ---------- Section themes ---------- */
[data-section-theme="dark"] { --bg: var(--navy); --h: var(--white); --p: var(--white); --pL: var(--white); --pS: var(--white); --link: var(--lime); --btn-bg: var(--lime); --btn-text: var(--navy); --quote: var(--white); --divider: var(--white); }
[data-section-theme="white"] { --bg: var(--white); --h: var(--black); --p: var(--black); --pL: var(--black); --pS: var(--black); --link: var(--navy); --btn-bg: var(--navy); --btn-text: var(--white); --quote: var(--black); --divider: var(--periwinkle); }
[data-section-theme="white-bold"] { --bg: var(--white); --h: var(--navy); --p: var(--black); --pL: var(--black); --pS: var(--black); --link: var(--navy); --btn-bg: var(--navy); --btn-text: var(--white); --quote: var(--black); --divider: var(--periwinkle); }
[data-section-theme="light"] { --bg: var(--lime); --h: var(--navy); --p: var(--navy); --pL: var(--black); --pS: var(--navy); --link: var(--periwinkle); --btn-bg: var(--periwinkle); --btn-text: var(--white); --quote: var(--navy); --divider: var(--navy); }

.page-section { background: var(--bg); color: var(--p); }
.page-section h1, .page-section h2, .page-section h3, .page-section h4 { color: var(--h); }
.page-section p, .page-section li { color: var(--p); }
.page-section .sqsrte-large { color: var(--pL); }
.page-section .sqsrte-small { color: var(--pS); }
.page-section a { color: var(--link); }
.sqsrte-text-color--lightAccent { color: var(--lime); }
.sqsrte-text-color--accent { color: var(--periwinkle); }
.sqsrte-text-color--darkAccent { color: var(--navy); }
.sqsrte-text-color--white { color: var(--white); }
.sqsrte-text-color--black { color: var(--black); }

/* ---------- Sections ---------- */
.page-section { position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.section-height--small { min-height: 33vh; }
.section-height--medium { min-height: 66vh; }
.section-height--large { min-height: 100vh; }
.section-height--custom { min-height: var(--custom-height, 0); }
.page-section.section-height--custom > .content-wrapper { padding: calc(var(--custom-pad, 0) * 1vmax) 0; }
.page-section > .content-wrapper { position: relative; z-index: 1; display: flex; justify-content: center; width: 100%; padding: 0; }
.section-height--small > .content-wrapper { padding: 3.3vmax 0; }
.section-height--medium > .content-wrapper { padding: 6.6vmax 0; }
.section-height--large > .content-wrapper { padding: 10vmax 0; }
.page-section > .content-wrapper > .content { width: 100%; }
.page-section.first { padding-top: var(--header-h); }

.section-background { position: absolute; inset: 0; background: var(--bg); overflow: hidden; }
.section-background img { width: 100%; height: 100%; object-fit: cover; }
.section-background-overlay { position: absolute; inset: 0; background: var(--bg); opacity: var(--overlay); }

/* ---------- Grid blocks ---------- */
.fluid-engine { display: grid; }
.fe-block { position: relative; min-width: 0; }
.sqs-block { display: flex; flex-direction: column; height: 100%; width: 100%; }
.sqs-block-alignment-wrapper { display: flex; height: 100%; width: 100%; }

.sqs-html-content { overflow-wrap: break-word; }
.sqs-html-content > *:first-child { margin-top: 0; }
.sqs-html-content > *:last-child { margin-bottom: 0; }
.sqs-html-content p { margin: 1rem 0; }
.sqs-html-content p:empty::before { content: "\200b"; } /* empty paragraphs are blank lines, as on the live site */
.sqs-html-content h1, .sqs-html-content h2, .sqs-html-content h3, .sqs-html-content h4 { margin: 2rem 0; }
.sqs-html-content ul, .sqs-html-content ol { margin: 1rem 0; padding-left: 40px; }
.sqs-html-content li { list-style: none; margin: 0; padding: 0; }
.sqs-html-content li > * { margin: .5em 0; }
.sqs-html-content ul > li > *:first-child::before { content: "•"; display: inline-block; width: 40px; margin-left: -40px; text-align: center; }
.sqs-html-content ol { counter-reset: item; }
.sqs-html-content ol > li { counter-increment: item; }
.sqs-html-content ol > li > *:first-child::before { content: counter(item) "."; display: inline-block; width: 40px; margin-left: -40px; text-align: center; }
.sqs-html-content a { text-decoration: underline; }
.code h2 { margin: 0; }
.sqs-html-content.code > p { margin: 1rem 0; }

.image { position: relative; overflow: hidden; }
.image a { display: block; position: absolute; inset: 0; }
/* absolutely positioned so images fill their grid cell without stretching rows */
.image img { position: absolute; inset: 0; width: 100%; height: 100%; }
.image.fill img { object-fit: cover; }
.image.fit img { object-fit: contain; }

.rule { align-items: center; }
.rule hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--divider); }

.map { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(.92) brightness(1.04); } /* the live map uses a muted grey style */

/* Buttons */
.sqs-button {
  display: inline-block; font-family: var(--font); font-weight: 600; line-height: 1.2em; letter-spacing: 0;
  padding: 1.2rem 2.5rem; border: 0; border-radius: 0; cursor: pointer; text-decoration: none !important;
  background: var(--btn-bg, var(--navy)); color: var(--btn-text, var(--white)) !important; transition: opacity .1s linear;
}
.sqs-button:hover { opacity: .8; }
.sqs-button.size-small { padding: .9rem 1.8rem; }
.sqs-button.size-large { padding: 1.5rem 3.2rem; }
.button-container { align-items: center; }
.button-container.align-left { justify-content: flex-start; }
.button-container.align-center { justify-content: center; }
.button-container.align-right { justify-content: flex-end; }
.button-container.stretched .sqs-button { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 2.5rem; text-align: center; }

/* Quotes (site custom CSS: italic, 1.4em, source at 60%) */
.quote-block { --v: 1.2; padding: 2em; font-size: min(calc((var(--v) - 1) * 1.2vw + 1rem), max(calc((var(--v) - 1) * 21.6px + 1rem), calc(var(--v) * 1rem))); }
.quote { margin: 1em 0; }
@media (max-width: 767px) and (orientation: portrait) {
  .quote-block { padding: 1.1em; font-size: calc((var(--v) - 1) * calc(.012 * min(100vh, 900px)) + 1rem); }
}
.quote blockquote { margin: 0; padding: 0; font-family: var(--font); font-weight: 600; font-style: italic; line-height: 1.4em; color: var(--quote); }
.quote .source { margin: 1.25em 0 0 60%; text-align: left; font-weight: 580; line-height: 1.5em; color: var(--quote); }
.quote .source .quote-title { display: inline-block; margin-left: 1em; }
@media (max-width: 640px) { .quote .source { margin-left: 5%; } }
.fe-block-yui_3_17_2_1_1787804792604_7681 .quote .source { margin-left: 5%; } /* per-block rule from the site's custom CSS */

/* Contact forms */
.contact-form { width: 100%; }
.contact-form .form-item { display: block; margin: 0 0 20px; padding: 0; border: 0; color: var(--p); }
.contact-form .title { display: block; height: 32px; line-height: 1.5em; padding: 0; }
.contact-form .req { font-size: 16px; opacity: .7; }
.contact-form .name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.contact-form .name-row label { display: block; }
.contact-form .name-row .caption { display: block; height: 30px; font-size: 12px; line-height: normal; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin: 0; padding: 10px; font-family: var(--font); font-weight: 580; line-height: 1.5em;
  color: var(--black); background: #fafafa; border: 1px solid var(--black); border-radius: 0;
}
.contact-form textarea { height: 100px; min-height: 100px; resize: vertical; }
.contact-form ::placeholder { color: rgba(0, 0, 0, .55); font-size: .8em; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.contact-form .hp { position: absolute; left: -9999px; }
.form-status { margin: 0 0 1.4rem; padding: 1rem 1.2rem; background: var(--white); color: var(--navy); border: 1px solid var(--navy); }

/* Law clerks list section */
.list-section > .content-wrapper { padding: 6vmax var(--sqs-site-gutter); }
.user-items-list { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 10px; row-gap: 50px; list-style: none; margin: 0 auto; padding: 0; max-width: var(--sqs-site-max-width); }
.list-item { min-width: 0; }
.list-image { aspect-ratio: 3 / 4; overflow: hidden; margin-bottom: .8rem; }
.list-image img { width: 100%; height: 100%; object-fit: cover; }
.list-title { --v: 1.6; width: 80%; margin: 0; line-height: 1.07em; color: var(--black) !important; text-align: left; }
.list-desc { width: 80%; margin-top: 3px; }
.list-desc p { margin: 0; line-height: 1.5em; color: var(--black); }
@media (max-width: 767px) { .user-items-list { grid-template-columns: 1fr; } }

/* ---------- Header ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 1.6vw 4vw; }
.logo img { height: 100px; width: auto; }
#site-nav { display: flex; align-items: center; gap: 44px; }
.nav-list { display: flex; align-items: center; gap: 40px; list-style: none; margin: 0; padding: 0; }
.folder { position: relative; }
.folder > button { font-family: var(--font); font-weight: 580; line-height: 1.75em; color: var(--lime); background: none; border: 0; padding: 0; cursor: pointer; }
.folder-content { position: absolute; top: 100%; right: -17.5px; min-width: 200px; margin: 0; padding: .5em 1em; list-style: none; text-align: right; background: var(--navy); display: none; white-space: nowrap; }
.folder:hover .folder-content, .folder:focus-within .folder-content, .folder.open .folder-content { display: block; }
.folder-content li { margin: 0; }
.folder-content a { display: block; padding: .1em 0; line-height: 1.75em; color: var(--lime); text-decoration: none; }
.folder-content a:hover { opacity: .8; }
.header-cta { display: inline-block; font-family: var(--font-cta); font-weight: 500; line-height: normal; padding: 19.2px 40px; background: var(--lime); color: var(--navy); text-decoration: none; }
.header-cta:hover { opacity: .8; }
.menu-toggle { display: none; }

@media (max-width: 767px) {
  :root { --header-h: calc(12vw + 65px); }
  .site-header { padding: 6vw; }
  .logo img { height: 65px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 7px; width: 44px; height: 44px; padding: 8px; background: none; border: 0; cursor: pointer; position: relative; z-index: 2; }
  .menu-toggle span:not(.sr-only) { display: block; height: 2px; background: var(--lime); transition: transform .2s; }
  .nav-open .menu-toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
  .nav-open .menu-toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
  #site-nav { display: none; position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; align-items: stretch; gap: 2rem; padding: 6vw; background: var(--navy); overflow-y: auto; }
  .nav-open #site-nav { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .folder > button { font-size: 1.8rem; width: 100%; text-align: left; }
  .folder-content { position: static; display: none; text-align: left; padding: .5rem 0 0 1rem; }
  .folder.open .folder-content { display: block; }
  .folder:hover .folder-content { display: none; }
  .folder.open:hover .folder-content { display: block; }
  .folder-content a { font-size: 1.3rem; padding: .3rem 0; }
  .header-cta { text-align: center; font-size: 1.3rem; }
}

/* ---------- Footer ---------- */
.site-footer .page-section { min-height: 0; }

/* Cookie consent banner (shown only when GA4 is installed) */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 560px; margin-left: auto;
  padding: 1rem 1.2rem; background: var(--navy); color: var(--white); font-family: var(--font); font-size: .95rem; line-height: 1.45;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); border-top: 4px solid var(--lime); }
.consent a { color: var(--lime); }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 .8rem; }
.consent-actions { display: flex; gap: .6rem; justify-content: flex-end; }
.consent button { font: 600 .95rem var(--font); padding: .55rem 1.2rem; cursor: pointer; border: 1px solid var(--lime); }
.consent [data-consent="denied"] { background: transparent; color: var(--white); }
.consent [data-consent="granted"] { background: var(--lime); color: var(--navy); }
.consent-link { display: block; margin: 0 auto; padding: .8rem 0 1.2rem; background: none; border: 0; cursor: pointer;
  font: .85rem var(--font); color: var(--white); text-decoration: underline; }

/* Conflict-check note above each form's Send button */
.contact-form .form-note { margin: 0 0 20px; font-size: .85rem; line-height: 1.45; color: var(--p); }
