/* Twisdale Law, PC — static site stylesheet. System fonts only (no
   external font requests) to keep the site fully self-contained and fast.
   Palette: forest green (matches the firm's existing logo mark) + gold,
   no blue — per client preference, keyed off the current site's green and
   Notre Dame's green/gold (the Fighting Irish alternate look), since the
   client's prior firm used a blue scheme he wants to move away from. */
:root{
  --navy:#133624; --navy-2:#1b5c3a; --gold:#ae8530; --gold-light:#c9a35c; --gold-text:#8d6c27;
  --cream:#faf8f4; --ink:#1c2430; --ink-soft:#4b5563; --line:#e3ddd0;
  --green:#2f9150; --card-bg:#ffffff; --radius:10px;
  --shadow:0 4px 16px rgba(19,54,36,.08);
  --serif:Georgia,'Times New Roman',Times,serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:var(--sans);color:var(--ink);background:var(--cream);line-height:1.6}
img{max-width:100%;display:block}
a{color:var(--navy-2);text-decoration:none}
a:hover{color:var(--gold-text)}
h1,h2,h3,h4{font-family:var(--serif);color:var(--navy);line-height:1.2;margin:0 0 .5em}
h1{font-size:clamp(2rem,4vw,2.9rem)}
h2{font-size:clamp(1.5rem,3vw,2rem)}
h3{font-size:1.25rem}
p{margin:0 0 1em}
.skip-link{position:absolute;left:-999px;top:0;background:var(--navy);color:#fff;padding:.6em 1em;z-index:1000}
.skip-link:focus{left:0}

/* Header */
.site-header{position:sticky;top:0;z-index:100;background:rgba(19,54,36,.96);backdrop-filter:blur(8px);border-bottom:1px solid rgba(255,255,255,.08)}
.header-inner{max-width:1180px;margin:0 auto;display:flex;align-items:center;gap:1.5rem;padding:0 1.5rem;height:76px}
.brand{display:flex;align-items:center;gap:.6rem;color:#fff;font-family:var(--serif);font-size:1.25rem;font-weight:700;flex-shrink:0}
.brand img{border-radius:6px}
.brand:hover{color:var(--gold-light)}
.main-nav{display:flex;gap:1.4rem;flex:1;flex-wrap:wrap}
.main-nav a{color:rgba(255,255,255,.85);font-size:.95rem;white-space:nowrap}
.main-nav a:hover,.main-nav a.active{color:var(--gold-light)}
.cta{background:var(--gold);color:var(--ink);padding:.6em 1.2em;border-radius:999px;font-size:.9rem;font-weight:600;white-space:nowrap}
.cta:hover{background:var(--gold-light);color:var(--ink)}
.nav-toggle{display:none;background:none;border:none;color:#fff;font-size:1.5rem;cursor:pointer}

/* Blog topic submenu (generated between the BLOGNAV markers — see
   scripts/blognav.py). Opens on hover for a mouse and on :focus-within for a
   keyboard, so it works with JS disabled; main.js adds click + Escape. */
/* THE DEAD ZONE RULE: no gap between a menu and the thing that opens it.
   The submenu used to sit 4px below the nav item (margin-top). Moving the
   pointer across those 4px left both elements, the menu closed, and the
   dropdown was unusable with a mouse. Any spacing is INSIDE the panel
   (padding), never between it and its trigger — same reason the flyout below
   overlaps its parent by a pixel. */
.nav-item.has-sub{position:relative;display:flex;align-items:center;gap:.3rem}
.sub-toggle{background:none;border:none;padding:.15rem .1rem;color:rgba(255,255,255,.85);font-size:.85rem;line-height:1;cursor:pointer}
.sub-toggle:hover,.has-sub:hover .sub-toggle,.sub-toggle[aria-expanded="true"]{color:var(--gold-light)}
.sub-menu{display:none;position:absolute;top:100%;left:-.75rem;min-width:230px;margin:0;padding:.5rem 0;list-style:none;background:var(--navy);border:1px solid rgba(255,255,255,.14);border-radius:8px;box-shadow:0 12px 28px rgba(0,0,0,.28);z-index:200}
.has-sub:hover .sub-menu,.has-sub:focus-within .sub-menu,.sub-menu.open{display:block}
.sub-menu > li{position:relative}
.sub-menu a{display:block;padding:.5rem 1.1rem;font-size:.9rem;color:rgba(255,255,255,.85)}
.sub-menu a:hover,.sub-menu a:focus{color:var(--gold-light);background:rgba(255,255,255,.07)}
/* A tag heading that has posts under it gets a caret and a flyout. */
.sub-menu .has-flyout > a::after{content:"\203A";float:right;opacity:.7}
.sub-menu-2{display:none;position:absolute;left:100%;top:-.5rem;min-width:290px;max-width:340px;margin:0;padding:.5rem 0;list-style:none;background:var(--navy-2);border:1px solid rgba(255,255,255,.14);border-radius:8px;box-shadow:0 12px 28px rgba(0,0,0,.32);z-index:210}
.sub-menu .has-flyout:hover > .sub-menu-2,.sub-menu .has-flyout:focus-within > .sub-menu-2{display:block}
.sub-menu-2 a{font-size:.85rem;line-height:1.35;white-space:normal}
.sub-menu-2 .all a{border-top:1px solid rgba(255,255,255,.14);margin-top:.35rem;padding-top:.6rem;font-weight:600;color:var(--gold-light)}
/* (was: last flyout anchored bottom-up — clipped at the top of the window once Trademarks had 5 posts) */
.sub-menu-2{max-height:calc(100vh - 96px);overflow-y:auto}

@media (max-width:900px){
  .main-nav{position:absolute;top:76px;left:0;right:0;background:var(--navy);flex-direction:column;gap:0;padding:.5rem 0;display:none}
  .main-nav.open{display:flex}
  .main-nav a{padding:.75rem 1.5rem;border-bottom:1px solid rgba(255,255,255,.06)}
  .nav-toggle{display:block}
  .cta{display:none}
  /* No hover on a phone: the whole tree is simply part of the stacked menu.
     A flyout that opens sideways off a 375px screen is not a menu. */
  .nav-item.has-sub{flex-direction:column;align-items:stretch;gap:0}
  .sub-toggle{display:none}
  .sub-menu{display:block;position:static;margin:0;padding:0;border:none;border-radius:0;box-shadow:none;background:transparent;min-width:0}
  .sub-menu a{padding:.6rem 1.5rem .6rem 2.6rem;border-bottom:1px solid rgba(255,255,255,.06)}
  .sub-menu .has-flyout > a::after{display:none}
  .sub-menu-2{display:block;position:static;margin:0;padding:0;border:none;border-radius:0;box-shadow:none;background:transparent;min-width:0;max-width:none}
  .sub-menu-2 a{padding-left:3.6rem;font-size:.85rem}
  .sub-menu-2 .all a{border-top:none;margin-top:0;padding-top:.6rem}
}

/* Hero */
.hero{background:linear-gradient(135deg,var(--navy) 0%,var(--navy-2) 60%,#2f7a4c 100%);color:#fff;padding:5rem 1.5rem 4.5rem}
.hero-inner{max-width:820px;margin:0 auto;text-align:left}
.eyebrow{display:inline-block;background:rgba(255,255,255,.12);color:#fff;padding:.35em 1em;border-radius:999px;font-size:.8rem;letter-spacing:.06em;text-transform:uppercase;margin-bottom:1rem}
.hero h1{color:#fff;margin-bottom:.5rem}
.hero .lede{color:rgba(255,255,255,.85);font-size:1.15rem;max-width:640px;margin-bottom:1.75rem}
.btn{display:inline-block;padding:.8em 1.6em;border-radius:999px;font-weight:600;font-size:.95rem}
.btn-primary{background:var(--gold);color:var(--ink)}
.btn-primary:hover{background:var(--gold-light);color:var(--ink)}
.btn-outline{border:1.5px solid var(--navy);color:var(--navy)}
.btn-outline:hover{background:var(--navy);color:#fff}

/* Sections */
.section{padding:4rem 1.5rem}
.section-inner{max-width:1180px;margin:0 auto}
.section-alt{background:#fff}
.section-head{max-width:720px;margin:0 auto 2.5rem;text-align:center}
.section-head p{color:var(--ink-soft)}

.grid{display:grid;gap:1.5rem}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}

.card{background:var(--card-bg);border:1px solid var(--line);border-radius:var(--radius);padding:1.75rem;box-shadow:var(--shadow)}
.card h3{margin-bottom:.5rem}
.card p{color:var(--ink-soft);margin-bottom:1rem}
.icon-circle{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:1rem;color:#fff}
.icon-circle svg{width:28px;height:28px}
.tint-1{background:var(--navy-2)}
.tint-2{background:var(--gold)}
.tint-3{background:var(--green)}
.tint-4{background:#7a4a35}

.about-grid{display:grid;grid-template-columns:280px 1fr;gap:2.5rem;align-items:start}
@media (max-width:760px){.about-grid{grid-template-columns:1fr}}
.headshot-frame{border-radius:50%;overflow:hidden;border:5px solid #fff;box-shadow:var(--shadow);aspect-ratio:1/1}
.headshot-frame img{width:100%;height:100%;object-fit:cover}

.office-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1.25rem}
.office-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.5rem;box-shadow:var(--shadow)}
.office-card .icon-row{display:flex;align-items:center;gap:.5rem;color:var(--ink-soft);font-size:.92rem;margin-top:.4rem}
.office-card .icon-row svg{width:16px;height:16px;flex-shrink:0}

.breadcrumb{max-width:1180px;margin:1.25rem auto 0;padding:0 1.5rem;font-size:.85rem;color:var(--ink-soft)}
.breadcrumb .sep{margin:0 .4em;opacity:.5}

blockquote{border-left:3px solid var(--gold);margin:1.5em 0;padding:.25em 1.25em;color:var(--ink-soft);font-style:italic}

.article-meta{color:var(--ink-soft);font-size:.9rem;margin-bottom:1.5rem}
.article-body{max-width:70ch}
.article-body h2{margin-top:1.75em}
.article-body ul,.article-body ol{padding-left:1.4em}
.article-body li{margin-bottom:.5em}

.faq details{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.25rem;margin-bottom:.9rem;box-shadow:var(--shadow)}
.faq summary{font-family:var(--serif);font-size:1.1rem;color:var(--navy);cursor:pointer;font-weight:700}
.faq details p{margin-top:.75rem;color:var(--ink-soft)}

.blog-list{display:grid;gap:1.25rem}
.blog-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.5rem;box-shadow:var(--shadow);display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}
/* Tag pills. Now links to the tag archives, so they need hover/focus states
   and a visible current-page state on the archive's own chip row. */
.tag{display:inline-block;background:var(--cream);color:var(--navy-2);border:1px solid var(--line);padding:.2em .7em;border-radius:999px;font-size:.75rem;margin:0 .3rem .4rem 0}
a.tag:hover,a.tag:focus{background:var(--navy-2);color:#fff;border-color:var(--navy-2)}
a.tag[aria-current="page"]{background:var(--navy);color:#fff;border-color:var(--navy)}
.tag-chips{display:flex;flex-wrap:wrap;align-items:center;gap:0;margin-bottom:.5rem}
.post-tags{margin:0 0 .6rem}

/* Contact form. Inputs used to carry inline styles; they live here now so the
   focus ring, which is an accessibility requirement, is stated once. */
#contact-form label{font-weight:600;color:var(--navy)}
#contact-form input,#contact-form textarea{width:100%;padding:.6em;border:1px solid var(--line);border-radius:6px;font:inherit;color:var(--ink);background:#fff}
#contact-form input:focus,#contact-form textarea:focus{outline:2px solid var(--gold);outline-offset:1px;border-color:var(--navy-2)}
#contact-form button[disabled]{opacity:.6;cursor:progress}
.field-note{font-size:.8rem;color:var(--ink-soft);font-weight:400}
.form-status{margin:.75rem 0 0;font-size:.9rem;min-height:1.2em}
.form-status.ok{color:var(--navy-2);font-weight:600}
.form-status.warn{color:#8a2b17;font-weight:600}
/* Honeypot: off-screen rather than display:none — some bots skip hidden
   fields, and none of them read aria-hidden. */
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

.cta-band{background:var(--navy);color:#fff;text-align:center;padding:3.5rem 1.5rem}
.cta-band h2{color:#fff}
.cta-band p{color:rgba(255,255,255,.8);max-width:560px;margin:0 auto 1.5rem}

/* Footer */
.site-footer{background:#0b1f14;color:rgba(255,255,255,.85);padding:3rem 1.5rem 1.5rem}
.footer-inner{max-width:1180px;margin:0 auto}
.footer-top{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem;border-bottom:1px solid rgba(255,255,255,.1);padding-bottom:1.5rem;margin-bottom:1.5rem}
.footer-brand{display:flex;align-items:center;gap:.75rem}
.footer-logo{border-radius:6px}
.footer-name{font-family:var(--serif);color:#fff;font-size:1.15rem}
.footer-tagline{font-size:.85rem;color:rgba(255,255,255,.6)}
.footer-contact{display:flex;gap:1.5rem;flex-wrap:wrap}
.footer-contact a{color:#fff}
.footer-contact a:hover{color:var(--gold-light)}
.footer-offices{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1.25rem;margin-bottom:1.5rem}
.footer-office{font-size:.88rem;color:rgba(255,255,255,.7)}
.footer-office strong{display:block;color:#fff;font-size:.85rem;letter-spacing:.04em;margin-bottom:.25rem}
.footer-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem;font-size:.8rem;color:rgba(255,255,255,.55);border-top:1px solid rgba(255,255,255,.08);padding-top:1.25rem}

/* compact-desktop nav: 8 items must fit on one line above the 900px hamburger */
@media (min-width:901px) and (max-width:1240px){
  .header-inner{gap:1rem;padding:0 1rem}
  .main-nav{gap:.85rem}
  .main-nav a{font-size:.875rem}
  .cta{padding:.55em .95em;font-size:.85rem}
}
@media (min-width:901px) and (max-width:1120px){
  .brand span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}
