/* Modern treatment of the current sljosephlaw.com identity:
   same slate, navy and coral, same Lusitana and Mulish type. */
:root {
  --slate: #3e4057;
  --slate-deep: #2a2c40;
  --navy: #011640;
  --text: #2f3140;
  --muted: #5a5d6b;
  --coral: #f7404c;        /* large text and decoration only */
  --coral-soft: #ff9aa1;   /* accent on dark surfaces */
  --accent: #cf2835;       /* buttons and small links (readable on white) */
  --accent-dark: #a81e2a;
  --light: #f5f6f8;
  --line: #e1e3ea;
  --field: #7c7f8c;
  --white: #ffffff;
  --serif: "Lusitana", Georgia, "Times New Roman", serif;
  --sans: "Mulish", "Muli", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(1, 22, 64, 0.35), 0 2px 6px -2px rgba(1, 22, 64, 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.7; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; caret-color: var(--accent); }
::selection { background: var(--slate); color: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.18; margin: 0; color: var(--navy); text-wrap: balance; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .contact-band :focus-visible, .page-head :focus-visible, .site-footer :focus-visible, .action-bar :focus-visible { outline-color: var(--white); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 10px 14px; z-index: 100; border-radius: 8px; }

/* Header: one slim bar that stays in view */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease); }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -20px rgba(1, 22, 64, 0.35); }
.bar { display: flex; align-items: center; gap: 28px; height: 78px; }
.brand { display: block; margin-right: auto; flex: 0 1 330px; min-width: 0; }
.brand img { width: 100%; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 700; font-size: 15.5px; text-decoration: none; color: var(--slate); border-radius: 8px; transition: color 0.2s, background-color 0.2s; }
.nav a::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover { color: var(--navy); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--navy); }
.call { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 20px; background: var(--accent); color: var(--white); border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; transition: background-color 0.2s, transform 0.2s var(--ease); }
.call:hover { background: var(--accent-dark); }
.call-short { display: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 46px; height: 46px; cursor: pointer; padding: 0; flex: none; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--slate); margin: 4px auto; border-radius: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; text-decoration: none; font: 700 16px var(--sans); border: 1px solid var(--accent); background: var(--accent); color: var(--white); cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 12px 24px -14px rgba(168, 30, 42, 0.8); }
.btn.outline { background: var(--white); color: var(--navy); border-color: #c9ccd6; }
.btn.outline:hover { border-color: var(--navy); background: var(--white); box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.actions.center { justify-content: center; }
.text-link { display: inline-block; padding: 8px 0; font-weight: 700; color: var(--accent); }

/* Hero: skyline under a navy wash, heading on top */
section { padding: 96px 0; }
.hero { position: relative; padding: 0; color: var(--white); overflow: hidden; background: var(--navy); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 45%; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(1, 22, 64, 0.9) 0%, rgba(1, 22, 64, 0.72) 42%, rgba(42, 44, 64, 0.35) 100%); }
.hero-inner { position: relative; padding-top: 104px; padding-bottom: 150px; }
.hero h1 { color: var(--white); font-weight: 700; font-size: clamp(2.4rem, 5.4vw, 4.3rem); line-height: 1.08; letter-spacing: -0.01em; max-width: 14em; }
.hero blockquote { margin: 28px 0 0; max-width: 40em; }
.hero blockquote p { font-family: var(--serif); font-size: clamp(1.2rem, 2.1vw, 1.6rem); line-height: 1.4; color: var(--white); margin: 0 0 6px; }
.hero blockquote footer { font-size: 15.5px; color: #d5d9e6; }
.hero .actions { margin-top: 36px; }
.hero .btn.outline, .contact-band .btn.outline { background: rgba(255, 255, 255, 0.08); color: var(--white); border-color: rgba(255, 255, 255, 0.5); backdrop-filter: blur(4px); }
.hero .btn.outline:hover, .contact-band .btn.outline:hover { background: rgba(255, 255, 255, 0.16); border-color: var(--white); }
.services-label { margin: 56px 0 0; font-size: 17px; font-weight: 700; color: var(--white); }

/* Service cards sit across the lower edge of the hero */
.services-wrap { padding: 0 0 88px; margin-top: -104px; position: relative; }
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.services li { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 16px 24px; font-size: 15.5px; font-weight: 700; line-height: 1.35; color: var(--navy); }
.services img { width: 84px; height: 84px; }

/* Phone and email band */
.contact-band { background: radial-gradient(120% 140% at 15% 0%, #4d5070 0%, var(--slate) 45%, var(--slate-deep) 100%); color: var(--white); text-align: center; padding: 80px 0; }
.band-phone, .band-email { display: block; font-family: var(--serif); font-weight: 700; text-decoration: none; line-height: 1.25; font-variant-numeric: lining-nums; text-decoration-thickness: 2px; }
.band-phone { font-size: clamp(2.3rem, 5vw, 3.4rem); color: var(--white); }
.band-email { font-size: clamp(1.25rem, 3vw, 1.9rem); color: var(--coral-soft); overflow-wrap: anywhere; margin: 6px 0 30px; }
.band-phone:hover, .band-email:hover { text-decoration: underline; }

/* Experience */
.experience h2, .media h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 30px; }
.exp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; align-items: start; }
.exp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.exp-list li { position: relative; padding: 16px 0 16px 26px; border-bottom: 1px solid var(--line); max-width: 68ch; }
.exp-list li::before { content: ""; position: absolute; left: 2px; top: 1.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--coral); }
.exp-list strong { color: var(--navy); }
.footnote { font-size: 15px; color: var(--muted); margin-top: 14px; }
.portrait { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--light); }
.portrait img { width: 100%; }
.exp-grid .portrait { position: sticky; top: 110px; }
.disclaimer { font-size: 15px; color: var(--muted); background: var(--light); border-radius: 10px; padding: 14px 18px; margin: 24px 0 0; max-width: 68ch; }

/* Media */
.media { background: var(--light); }
.media h2 { text-align: center; }
.media-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.media-logos li { display: grid; place-items: center; height: 96px; background: var(--white); border-radius: 12px; padding: 16px 18px; border: 1px solid var(--line); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.media-logos img { max-height: 46px; max-width: 100%; width: auto; object-fit: contain; }

/* Inner pages */
.page-head { background: linear-gradient(110deg, var(--navy) 0%, var(--slate) 100%); padding: 72px 0 64px; }
.page-head h1 { color: var(--white); font-weight: 700; font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 18em; }
.page-body { padding: 72px 0 96px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: start; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.4rem; letter-spacing: 0.03em; margin: 52px 0 12px; padding-top: 18px; position: relative; }
.prose h2::before { content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 3px; border-radius: 2px; background: var(--coral); }
.prose h3 { font-size: 1.3rem; margin: 30px 0 8px; }
.prose > h2:first-child, .prose > .mark-banner + h2 { margin-top: 0; }
.prose a { color: var(--accent); font-weight: 600; }
.aside { position: sticky; top: 110px; display: grid; gap: 10px; }
.aside .portrait { margin-bottom: 12px; }

.added { display: inline-block; font: 700 11.5px var(--sans); letter-spacing: 0.04em; background: #fff3c4; color: #5c4700; border: 1px dashed #8a6d00; border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 0.1em; }
.mark-banner { font-size: 15px; background: #fff8dc; border: 1px dashed #8a6d00; border-radius: 10px; padding: 12px 16px; color: #4d3d00; }
.mark-banner code { font-size: 14px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.contact-list { margin: 0 0 28px; border-bottom: 1px solid var(--line); }
.contact-list > div { padding: 20px 0; border-top: 1px solid var(--line); }
.contact-list dt { font-size: 15px; font-weight: 700; color: var(--muted); }
.contact-list dd { margin: 2px 0 0; }
.contact-list dd > a:first-child, .contact-list address { display: block; font-family: var(--serif); font-size: 25px; color: var(--navy); text-decoration: none; line-height: 1.35; font-variant-numeric: lining-nums; overflow-wrap: anywhere; }
.contact-list dd > a:first-child:hover { text-decoration: underline; }
form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 36px; }
.notice { background: var(--light); border-radius: 10px; padding: 14px 16px; margin-bottom: 24px; font-size: 15.5px; }
.notice p { margin: 0; }
.field { margin-bottom: 18px; }
label { display: block; font-size: 15.5px; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; min-height: 50px; padding: 12px 14px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); color: var(--text); transition: border-color 0.2s, box-shadow 0.2s; }
input:hover, select:hover, textarea:hover { border-color: var(--navy); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(1, 22, 64, 0.2); }
textarea { min-height: 140px; resize: vertical; }
[aria-invalid="true"] { border-color: #a12a1e; border-width: 2px; }
.error { color: #a12a1e; font-size: 15px; font-weight: 600; margin: 6px 0 0; }
.form-status:not(:empty) { margin-top: 20px; padding: 18px; border-radius: 10px; background: var(--light); font-size: 16px; }
.form-status .actions { margin-top: 14px; }
.map { width: 100%; height: 400px; border: 0; display: block; }

/* Footer */
.site-footer { background: var(--slate-deep); color: #d5d7e2; padding: 64px 0 36px; font-size: 16px; }
.f-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.f-name { font-family: var(--serif); font-size: 1.6rem; color: var(--white); margin: 0 0 8px; }
.f-links { list-style: none; margin: 0; padding: 0; }
.f-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; transition: color 0.2s; }
.f-links a:hover { color: var(--white); text-decoration: underline; }
.legal { font-size: 13.5px; color: #b9bccb; max-width: 90ch; margin: 18px 0 0; }
.f-cols + .legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); }

.action-bar { display: none; }

/* Motion: only when the visitor has not asked for less */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .services li { animation: rise 0.9s var(--ease) both; animation-delay: 0.3s; }
  .services li:nth-child(2) { animation-delay: 0.37s; }
  .services li:nth-child(3) { animation-delay: 0.44s; }
  .services li:nth-child(4) { animation-delay: 0.51s; }
  .services li:nth-child(5) { animation-delay: 0.58s; }
  .hero-bg { animation: settle 1.6s var(--ease) both; }
  .hero-inner > * { animation: rise 0.9s var(--ease) both; }
  .hero-inner > :nth-child(2) { animation-delay: 0.08s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.16s; }
  .hero-inner > :nth-child(4) { animation-delay: 0.24s; }
  .btn:hover, .call:hover { transform: translateY(-2px); }
  .btn:active, .call:active { transform: translateY(0); }
  .media-logos li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  @keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 900px) {
  body { padding-bottom: 62px; font-size: 17px; }
  section { padding: 64px 0; }
  .wrap { padding: 0 22px; }
  .bar { height: 66px; gap: 10px; }
  .brand { flex-basis: 220px; }
  .call { min-height: 44px; padding: 0 16px; }
  .call-num { display: none; }
  .call-short { display: inline; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(1, 22, 64, 0.35); padding: 6px 22px 14px; }
  .nav.open { display: flex; }
  .nav a { min-height: 54px; padding: 0; border-radius: 0; border-top: 1px solid var(--line); }
  .nav a::after { display: none; }
  .hero-inner { padding-top: 56px; padding-bottom: 56px; }
  .hero h1 br { display: none; }
  .hero .btn.outline { display: none; }
  .services-label { margin-top: 40px; }
  .services-wrap { margin-top: 0; padding: 22px 0 56px; background: var(--light); }
  .services { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .services li { padding: 22px 12px 18px; font-size: 15px; }
  .services li:last-child { grid-column: 1 / -1; }
  .services img { width: 68px; height: 68px; }
  .contact-band { padding: 60px 0; }
  .exp-grid, .two-col, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .exp-grid .portrait { position: static; max-width: 320px; }
  .aside { position: static; }
  .aside .portrait { display: none; }
  .media-logos { grid-template-columns: repeat(2, 1fr); }
  .page-head { padding: 44px 0 40px; }
  .page-body { padding: 44px 0 64px; }
  form { padding: 22px; }
  .f-cols { grid-template-columns: 1fr; gap: 24px; }
  .action-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--slate-deep); border-top: 1px solid rgba(255, 255, 255, 0.18); padding-bottom: env(safe-area-inset-bottom); }
  .action-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 62px; color: var(--white); text-decoration: none; font-size: 12.5px; font-weight: 700; }
  .action-bar a + a { border-left: 1px solid rgba(255, 255, 255, 0.14); }
  .action-bar a:first-child { background: var(--accent); }
  .action-bar :focus-visible { outline-offset: -3px; }
}
@media (max-width: 480px) {
  .btn { width: 100%; }
}

/* Portrait in the hero */
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 64px; align-items: center; padding-top: 72px; }
.hero-portrait { margin: 0; border-radius: var(--radius); overflow: hidden; border: 4px solid rgba(255, 255, 255, 0.9); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.7); background: var(--slate); }
.hero-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.hero-inner .services-label { grid-column: 1 / -1; margin-top: 44px; }
.exp-col { max-width: 860px; margin: 0 auto; }
.exp-col .exp-list li, .exp-col .disclaimer { max-width: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-portrait { animation: rise 1s var(--ease) 0.2s both; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-portrait { max-width: 230px; margin-top: 32px; }
  .hero-inner .services-label { margin-top: 32px; }
}
.hero h1 br { display: none; }
@media (min-width: 901px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 280px; padding-top: 52px; padding-bottom: 140px; }
  .hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.7rem); }
  .hero-inner .services-label { margin-top: 32px; }
}

/* Portrait blended into the skyline: no frame, edges fade into the navy */
.hero-portrait { border: 0; border-radius: 0; box-shadow: none; background: none; overflow: visible; }
.hero-portrait img { filter: saturate(0.92) contrast(1.03); }
@media (min-width: 901px) {
  .hero-inner { position: static; grid-template-columns: 1fr; min-height: 500px; align-content: center; }
  .hero-text, .hero-inner .services-label { position: relative; z-index: 1; max-width: 62%; }
  .hero-portrait { position: absolute; top: 0; bottom: 0; right: max(0px, calc((100vw - 1160px) / 2 - 60px)); width: min(520px, 42vw); margin: 0; }
  .hero-portrait img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center 12%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%, #000 80%, transparent 100%), linear-gradient(to bottom, #000 0%, #000 58%, transparent 92%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, #000 38%, #000 80%, transparent 100%), linear-gradient(to bottom, #000 0%, #000 58%, transparent 92%);
    mask-composite: intersect; }
  .hero-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(1, 22, 64, 0.55) 0%, rgba(1, 22, 64, 0.12) 45%, rgba(1, 22, 64, 0.2) 100%); mix-blend-mode: multiply; pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%, #000 80%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 38%, #000 80%, transparent 100%); }
}
@media (max-width: 900px) {
  .hero-portrait { max-width: none; width: calc(100% + 44px); margin: 28px -22px -8px; }
  .hero-portrait img { aspect-ratio: 5 / 4; object-position: center 15%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 62%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 62%, transparent 100%); }
  .hero-inner .services-label { position: relative; margin-top: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-portrait { animation: portrait-in 2.2s var(--ease) 0.25s both; }
  @keyframes portrait-in { from { opacity: 0; transform: scale(1.04); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
}

/* Portrait, refined: toned in the hero's own navy so it belongs to the skyline,
   then dissolved at the edges. */
.hero .hero-portrait { isolation: isolate; overflow: hidden; }
.hero .hero-portrait img { filter: grayscale(1) contrast(1.12) brightness(0.86); -webkit-mask-image: none; mask-image: none; }
.hero .hero-portrait::after { content: ""; position: absolute; inset: 0; z-index: 1; background: #2b4f9e; mix-blend-mode: color; -webkit-mask-image: none; mask-image: none; pointer-events: none; }
.hero .hero-portrait::before { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(to bottom, rgba(1, 22, 64, 0.18) 0%, rgba(1, 22, 64, 0.05) 35%, rgba(1, 22, 64, 0.7) 100%); pointer-events: none; }
.hero-bg::after { background: linear-gradient(100deg, rgba(1, 22, 64, 0.94) 0%, rgba(1, 22, 64, 0.8) 45%, rgba(1, 22, 64, 0.6) 100%); }
@media (min-width: 901px) {
  .hero .hero-portrait { width: min(560px, 44vw); right: max(0px, calc((100vw - 1160px) / 2 - 90px));
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 46%, #000 78%, transparent 100%), linear-gradient(to bottom, #000 0%, #000 52%, transparent 90%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, #000 46%, #000 78%, transparent 100%), linear-gradient(to bottom, #000 0%, #000 52%, transparent 90%);
    mask-composite: intersect; }
  .hero .hero-portrait img { object-position: center 8%; }
  .hero h1::after { content: ""; display: block; width: 72px; height: 3px; border-radius: 2px; background: var(--coral); margin-top: 26px; }
  .hero .actions { margin-top: 28px; }
}
@media (max-width: 900px) {
  .hero .hero-portrait { position: relative;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 60%, transparent 100%); }
}

/* Portrait: natural colour, flush to the right edge of the hero */
.hero .hero-portrait img { filter: none; }
.hero .hero-portrait::after { content: none; }
.hero .hero-portrait::before { background: linear-gradient(to bottom, rgba(1, 22, 64, 0) 55%, rgba(1, 22, 64, 0.55) 100%); }
@media (min-width: 901px) {
  .hero .hero-portrait { right: 0; width: min(500px, 37vw);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%), linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, #000 34%), linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
    mask-composite: intersect; }
  .hero .hero-portrait img { object-position: 62% 8%; }
}

/* Buttons: press, ripple and a light sweep */
.btn, .call, .action-bar a { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.btn > *, .call > * { position: relative; z-index: 1; }
.btn:active, .call:active { transform: scale(0.96); transition-duration: 0.08s; }
.action-bar a:active { background: rgba(255, 255, 255, 0.14); }
.action-bar a:first-child:active { background: var(--accent-dark); }
.ripple { position: absolute; z-index: 0; border-radius: 50%; background: currentColor; opacity: 0.28; transform: scale(0); pointer-events: none; }
.services li { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.services img { transition: transform 0.45s var(--ease); }
.nav-toggle { transition: background-color 0.2s, transform 0.15s; }
.nav-toggle:active { transform: scale(0.92); background: var(--light); }

@media (prefers-reduced-motion: no-preference) {
  .ripple { animation: ripple 0.65s var(--ease) forwards; }
  @keyframes ripple { to { transform: scale(1); opacity: 0; } }

  /* light sweep across the red buttons: once when they scroll into view, again on hover */
  .btn:not(.outline)::before, .call::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: 0; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent); transform: skewX(-18deg); pointer-events: none; }
  .btn:not(.outline).seen::before, .call.seen::before { animation: sweep 1.1s var(--ease) 0.35s 1; }
  .btn:not(.outline):hover::before, .call:hover::before { animation: sweep 0.9s var(--ease) 1; }
  @keyframes sweep { to { left: 130%; } }

  /* buttons pop in one after another as their row scrolls into view */
  .js .actions .btn { opacity: 0; transform: translateY(14px) scale(0.96); }
  .js .actions .btn.seen { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.25s var(--ease); }
  .js .actions .btn.seen:nth-child(2) { transition-delay: 0.08s, 0.08s, 0s, 0s, 0s; }
  .js .actions .btn.seen:nth-child(3) { transition-delay: 0.16s, 0.16s, 0s, 0s, 0s; }
  .js .actions .btn.seen:nth-child(4) { transition-delay: 0.24s, 0.24s, 0s, 0s, 0s; }
  .js .actions .btn.seen:hover { transform: translateY(-2px); transition-delay: 0s; }
  .js .actions .btn.seen:active { transform: scale(0.96); transition-delay: 0s; }
  .hero-inner .actions { animation: none; }

  .services li:hover, .services li:active { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(1, 22, 64, 0.5), 0 2px 6px -2px rgba(1, 22, 64, 0.1); }
  .services li:hover img, .services li:active img { transform: scale(1.08) rotate(-3deg); }
  .action-bar a svg { transition: transform 0.3s var(--ease); }
  .action-bar a:active svg { transform: translateY(-3px) scale(1.12); }
  .f-links a, .text-link { transition: color 0.2s, transform 0.25s var(--ease); }
  .f-links a:hover { transform: translateX(3px); }
}

/* Results disclaimer in red */
.disclaimer { color: var(--accent); font-weight: 600; background: #fdf1f2; border: 1px solid #f3c7cb; }

/* Portrait: one clean fade on the left edge, navy wash at the foot */
.hero .hero-portrait::before { background: linear-gradient(to bottom, rgba(1, 22, 64, 0) 50%, rgba(1, 22, 64, 0.9) 100%); }
@media (min-width: 901px) {
  .hero .hero-portrait {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 22%, #000 46%);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 22%, #000 46%);
    mask-composite: add; }
}

/* Service cards open a contact panel for that service */
.services li { padding: 0; position: relative; }
.service { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; height: 100%; padding: 28px 16px 24px; border-radius: var(--radius); text-decoration: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.service::after { content: ""; position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background:
  linear-gradient(var(--accent), var(--accent)) center / 10px 2px no-repeat,
  linear-gradient(var(--accent), var(--accent)) center / 2px 10px no-repeat, #fdecee; transition: transform 0.4s var(--ease), background-color 0.3s; }
.services li.active { box-shadow: 0 0 0 2px var(--coral), 0 26px 50px -24px rgba(1, 22, 64, 0.5); }
.services li.active .service::after { transform: rotate(135deg); }
.services li.active img { transform: scale(1.08); }
.service-panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.55s var(--ease), opacity 0.4s var(--ease), margin-top 0.55s var(--ease); margin-top: 0; }
.service-panel.open { grid-template-rows: 1fr; opacity: 1; margin-top: 18px; }
.service-panel-clip { overflow: hidden; min-height: 0; }
.service-panel-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 26px 30px; margin: 2px 2px 30px; }
.service-panel-inner p { margin: 4px 0 0; color: var(--muted); }
.sp-title { font-size: 1.6rem; outline: none; }
.js .service-panel .actions .btn { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .service-panel, .service::after { transition: none; }
}
@media (max-width: 900px) {
  .service { padding: 22px 12px 18px; }
  .service::after { top: 8px; right: 8px; width: 24px; height: 24px; }
  .service-panel-inner { padding: 20px; }
}

/* ---- Additions: figures, timeline, office, consultation bar, richer service panel ---- */

/* Figures strip */
.figures { padding: 8px 0 88px; }
.figure-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figure-list li { padding: 34px 28px 30px; border-left: 1px solid var(--line); }
.figure-list li:first-child { border-left: 0; padding-left: 0; }
.figure { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.05; color: var(--navy); margin: 0 0 10px; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.figure .count { color: var(--accent); }
.figure-label { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.figures .disclaimer { max-width: none; }

/* Service panel: icon, related results */
.service-panel-inner { align-items: flex-start; flex-wrap: nowrap; }
.sp-icon { width: 76px; height: 76px; flex: none; }
.sp-text { flex: 1 1 auto; min-width: 0; }
.sp-related { list-style: none; margin: 14px 0 0; padding: 0; }
.sp-related li { position: relative; padding: 6px 0 6px 20px; font-weight: 600; color: var(--navy); }
.sp-related li::before { content: ""; position: absolute; left: 2px; top: 1em; width: 8px; height: 8px; border-radius: 2px; background: var(--coral); }
.sp-note { font-size: 13.5px; color: var(--accent); margin: 8px 0 0; }
.service-panel-inner .actions { flex: 0 0 auto; flex-direction: column; align-items: stretch; min-width: 230px; }

/* About timeline */
.timeline { list-style: none; margin: 40px 0 0; padding: 0; position: relative; --p: 0; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 35px; top: 8px; width: 2px; border-radius: 2px; }
.timeline::before { bottom: 0; background: var(--line); }
.timeline::after { height: calc(var(--p) * (100% - 8px)); background: var(--coral); transition: height 0.2s linear; }
.tl-item { position: relative; padding: 0 0 40px 96px; }
.tl-year, .tl-dot { position: absolute; left: 0; top: 0; z-index: 1; }
.tl-year { width: 72px; text-align: center; font: 700 14px var(--sans); font-variant-numeric: tabular-nums; color: var(--white); background: var(--slate); border-radius: 999px; padding: 5px 0; box-shadow: 0 0 0 5px var(--white); transition: background-color 0.4s; }
.tl-dot { left: 29px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--slate); box-shadow: 0 0 0 5px var(--white); transition: border-color 0.4s; }
.tl-item.in .tl-year { background: var(--accent); }
.tl-item.in .tl-dot { border-color: var(--accent); }
.timeline .tl-body h2 { margin: 0 0 10px; padding-top: 0; font-size: 1.35rem; }
.timeline .tl-body h2::before { content: none; }
.timeline .tl-body > :last-child { margin-bottom: 0; }

/* Office */
.office { padding: 88px 0; }
.office-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.office-card { padding: 44px 40px; background: var(--white); }
.office-card h2 { font-size: 1.7rem; margin-bottom: 14px; }
.office-card address { font-size: 18px; margin-bottom: 12px; }
.office-lines { font-weight: 700; color: var(--navy); margin-bottom: 26px; }
.office-lines a { text-decoration: none; }
.office-lines a:hover { text-decoration: underline; }
.office-map { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* Consultation bar (desktop) */
.consult-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: var(--slate-deep); color: var(--white); transform: translateY(110%); transition: transform 0.5s var(--ease); box-shadow: 0 -14px 30px -18px rgba(1, 22, 64, 0.6); }
.consult-bar.show { transform: none; }
.consult-bar .wrap { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.consult-bar p { margin: 0 auto 0 0; font-family: var(--serif); font-size: 1.15rem; }
.consult-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; text-decoration: none; font-variant-numeric: tabular-nums; min-height: 44px; }
.consult-phone:hover { text-decoration: underline; }
.btn.small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.consult-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--white); font-size: 26px; line-height: 1; cursor: pointer; transition: background-color 0.2s; }
.consult-close:hover { background: rgba(255, 255, 255, 0.14); }
.consult-bar :focus-visible { outline-color: var(--white); }
.js .consult-bar .btn { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .figures { padding: 0 0 56px; }
  .figure-list { grid-template-columns: repeat(2, 1fr); }
  .figure-list li { padding: 24px 16px; border-left: 0; border-top: 1px solid var(--line); }
  .figure-list li:nth-child(-n+2) { border-top: 0; }
  .figure-list li:nth-child(odd) { padding-left: 0; }
  .service-panel-inner { flex-wrap: wrap; }
  .sp-icon { width: 56px; height: 56px; }
  .sp-text { flex-basis: calc(100% - 80px); }
  .service-panel-inner .actions { min-width: 0; width: 100%; }
  .timeline::before, .timeline::after { left: 27px; }
  .tl-item { padding-left: 72px; }
  .tl-year { width: 56px; font-size: 12.5px; }
  .tl-dot { left: 21px; }
  .office { padding: 56px 0; }
  .office-grid { grid-template-columns: 1fr; }
  .office-card { padding: 28px 22px; }
  .office-map { min-height: 280px; }
  .consult-bar { display: none; }
}
@media (max-width: 900px) {
  .figure { white-space: normal; font-size: 1.75rem; }
  .figure .count { display: block; font-size: 2.3rem; }
  .figure-list li { min-width: 0; }
}

/* ---- Cross-device hardening ---- */

/* Notched phones held sideways: keep content clear of the notch */
.wrap { padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); }
.site-header { -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.hero .btn.outline, .contact-band .btn.outline { -webkit-backdrop-filter: blur(4px); }

/* Closed service panel is out of reach for keyboards and screen readers in every browser */
.service-panel { visibility: hidden; transition: grid-template-rows 0.55s var(--ease), opacity 0.4s var(--ease), margin-top 0.55s var(--ease), visibility 0s linear 0.55s; }
.service-panel.open { visibility: visible; transition-delay: 0s; }

/* Touch screens: no hover state left stuck after a tap */
@media (hover: none) {
  .btn:hover, .call:hover { transform: none; box-shadow: none; }
  .services li:hover { transform: none; box-shadow: var(--shadow); }
  .services li:hover img { transform: none; }
  .services li.active { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--coral), 0 26px 50px -24px rgba(1, 22, 64, 0.5); }
  .media-logos li:hover { transform: none; box-shadow: none; }
  .f-links a:hover { transform: none; }
}

/* Comfortable tap targets for the remaining text links */
.office-lines a, .band-email, .consult-phone { display: inline-flex; align-items: center; min-height: 44px; }
.office-lines br { display: none; }
.office-lines a { display: flex; }

@media (max-width: 900px) {
  .wrap { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
}

/* Tablets and large phones held sideways: headline beside the portrait, three cards per row */
@media (min-width: 600px) and (max-width: 900px) {
  .hero-inner { position: static; grid-template-columns: 1fr; min-height: 400px; align-content: center; padding-bottom: 48px; }
  .hero-text, .hero-inner .services-label { position: relative; z-index: 1; max-width: 56%; }
  .hero .hero-portrait { position: absolute; top: 0; bottom: 0; right: 0; width: 46vw; max-width: none; margin: 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 22%, #000 46%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 22%, #000 46%); }
  .hero .hero-portrait img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 62% 8%; }
  .hero .btn.outline { display: inline-flex; }
  .services { grid-template-columns: repeat(6, 1fr); }
  .services li { grid-column: span 2; }
  .services li:nth-child(4) { grid-column: 2 / span 2; }
  .services li:last-child { grid-column: 4 / span 2; }
  .figure-list { grid-template-columns: repeat(4, 1fr); }
  .figure-list li { border-top: 0; border-left: 1px solid var(--line); padding: 24px 14px; }
  .figure-list li:first-child { border-left: 0; padding-left: 0; }
  .figure { font-size: 1.3rem; }
  .figure .count { font-size: 2rem; }
  .media-logos { grid-template-columns: repeat(4, 1fr); }
  .office-grid { grid-template-columns: 0.9fr 1.1fr; }
  .f-cols { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* Very small phones */
@media (max-width: 360px) {
  .brand { flex-basis: 150px; }
  .call { padding: 0 12px; }
  .hero h1 { font-size: 2.1rem; }
  .services li { font-size: 14px; }
}

/* Short screens (phone held sideways): the header scrolls away to give the page room */
@media (max-height: 480px) and (max-width: 900px) {
  .site-header { position: static; }
  .hero-inner { min-height: 0; }
}

@media (min-width: 600px) and (max-width: 900px) { .hero-inner .services-label { margin-top: 26px; } }

/* Preview ribbon: shown only while DEMO is on */
.preview-ribbon { margin: 0; padding: 7px 16px; background: var(--navy); color: var(--white); text-align: center; font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; }
