/* Corran & Vale — law firm website concept. Independent of the main site's stylesheet.
   Fonts are self-hosted (SIL OFL, licences in fonts/). */

@font-face {
  font-family: "Source Serif 4";
  src: url(fonts/source-serif-4-latin-opsz-normal.woff2) format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F5F2EC;
  --paper-2: #ECE6DC;
  --ink: #1A1C20;
  --ink-2: #3D4047;
  --muted: #676A70;
  --rule: #D5CEC2;
  --accent: #7A2E2A;
  --accent-dark: #5A1F1C;
  --night: #1B1E23;
  --night-text: #ECE7DE;
  --night-muted: #A8A39A;
  --night-rule: #3A3D43;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink-2); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--serif); font-weight: 430; font-optical-sizing: auto; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(44px, 6.6vw, 92px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 3.8vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2vw, 27px); line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }
section[id], article[id] { scroll-margin-top: 96px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-tint { background: var(--paper-2); border-top: 0 !important; }
.section-night { background: var(--night); color: var(--night-muted); border-top: 0 !important; }
.section-night h2, .section-night h3 { color: var(--night-text); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--paper); font-weight: 500; }
.skip:focus { top: 12px; }

/* Small uppercase section labels: "01  Practice" with a hairline */
.label { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(24px, 3vw, 36px); font: 500 12.5px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.label b { font-weight: 600; color: var(--accent); }
.section-night .label { color: var(--night-muted); }
.section-night .label::after { background: var(--night-rule); }
.section-night .label b { color: #D9A39C; }

.lead { max-width: 34em; font-family: var(--serif); font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; color: var(--ink-2); }
.small { font-size: 14.5px; color: var(--muted); }
.mt-40 { margin-top: 40px; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; background: var(--accent); color: var(--paper); font: 500 15.5px/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; border: 1px solid var(--accent); border-radius: 2px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.link { display: inline-block; padding: 10px 0; background: none; border: 0; font: inherit; font-weight: 500; cursor: pointer; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--rule); transition: text-decoration-color 0.15s; }
.link:hover { text-decoration-color: var(--accent); }
.arrow { display: inline-block; margin-left: 6px; transition: transform 0.2s; }
a:hover .arrow { transform: translateX(4px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* ---------- Concept bar (links back to the designer's site) ---------- */
.concept-bar { background: var(--ink); color: #C9C4BA; font-size: 13.5px; }
.concept-bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: 9px; padding-bottom: 9px; }
.concept-bar a { color: var(--paper); text-underline-offset: 3px; }
.concept-bar nav { display: flex; gap: 20px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(245 242 236 / 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; min-height: 76px; }
.wordmark { display: inline-flex; flex-direction: column; gap: 3px; text-decoration: none; }
.wordmark-name { font: 460 25px/1 var(--serif); letter-spacing: -0.01em; color: var(--ink); }
.wordmark-name span { color: var(--accent); }
.wordmark-sub { font: 500 10.5px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15.5px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--accent); }
.nav a[aria-current] { color: var(--accent); }
.nav .nav-phone { padding-left: 28px; border-left: 1px solid var(--rule); font-variant-numeric: tabular-nums; font-weight: 500; }
.nav .nav-phone:hover { border-bottom-color: transparent; color: var(--accent); }
.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px; background: none; border: 0; font: 500 15px var(--sans); color: var(--ink); cursor: pointer; }
.menu-toggle-bars { position: relative; width: 20px; height: 1.5px; background: currentColor; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 1.5px; background: currentColor; transition: transform 0.2s; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Below 940px the nav collapses behind a Menu button — only when JS is running, so it never hides for good. */
@media (max-width: 939px) {
  .js .menu-toggle { display: inline-flex; }
  .js .nav { display: none; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 20px; }
  .js .nav.is-open { display: flex; }
  .js .nav a { min-height: 54px; font-size: 18px; border-bottom: 1px solid var(--rule); }
  .js .nav a[aria-current] { border-bottom-color: var(--rule); }
  .js .nav .nav-phone { padding-left: 0; border-left: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 120px) 0 clamp(64px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }
.hero-kicker { margin-bottom: 28px; font: 500 13px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.hero h1 { max-width: 11.5em; margin-bottom: 32px; }
.hero .lead { margin-bottom: 40px; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 7.4fr) minmax(0, 3.6fr); gap: 80px; align-items: end; }
}

/* Key facts beside the hero */
.facts { border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }

/* Page hero for inner pages */
.page-hero { padding: clamp(56px, 7vw, 104px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--rule); }
.page-hero h1 { max-width: 14em; margin-bottom: 28px; font-size: clamp(40px, 5.2vw, 76px); }
.crumbs { margin-bottom: 28px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--accent); }

/* ---------- Section headings ---------- */
.head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 80px; margin-bottom: clamp(40px, 5vw, 64px); }
.head h2 { max-width: 13em; }
.head p { max-width: 32em; }
@media (min-width: 980px) { .head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; } }

/* ---------- Practice list (home) ---------- */
.practice-list { border-top: 1px solid var(--ink); counter-reset: area; }
.practice-list a { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 6px 20px; padding: 26px 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: background 0.2s, padding 0.2s; }
.practice-num { grid-row: span 2; font: 400 15px/2 var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }
.practice-list h3 { transition: color 0.15s; }
.practice-list p { max-width: 38em; color: var(--ink-2); }
.practice-list .arrow { display: none; }
.practice-list a:hover h3 { color: var(--accent); }
@media (min-width: 980px) {
  .practice-list a { grid-template-columns: 4em minmax(0, 4fr) minmax(0, 6fr) 2em; align-items: baseline; gap: 32px; padding: 30px 12px; margin: 0 -12px; }
  .practice-num { grid-row: auto; }
  .practice-list .arrow { display: block; justify-self: end; color: var(--accent); font-size: 20px; }
  .practice-list a:hover { background: var(--paper-2); }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 48px 40px; }
.steps li { padding-top: 20px; border-top: 1px solid var(--night-rule); }
.step-num { display: block; margin-bottom: 18px; font: 300 56px/1 var(--serif); color: #D9A39C; font-variant-numeric: lining-nums; }
.steps h3 { margin-bottom: 10px; }
.steps p { font-size: 16px; line-height: 1.6; }

/* ---------- Fees ---------- */
.fees { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 80px; }
.fees h2 { max-width: 11em; margin-bottom: 20px; }
.fee-list { border-top: 1px solid var(--ink); }
.fee-list li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 32px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.fee-list h3 { font-size: 23px; }
.fee-note { margin-top: 24px; }
@media (min-width: 760px) { .fee-list li { grid-template-columns: 11em minmax(0, 1fr); } }
@media (min-width: 980px) { .fees { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* ---------- People ---------- */
/* Portraits are typographic monogram tiles; a real firm would supply photography. */
.portrait { position: relative; display: grid; place-items: center; width: 88px; aspect-ratio: 1; flex: none; background: var(--night); transition: background 0.2s; }
.portrait::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgb(236 231 222 / 0.16); }
.portrait span { font: 300 32px/1 var(--serif); letter-spacing: 0.02em; color: #E3B5AE; }

.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 40px; }
.partner-card { display: block; padding-top: 28px; border-top: 1px solid var(--ink); text-decoration: none; }
.partner-card .portrait { margin-bottom: 24px; }
.partner-card:hover .portrait { background: var(--accent); }
.partner-card h3 { margin-bottom: 4px; }
.partner-card p:last-child { margin-top: 14px; max-width: 26em; font-size: 16px; }
.role { font-size: 15px; color: var(--muted); }
.role strong { font-weight: 500; color: var(--accent); }

/* Full profiles on the People page */
.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 64px; padding: clamp(40px, 5vw, 64px) 0; border-bottom: 1px solid var(--rule); }
.profile .portrait { width: 180px; }
.profile .portrait span { font-size: 64px; }
.profile .portrait::before { inset: 8px; }
.profile h2 { margin-bottom: 6px; font-size: clamp(30px, 3vw, 40px); }
.profile .role { margin-bottom: 22px; }
.profile p + p { margin-top: 14px; }
.profile-body { max-width: 40em; }
.profile dl { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 15px; }
.profile dt { color: var(--muted); }
.profile dd { color: var(--ink); }
@media (min-width: 820px) { .profile { grid-template-columns: 180px minmax(0, 1fr); } }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 40px 32px; }
.team-grid li { display: flex; gap: 20px; align-items: flex-start; padding-top: 20px; border-top: 1px solid var(--rule); }
.team-grid .portrait { width: 64px; }
.team-grid .portrait span { font-size: 23px; }
.team-grid .portrait::before { inset: 4px; }
.team-grid h3 { font-size: 21px; margin-bottom: 4px; }

/* ---------- Practice areas page ---------- */
.areas-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px 80px; }
.areas-index { display: none; }
@media (min-width: 980px) {
  .areas-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .areas-index { display: block; position: sticky; top: 112px; align-self: start; }
  .areas-index p { margin-bottom: 14px; font: 500 12.5px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
  .areas-index a { display: flex; gap: 12px; padding: 9px 0; font-size: 15.5px; color: var(--ink-2); text-decoration: none; border-top: 1px solid var(--rule); }
  .areas-index a span { color: var(--accent); font-variant-numeric: tabular-nums; }
  .areas-index a:hover, .areas-index a[aria-current] { color: var(--accent); }
}
.area { padding: 0 0 clamp(56px, 6vw, 80px); }
.area + .area { padding-top: clamp(48px, 5vw, 64px); border-top: 1px solid var(--rule); }
.area-num { display: block; margin-bottom: 12px; font: 500 13px var(--sans); letter-spacing: 0.14em; color: var(--accent); }
.area h2 { margin-bottom: 20px; }
.area > p { max-width: 38em; }
.area-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px 56px; margin-top: 32px; }
.area h3 { margin-bottom: 12px; font: 600 13px/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ticks li { position: relative; padding: 9px 0 9px 22px; border-top: 1px solid var(--rule); font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 9px; height: 2px; background: var(--accent); }
.area-meta { display: grid; gap: 10px; font-size: 16px; }
.area-meta div { padding: 9px 0; border-top: 1px solid var(--rule); }
.area-meta dt { font-size: 14px; color: var(--muted); }
.area-meta dd { color: var(--ink); }
.area-meta a { text-underline-offset: 4px; text-decoration-color: var(--rule); }
.area-meta a:hover { text-decoration-color: var(--accent); }

/* ---------- Enquiry ---------- */
.enquiry { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px 96px; }
@media (min-width: 980px) { .enquiry { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.enquiry h2 { margin-bottom: 16px; }
.enquiry .intro { max-width: 34em; margin-bottom: 36px; }
.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px; }
.field { display: grid; gap: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; background: #FBFAF7; color: var(--ink); font: 400 16.5px/1.4 var(--sans); border: 1px solid #A39C90; border-radius: 2px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.consent input { flex: none; width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); }
.form .small { margin-top: -6px; }

.office { align-self: start; padding: 28px; background: var(--paper-2); border-top: 2px solid var(--accent); }
.office h3 { margin-bottom: 20px; font-size: 24px; }
.office dl { display: grid; gap: 16px; font-size: 15.5px; }
.office dt { font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.office dd { color: var(--ink); }
.office a { text-underline-offset: 4px; text-decoration-color: var(--rule); }
.office a:hover { text-decoration-color: var(--accent); }

/* ---------- Closing band ---------- */
.band { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px 64px; }
.band h2 { max-width: 15em; }
.band p { max-width: 30em; margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 32px; background: var(--night); color: var(--night-muted); font-size: 15px; }
.site-footer a { color: var(--night-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--night-rule); }
.site-footer .wordmark-name { color: var(--night-text); }
.site-footer .wordmark-name span { color: #D9A39C; }
.site-footer .wordmark-sub { color: var(--night-muted); }
.footer-grid h4 { margin-bottom: 12px; font: 500 12.5px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--night-muted); }
.footer-grid li { padding: 4px 0; }
.footer-grid p { margin-top: 16px; max-width: 24em; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 24px; font-size: 13.5px; }
.footer-legal p { max-width: 52em; }

/* ---------- Concept dialog ---------- */
.concept-dialog { max-width: min(480px, calc(100% - 32px)); margin: auto; padding: 36px 32px 28px; background: var(--paper); color: var(--ink-2); border: 0; border-top: 3px solid var(--accent); box-shadow: 0 24px 64px rgb(26 28 32 / 0.25); }
.concept-dialog::backdrop { background: rgb(26 28 32 / 0.55); }
.concept-dialog h2 { margin-bottom: 14px; font-size: 30px; }
.concept-dialog p { margin-bottom: 24px; }
.concept-dialog .actions { gap: 12px 20px; }
.concept-dialog form { display: contents; }
