/* ---- Wrenfield Estate Law ---- */
:root{--shell:76rem;--col:34rem;--bar:5.5rem}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--bar) + 2rem)}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);font-size:19px;line-height:1.65}
h1,h2,h3,h4{font-family:var(--serif);font-weight:400;font-style:italic;line-height:1.14;margin:0 0 .6em;letter-spacing:-.014em}
h1{font-size:clamp(2.7rem,7vw,4.8rem);font-weight:400}
h2{font-size:clamp(1.9rem,4vw,2.7rem)}
h3{font-size:1.4rem;letter-spacing:-.01em}
p{margin:0 0 1.15em}
a{color:var(--accent-text)}
a:hover{text-decoration-thickness:2px}
.mono{font-family:var(--mono)}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:2px}
.skip{position:absolute;left:-9999px}
.skip:focus{left:1rem;top:1rem;z-index:30;background:var(--bg);padding:.7rem 1rem;border:2px solid var(--focus)}
.wrap{max-width:var(--shell);margin:0 auto;padding:0 1.75rem}
.eyebrow{font-family:var(--mono);font-size:16px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--muted-2);margin:0 0 1.1rem}
.lede{font-family:var(--serif);font-size:24px;line-height:1.5}
.muted{color:var(--muted)}

/* ---- header ---- */
.bar{position:sticky;top:0;z-index:25;background:var(--bg);border-bottom:1px solid var(--rule)}
.bar .wrap{display:flex;align-items:center;gap:1.25rem;min-height:var(--bar);flex-wrap:wrap}
.mark{display:inline-flex;align-items:center;gap:.75rem;font-size:1.4rem;letter-spacing:-.022em;color:var(--text);text-decoration:none}
.mark::before{content:"";flex:none;width:1.7rem;height:1.7rem;border-radius:var(--radius-xs);background:var(--accent);box-shadow:var(--shadow-brand)}
.bar .mark::before{display:none}
.wordmark{display:block;height:26px;width:auto;overflow:visible}
.wordmark .wm-1{fill:var(--text)}
.wordmark .wm-2{fill:var(--muted)}
.mark b{font-weight:700}
.mark i{font-style:normal;font-weight:400;color:var(--muted)}
.bar nav{margin-left:auto}
.bar nav ul{display:flex;gap:1.7rem;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.bar nav a{font-family:var(--mono);font-size:1rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);text-decoration:none}
.bar nav a:hover{color:var(--accent-text)}
#theme-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;background:transparent;color:var(--muted);border:1px solid var(--field);border-radius:var(--radius-xs);padding:.35rem;cursor:pointer}
#theme-toggle:hover{color:var(--text);border-color:var(--accent-text)}
#theme-toggle svg{width:20px;height:20px;display:block}
#theme-toggle .ic-sun,#theme-toggle .ic-moon{display:none}
[data-theme="light"] #theme-toggle .ic-moon{display:block}
[data-theme="dark"] #theme-toggle .ic-sun{display:block}

/* ---- mobile drawer ---- */
.navbtn{display:none;align-items:center;justify-content:center;min-width:44px;min-height:44px;background:transparent;color:var(--text);border:1px solid var(--field);border-radius:var(--radius-xs);padding:.35rem;cursor:pointer}
.navbtn svg{width:22px;height:22px;display:block}
.navbtn .ic-x{display:none}
.navbtn[aria-expanded="true"] .ic-bars{display:none}
.navbtn[aria-expanded="true"] .ic-x{display:block}
.navscrim{position:fixed;inset:0;z-index:19;background:rgba(0,0,0,.6);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--dur-base) var(--ease),visibility var(--dur-base)}
.navscrim[data-open]{opacity:1;visibility:visible;pointer-events:auto}

/* ---- hero band ---- */
.hero{background:var(--accent);color:var(--on-accent);padding:clamp(4.5rem,11vw,9rem) 0 clamp(4rem,9vw,7rem);border-bottom:1px solid var(--rule)}
.hero .eyebrow{color:var(--on-accent);opacity:.72}
.hero h1{margin:0 0 1.6rem}
.hero .lede{color:var(--on-accent);opacity:.86;margin:0 0 2.4rem}
.hero .btn{background:var(--on-accent);color:var(--accent);border-color:var(--on-accent);box-shadow:0 10px 24px -10px rgba(0,0,0,.45)}
.hero .btn:hover{filter:none;transform:translateY(-1px);box-shadow:0 14px 30px -10px rgba(0,0,0,.55)}

/* ---- sections ---- */
.band{padding:clamp(4rem,8vw,7rem) 0;border-bottom:1px solid var(--rule);scroll-margin-top:calc(var(--bar) + 1rem)}
.band-sunken{background:var(--sunken)}
.band > .wrap > .eyebrow{margin-bottom:1.4rem}
.band > .wrap > * + .eyebrow{margin-top:clamp(3.5rem,7vw,6rem)}
.dual{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(2rem,5vw,4.5rem)}
.dual p:last-child,.prose p:last-child{margin-bottom:0}
.prose{max-width:none}
.btn{display:inline-flex;align-items:center;min-height:52px;padding:.85rem 1.7rem;font-family:var(--mono);font-size:17px;font-weight:500;letter-spacing:.06em;color:var(--on-accent);background:var(--accent);border:1px solid var(--accent);border-radius:var(--radius-pill);text-decoration:none;cursor:pointer;box-shadow:var(--shadow-brand)}
.btn:hover{filter:brightness(1.06)}
.btn-ghost{background:transparent;color:var(--accent-text);border-color:var(--field);box-shadow:none}
.btn-ghost:hover{border-color:var(--accent-text);filter:none}

/* ---- services ---- */
.svcgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(17rem,1fr));gap:1.25rem;margin:2.5rem 0 0}
.card{background:var(--raised);border:1px solid var(--rule);border-top:4px solid var(--accent);border-radius:var(--radius-md);padding:1.9rem 1.6rem 2rem;box-shadow:var(--shadow-card)}
.card:hover{box-shadow:var(--shadow-card-hover)}
.card h3{margin:0 0 .7rem}
.card p{font-size:1.15rem;color:var(--muted);margin:0}

/* ---- people ---- */
.people{display:grid;grid-template-columns:repeat(auto-fit,minmax(19rem,1fr));gap:2.5rem;margin:2.5rem 0 0}
.person h3{margin:0 0 .25rem}
.person .role{font-family:var(--mono);font-size:1rem;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-text);margin:0 0 .9rem}
.person p{font-size:1.15rem;color:var(--muted)}

/* ---- articles ---- */
.postlist{list-style:none;margin:2.5rem 0 0;padding:0}
.postlist li{padding:1.6rem 0;border-top:1px solid var(--rule)}
.postlist li:last-child{border-bottom:1px solid var(--rule)}
.postlist h3{margin:0 0 .4rem}
.postlist a{text-decoration:none;color:var(--text)}
.postlist a:hover{color:var(--accent-text)}
.postmeta{font-family:var(--mono);font-size:1rem;color:var(--muted);margin:0}

/* ---- footer ---- */
footer{padding:3.5rem 0 4.5rem;color:var(--muted);font-size:1.1rem}
footer .wrap{display:flex;justify-content:space-between;align-items:flex-start;gap:2rem;flex-wrap:wrap}
footer .f-right{text-align:right;font-family:var(--mono);font-size:1.05rem}
footer a{color:var(--muted)}

@media (max-width:60rem){.dual{grid-template-columns:1fr}}
@media (max-width:44rem){footer .wrap{flex-direction:column}footer .f-right{text-align:left}}
@media (max-width:960px){
  .bar{z-index:26}
  .bar .wrap{flex-wrap:nowrap;gap:.75rem}
  [data-nav="js"] .navbtn{display:inline-flex;margin-left:auto;order:2}
  [data-nav="js"] #theme-toggle{order:3}
  [data-nav="js"] .navdrawer{position:fixed;top:0;left:0;bottom:0;z-index:20;width:min(82vw,20rem);margin:0;padding:calc(var(--bar) + 1.5rem) 1.75rem 2rem;background:var(--bg);border-right:1px solid var(--rule);overflow-y:auto;transform:translateX(-100%);visibility:hidden;transition:transform var(--dur-base) var(--ease),visibility var(--dur-base)}
  [data-nav="js"] .navdrawer[data-open]{transform:none;visibility:visible}
  .navdrawer ul{flex-direction:column;gap:0;flex-wrap:nowrap}
  .navdrawer a{display:block;font-size:1.15rem;padding:1rem 0;border-bottom:1px solid var(--rule)}
}

/* ---- full screen hero with intake form, index only ---- */
.xhero{position:relative;isolation:isolate}
.xhero-media{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0;overflow:hidden}
/* object-position selects which part of the frame is shown. It never alters the file. */
.xhero-img{display:block;width:100%;height:100%;object-fit:cover;object-position:56% 42%}
/* The photograph runs full bleed with nothing over it. The copy gets its own
   surface instead: an inverted plate that feathers into the picture. */
.xhero-plate{position:absolute;left:0;top:0;bottom:0;width:100%;background:var(--panel)}
.xhero-grid{position:relative;z-index:1;display:grid;gap:clamp(2rem,4vw,3.5rem)}
.xhero-copy{max-width:var(--measure)}
.xhero-copy .eyebrow{color:var(--panel-muted)}
.xhero-copy h1{color:var(--panel-text);margin:0 0 1.5rem}
.xhero-copy .lede{color:var(--panel-text);margin:0}

/* desktop: full viewport less the bar, two columns, card centred */
@media (min-width:60rem){
  .xhero{display:flex;align-items:center;min-height:calc(100svh - var(--bar))}
  .xhero .xhero-grid{width:100%;grid-template-columns:minmax(0,1.15fr) minmax(0,.95fr);align-items:center;padding-top:clamp(3rem,6vh,5rem);padding-bottom:clamp(3rem,6vh,5rem)}
  .xhero .xhero-copy{align-self:start;max-width:calc(var(--colw) + var(--gutw) - 6.5rem)}
  /* right edge tracks the grid: wrap inset + 1.75rem gutter + the 1.15fr column */
  .xhero{--wrapw:min(100vw,var(--shell));--gutw:clamp(2rem,4vw,3.5rem);
         --colw:calc((var(--wrapw) - 3.5rem - var(--gutw)) * 1.15 / 2.1);
         --plate-right:calc((100vw - var(--wrapw))/2 + 1.75rem + var(--colw) + var(--gutw) - 0.5px)}
  .xhero-plate{width:var(--plate-right);
    -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 6rem),transparent 100%);
            mask-image:linear-gradient(to right,#000 calc(100% - 6rem),transparent 100%)}
}
/* handset: image band is 62svh and carries the copy; the card follows below it */
@media (max-width:59.99rem){
  .xhero-media{bottom:auto;height:62svh}
  .xhero-copy{display:flex;flex-direction:column;justify-content:flex-end;min-height:62svh;padding:clamp(1rem,3vw,2rem) 0}
  /* no horizontal feather here: the plate is full width and fades upward only */
  .xhero-plate{width:100%;-webkit-mask-image:none;mask-image:none;
    background:linear-gradient(to bottom,transparent 0,var(--panel) 2rem,var(--panel) 100%)}
  .xhero-copy h1{font-size:clamp(2rem,7.4vw,2.4rem);margin:0 0 1rem}
  .xhero-panel{padding:0 0 clamp(3rem,7vw,4.5rem)}
  .xhero-grid{gap:1.5rem}
}

/* ---- intake card ---- */
.intake{background:var(--raised);border:1px solid var(--rule);border-radius:var(--radius-lg);padding:clamp(1.5rem,2.4vw,1.9rem);box-shadow:var(--shadow-card-hover)}
/* glass only at the desktop breakpoint, where the card actually sits on the photograph.
   No @supports branch means fully opaque --raised, never a low contrast wash. */
@media (min-width:60rem){
  @supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
    .intake{background:var(--glass);-webkit-backdrop-filter:blur(20px) saturate(1.1);backdrop-filter:blur(20px) saturate(1.1)}
  }
}
@media (prefers-reduced-transparency:reduce){
  .intake{background:var(--raised);-webkit-backdrop-filter:none;backdrop-filter:none}
}
.intake-h{font-size:1.6rem;margin:0 0 .5rem}
.intake-note{font-size:1.05rem;line-height:1.5;color:var(--muted);margin:0 0 1.1rem}
.field{margin:0 0 .85rem}
.field > label{display:block;font-family:var(--sans);font-size:1.05rem;font-weight:600;color:var(--text);margin:0 0 .35rem}
.hint{font-size:1rem;line-height:1.45;color:var(--muted);margin:0 0 .45rem}
.intake input[type="text"],.intake input[type="email"],.intake input[type="tel"],.intake textarea{display:block;width:100%;min-height:48px;padding:.65rem .8rem;font-family:var(--sans);font-size:1.05rem;line-height:1.5;color:var(--text);background:var(--bg);border:1px solid var(--field);border-radius:var(--radius-xs)}
.intake textarea{resize:vertical}
.intake input:focus-visible,.intake textarea:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.intake .btn{width:100%;justify-content:center}
.intake-notice{font-size:1rem;line-height:1.45;color:var(--muted);margin:0 0 .85rem}
.intake-after{font-size:1rem;line-height:1.45;color:var(--muted);margin:.85rem 0 0}
.consent{display:flex;align-items:flex-start;gap:.65rem}
.consent input{flex:none;width:1.4rem;height:1.4rem;margin:.2rem 0 0;accent-color:var(--accent)}
.consent > label{font-size:1.05rem;font-weight:400;margin:0}

/* ---- pills: real radios, state legible without colour ---- */
.pillset{margin:0 0 .85rem;padding:0;border:0;min-width:0}
.pillset legend{padding:0;font-family:var(--sans);font-size:1.05rem;font-weight:600;color:var(--text)}
.pills{display:flex;flex-wrap:wrap;gap:.45rem;margin:.45rem 0 0}
.pill-in{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;pointer-events:none}
.pill{display:inline-flex;align-items:center;gap:.55rem;min-height:44px;padding:.5rem .95rem;font-family:var(--sans);font-size:1rem;font-weight:500;color:var(--text);background:var(--raised);border:2px solid var(--field);border-radius:var(--radius-pill);cursor:pointer}
.pill::before{content:"";flex:none;width:1.05rem;height:1.05rem;border-radius:var(--radius-pill);border:2px solid var(--field);background:transparent}
.pill:hover{background:var(--accent-soft);border-color:var(--accent-text)}
.pill-in:focus-visible + .pill{outline:3px solid var(--focus);outline-offset:3px}
.pill-in:checked + .pill{background:var(--accent);color:var(--on-accent);border-color:var(--accent-text);font-weight:600}
.pill-in:checked + .pill::before{background:var(--on-accent);border-color:var(--on-accent)}

/* ---- honeypot: off screen by offset, never display none ---- */
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
