/*
Theme Name: Schell Bray
Author: Forcefield Web Development
Author URI: https://forcefieldnc.com
Version: 1.0
Description: Custom theme for Schell Bray PLLC
*/

/* ── Brand ── */
:root {
    --sb-navy:  #003e7e;
    --sb-taupe: #9a8c7e;
    /* The logo's lighter blue is #5e88a2, which is 3.8:1 on white: fine for
       the arc in the mark, under 4.5:1 for the small uppercase links that
       use it. Same hue, darkened until it clears 4.5:1 on white and the wash. */
    --sb-slate: #4f7288;

    /* The taupe is 3.3:1 on white, so the small uppercase labels and dates
       that sit on white or the wash take this darker cut of the same hue,
       5.0:1. Borders, icons and anything on the navy keep the real taupe. */
    --sb-taupe-text: #7b6d60;

    /* Info bar only. Taupe on brand navy is 3.2:1, under the 4.5:1 small text
       needs and the city labels are 11px. Dropping the bar to this reads 4.8:1
       without touching the taupe, which has to stay matched to the logo. */
    --sb-navy-deep: #002347;
    --sb-ink:   #333;
    --sb-rule:  #e2e2e2;
    --sb-wash:  #f8f8f8;

    --info-bar-h: 36px;
}

/* ── Fonts ── */
/* font-display: optional, not swap, paired with the preloads in
   ff_resource_hints(). The preloaded file is used when it arrives in time and
   the fallback is kept for that load otherwise, so the web font never reflows
   the hero heading mid-load.
   Hanken is the variable file: one 34KB request covers every weight, which
   beats shipping two statics for the 400 and 600 this design uses. */
@font-face {
    font-family: 'Hanken Grotesk';
    src: url('fonts/hanken-grotesk-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: optional;
}

/* Display face for H1 and H2. Single weight by design: Marcellus ships 400
   only, so headings must never ask for a bolder weight or the browser
   synthesises one and the Roman letterforms smear. */
@font-face {
    font-family: 'Marcellus';
    src: url('fonts/marcellus-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }

/* ── Base ── */
html {
    /* No elastic overscroll bounce — it exposes empty space above a fixed
       header. Tradeoff: also disables Chrome-Android pull-to-refresh, which
       is fine for brand/marketing sites; DROP this line for a content/app
       site where users pull to refresh. The background is a fallback for
       browsers that ignore overscroll-behavior — set it to the site's
       header/hero color so any exposed gap blends instead of flashing white. */
    overscroll-behavior-y: none;
    background: #002347;
}

body {
    font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

/* H1 and H2 only. H3 down stay in the sans: card titles and small headings
   read better as UI than as display type. */
h1, h2 {
    font-family: 'Marcellus', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    line-height: 1.18;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p + p { margin-top: 1em; }

/* ── Container ── */
.ff-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Buttons ── */
.ff-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ff-btn-primary {
    background: #333;
    color: #fff;
}

.ff-btn-primary:hover {
    background: #111;
}

.ff-btn-outline {
    background: transparent;
    border: 2px solid #333;
    color: #333;
}

.ff-btn-outline:hover {
    background: #333;
    color: #fff;
}

/* ── Header ── */
/* Sticky, not fixed: the header keeps its place in flow, so there's no
   body offset to maintain and no shift when the info bar collapses. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
}

/* Info bar */
.info-bar {
    height: var(--info-bar-h);
    overflow: hidden;
    background: var(--sb-navy-deep);
    color: #fff;
    transition: height 0.25s ease;
}

.info-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--info-bar-h);
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

.info-phones,
.info-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.info-phones .office-city {
    margin-right: 6px;
    color: var(--sb-taupe);
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
}

.info-bar a {
    text-decoration: none;
    transition: color 0.2s;
}

.info-bar a:hover {
    color: var(--sb-taupe);
}

/* Outlined rather than filled: taupe is too light to carry white text at
   this size, and filling it navy-on-taupe fails contrast too. */
.info-portal {
    padding: 4px 14px;
    border: 1px solid var(--sb-taupe);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s, color 0.2s;
}

/* Qualified with the element: the generic `.info-bar a:hover` above turns text
   taupe, and it outranks a bare `.info-portal:hover`, so the label went taupe
   on a taupe fill. */
.info-bar a.info-portal:hover {
    background: var(--sb-taupe);
    color: var(--sb-navy-deep);
}

/* Filled against the portal's outline: Contact is the primary action of the
   pair, and the fill is what lets it leave the nav menu without losing rank. */
.info-contact {
    padding: 4px 14px;
    background: var(--sb-taupe);
    color: var(--sb-navy-deep);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s, color 0.2s;
}

.info-bar a.info-contact:hover {
    background: #fff;
    color: var(--sb-navy-deep);
}

.info-linkedin {
    display: flex;
}

/* Header bar */
.header-bar {
    border-bottom: 1px solid var(--sb-rule);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 16px 20px;
    transition: padding 0.25s ease;
}

.logo-wrap {
    display: block;
    flex-shrink: 0;
}

.site-logo {
    width: auto;
    height: 80px;
    transition: height 0.25s ease;
}

/* Compact state: the info bar rolls up and the logo shrinks, so the sticky
   footprint drops from ~140px to ~85px once you're reading. */
.site-header.is-scrolled .info-bar { height: 0; }
.site-header.is-scrolled .header-inner { padding-top: 10px; padding-bottom: 10px; }
.site-header.is-scrolled .site-logo { height: 58px; }

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 6px 0;
    color: var(--sb-navy);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
    color: var(--sb-slate);
    border-bottom-color: var(--sb-taupe);
}

/* Dropdowns */
/* Hangs a little below its parent rather than straight off it. Flush, with a
   bar across the top, it sat on the hover underline and the two read as one
   thick, mismatched line. */
.main-nav .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: -20px;
    z-index: 10;
    min-width: 230px;
    padding: 8px 0;
    background: #fff;
    border: 1px solid var(--sb-rule);
    box-shadow: 0 10px 24px rgba(0,35,71,.12);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

/* Fills the gap above it. Without this the pointer leaves the <li> on the
   way down and the menu closes before it can be reached. */
.main-nav .sub-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -11px;
    height: 11px;
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.main-nav .sub-menu a {
    padding: 9px 20px;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    text-transform: none;
    border-bottom: none;
}

.main-nav .sub-menu a:hover {
    background: #f4f6f8;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--sb-navy);
    transition: transform 0.25s, opacity 0.2s;
}

.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 200;
    width: min(340px, 85vw);
    height: 100%;
    padding: 80px 30px 30px;
    background: var(--sb-navy);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-drawer.is-open { transform: translateX(0); }

.drawer-close {
    position: absolute;
    top: 22px;
    right: 24px;
    padding: 6px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.drawer-nav a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.drawer-nav .sub-menu a {
    padding: 10px 0 10px 16px;
    font-size: 0.8125rem;
    font-weight: 400;
    text-transform: none;
    color: rgba(255,255,255,0.8);
}

/* Contact lives in the info bar rather than the nav menu, so the drawer has
   to carry it explicitly: it renders the same menu, which no longer has it. */
.drawer-cta {
    display: block;
    margin-top: 26px;
    padding: 13px 18px;
    background: var(--sb-taupe);
    color: var(--sb-navy-deep);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
}

/* The info bar is gone below 768px, so the drawer is the only place the
   payment portal lives on a phone. Secondary to Contact: paying an invoice is
   a returning client's errand, not the reason most people open the menu. */
.drawer-portal {
    display: block;
    margin-top: 12px;
    padding: 13px 18px;
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.drawer-portal:hover {
    border-color: var(--sb-taupe);
    background: rgba(255,255,255,0.06);
}

.drawer-phones {
    margin-top: 30px;
}

.drawer-phones li {
    margin-bottom: 14px;
    color: #fff;
}

.drawer-phones .office-city {
    display: block;
    color: var(--sb-taupe);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.drawer-phones a {
    font-size: 1.0625rem;
    text-decoration: none;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ── Breadcrumb ── */
/* Attorney profiles and news posts both open with one, so it lives here. */
.crumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 26px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sb-taupe-text);
}

.crumb a {
    color: var(--sb-slate);
    text-decoration: none;
}

.crumb a:hover {
    color: var(--sb-navy);
}

/* ── Hero ── */
/* Shared by the front page, practice areas and the news archive, so it lives
   here rather than in a per-template sheet. */
.hero {
    position: relative;
    /* Sized against width, not height, so the box keeps a steady share of the
       3:2 photograph on any desktop. Tied to vh it collapsed into a flat strip
       on a laptop and the photo read as squashed next to the phone's
       near-square crop. */
    height: clamp(400px, 38vw, 600px);
    overflow: hidden;
    background: var(--sb-navy-deep);
}

/* Shorter than the homepage hero: an interior page shouldn't spend as much of
   the first screen on a photograph. */
.hero-compact {
    height: clamp(300px, 30vw, 480px);
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Desktop is wider than the source ratio, so only height is cropped and
       the horizontal keyword does nothing there. It matters on narrow screens,
       where the crop goes horizontal instead: anchoring right keeps the firm's
       own building, the one behind the parking deck, in frame. */
    object-position: right 42%;
}

.hero-img-own {
    object-position: center;
}

/* Weighted left, clearing toward the right so the photo still reads as a
   photo rather than a flat navy panel. Lighter than it would need to be over
   a daylight shot: the image is already a night scene, and stacking a heavy
   navy scrim on top crushes the tower and the lit windows into mud. */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(0,35,71,.88) 0%, rgba(0,35,71,.66) 48%, rgba(0,35,71,.28) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

/* A short rise and fade, staggered down the three elements. Deliberately
   restrained: 8px and half a second, once, on load. The hero image is the LCP
   element and isn't animated, so this costs nothing measurable. */
@keyframes ff-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.hero h1,
.hero-lede,
.hero-btn {
    animation: ff-rise .55s cubic-bezier(.22, .61, .36, 1) both;
}

.hero-lede { animation-delay: .09s; }
.hero-btn  { animation-delay: .18s; }

/* Slightly larger and looser than the sans version was: Marcellus has a
   small x-height, so it reads smaller at the same nominal size, and the
   negative tracking that suited the grotesque closes up its serifs. */
.hero h1 {
    font-size: clamp(2.1rem, 4.1vw, 3.3rem);
    line-height: 1.2;
    letter-spacing: 0;
    color: #fff;
}

.hero-lede {
    margin-top: 16px;
    font-size: 1.0625rem;
    color: rgba(255,255,255,.88);
}

.hero-btn {
    margin-top: 28px;
    background: var(--sb-taupe);
    color: var(--sb-navy-deep);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hero-btn:hover {
    background: #fff;
}

/* ── Motion preference ── */
@media (prefers-reduced-motion: reduce) {
    .hero h1,
    .hero-lede,
    .hero-btn {
        animation: none;
    }
}

/* ── Footer ── */
#footer {
    background: var(--sb-navy-deep);
    color: rgba(255,255,255,.78);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 46px;
}

.footer-brand img {
    width: 240px;
    height: auto;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}

.footer-links a {
    color: #fff;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--sb-taupe);
}

.footer-linkedin {
    display: flex;
}

.footer-label {
    margin-bottom: 12px;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--sb-taupe);
}

.footer-office address {
    font-style: normal;
    font-size: .9375rem;
    line-height: 1.7;
}

.footer-phone {
    display: inline-block;
    margin-top: 12px;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.3);
    padding-bottom: 2px;
    transition: border-color .2s, color .2s;
}

.footer-phone:hover {
    color: var(--sb-taupe);
    border-bottom-color: var(--sb-taupe);
}

.footer-menu a {
    display: block;
    padding: 5px 0;
    color: rgba(255,255,255,.78);
    font-size: .9375rem;
    text-decoration: none;
    transition: color .2s;
}

.footer-menu a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.14);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 20px;
    padding-bottom: 20px;
    font-size: .75rem;
    color: rgba(255,255,255,.55);
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: rgba(255,255,255,.78);
    text-decoration: none;
    transition: color .2s;
}

.footer-legal a:hover {
    color: #fff;
}

.footer-legal button {
    padding: 0;
    background: none;
    border: 0;
    color: rgba(255,255,255,.78);
    font: inherit;
    cursor: pointer;
    transition: color .2s;
}

.footer-legal button:hover {
    color: #fff;
}

.footer-note {
    max-width: 560px;
}

/* #ccc is for light footers; on the navy it would outshine the copyright line.
   Sized to its text so the link isn't a footer-wide click target; the right
   margin lands it on the .ff-container content edge. */
.ff-credit {
    display: block;
    width: fit-content;
    margin: 0 max(20px, calc((100% - 1300px) / 2 + 20px)) 12px auto;
    font-size: 9px;
    color: rgba(255,255,255,.22);
    text-decoration: none;
    letter-spacing: .5px;
}

/* ── Cookie notice ── */
/* Fixed, so it never moves the page it sits over. The two buttons are the
   same size and weight: declining is not made harder than accepting. */
.consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px 28px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #fff;
    border-top: 3px solid var(--sb-navy);
    box-shadow: 0 -6px 24px rgba(0,0,0,.12);
    font-size: .875rem;
    line-height: 1.6;
    color: var(--sb-ink);
}

.consent[hidden] {
    display: none;
}

.consent p {
    max-width: 62ch;
}

.consent a {
    color: var(--sb-navy);
    text-underline-offset: 3px;
}

.consent-actions {
    display: flex;
    gap: 10px;
}

.consent .ff-btn {
    padding: 11px 24px;
    border: 1px solid var(--sb-navy);
    background: #fff;
    color: var(--sb-navy);
    font-size: .875rem;
}

.consent .consent-accept,
.consent .ff-btn:hover {
    background: var(--sb-navy);
    color: #fff;
}

/* ── Skip Link ── */
.ff-skip-link {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal;
}
.ff-skip-link:focus {
    clip: auto;
    display: block;
    height: auto;
    width: auto;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100000;
    padding: 15px 23px;
    background: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
}

/* ── Accessibility ── */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal;
}

/* Self-hosted font template. Use font-display: optional (NOT swap) together
   with a <link rel="preload"> in functions.php: the preloaded font is used
   when it's ready in time, otherwise the fallback is kept for that load with
   no swap — so the web font never reflows big headings (hero CLS). */
/*@font-face {
    font-family: 'YourFont';
    src: url('fonts/yourfont.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}*/

/* ── Responsive ── */
@media (max-width: 1200px) {
    .header-inner { gap: 24px; }
    .site-logo { height: 66px; }
    .main-nav { gap: 22px; }
    .main-nav a { font-size: 0.8125rem; letter-spacing: 0.04em; }
}

@media (max-width: 900px) {
    #site-navigation { display: none; }
    .hamburger { display: flex; }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .hero { height: 320px; }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 40px;
        padding-bottom: 34px;
    }

    .footer-brand img { width: 200px; }

    /* The whole bar goes, rather than being whittled down field by field.
       Everything in it is in the drawer: numbers, Contact and the portal.
       LinkedIn is the exception and lives in the footer on a phone. */
    .info-bar { display: none; }

    .site-logo,
    .site-header.is-scrolled .site-logo { height: 48px; }
    .header-inner { padding: 12px 20px; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
}
