/* Remote Legal Assistant — Joshua J. Almeida
   House design language: deep navy, brass gold, ivory paper, serif display.
   Header rule (house standard): the brand name is never overlapped by the
   menu or the language picker at any width; the menu panel anchors to the
   header, never to the button. */

:root {
  --navy: #14273f;
  --navy-deep: #0a1526;
  --ink: #22303f;
  --slate: #5b6b7c;
  --paper: #f7f4ec;
  --paper-alt: #ece5d2;
  --gold: #b08d3c;
  --gold-bright: #cfa14e;
  --line: #d5ccb2;
  --white: #ffffff;
  --shadow-soft: 0 1px 2px rgba(10, 21, 38, .05), 0 10px 24px rgba(10, 21, 38, .05);
  --shadow-lift: 0 14px 30px rgba(10, 21, 38, .13);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--gold); color: var(--navy-deep); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.25; margin: 0 0 .7rem; }
h2 { font-size: 1.9rem; margin: 0 0 1.1rem; padding-bottom: .5rem; border-bottom: 4px double var(--gold); display: inline-block; }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.4rem; }
.wrap.narrow { max-width: 800px; }

/* Header */
.site-header {
  background: linear-gradient(180deg, #0d1c31 0%, var(--navy-deep) 100%);
  color: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 80;
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding-top: .55rem;
  padding-bottom: .55rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}
.brand-emblem { width: 46px; height: 46px; flex: none; }
.brand-lines { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: .045em;
  color: var(--white);
  white-space: nowrap;
}
.brand-sub {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-top: .22rem;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: .55rem; flex: none; }
.nav-box { position: static; }
.nav-toggle {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  height: 44px;
  padding: 0 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  color: #e9e4d8;
  border: 1px solid rgba(207, 161, 78, .55);
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; }
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }
.main-nav {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  width: min(88vw, 320px);
  max-height: min(72vh, 600px);
  overflow-y: auto;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #10203a 0%, var(--navy-deep) 100%);
  border: 1px solid rgba(207, 161, 78, .55);
  box-shadow: 0 26px 50px rgba(4, 10, 20, .5);
  padding: .45rem 0;
}
.main-nav[hidden] { display: none; }
.main-nav a {
  color: #e9e4d8;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.03rem;
  letter-spacing: .02em;
  padding: .66rem 1.35rem;
  border-bottom: 1px solid rgba(233, 228, 216, .09);
  transition: background .15s ease, color .15s ease;
}
.main-nav a:last-child { border-bottom: none; }
.main-nav a:hover { background: rgba(207, 161, 78, .13); color: var(--white); }
.main-nav a[aria-current="page"] { color: var(--gold-bright); box-shadow: inset 3px 0 0 var(--gold); }
/* Language picker (injected by assets/i18n.js) — align to the menu height */
header .langpick { margin-left: 0; }
header .langpick .langpick-btn { height: 44px; border-radius: 2px; }

/* Heroes */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: #eef0f2;
  padding: 4.8rem 0 4.2rem;
  border-bottom: 3px solid var(--gold);
}
.hero .hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.0) translateY(0); }
  to { transform: scale(1.09) translateY(-1.2%); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, rgba(10,21,38,.94) 32%, rgba(10,21,38,.62) 72%, rgba(10,21,38,.45));
}
.hero .wrap { position: relative; z-index: 2; }
.page-hero { padding: 3.4rem 0 2.9rem; }
.page-hero .hero-photo { object-position: center 40%; animation-duration: 30s; }
.hero .eyebrow, .page-hero .eyebrow {
  letter-spacing: .24em;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-bright);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.4rem; height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: .75rem;
}
.hero h1 { color: var(--white); font-size: 2.65rem; margin: 0 0 1.1rem; max-width: 24ch; }
.page-hero h1 { font-size: 2.3rem; max-width: none; }
.hero .lede { font-size: 1.13rem; max-width: 62ch; color: #d8dde3; }
.hero-actions { margin: 1.7rem 0 1.3rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  display: inline-block;
  text-decoration: none;
  padding: .85rem 1.6rem;
  border-radius: 2px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-primary { background: var(--gold); color: var(--navy-deep); border: 1px solid #8a6d2a; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(10,21,38,.25); }
.btn-primary:hover { background: var(--gold-bright); }
.btn-ghost { border: 1px solid #93a3b5; color: #eef0f2; }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); }
.credential { font-family: var(--serif); font-style: italic; color: #c9cfd6; margin: 0; }
.hero-creed { font-family: var(--serif); font-size: 1.04rem; color: #e9e4d8; letter-spacing: .02em; margin: 0 0 1.1rem; }
.hero-creed b { color: var(--gold-bright); font-weight: normal; margin: 0 .35rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--paper-alt); }
.section-intro { max-width: 62ch; }

/* Trust strip */
.trust-strip { background: var(--navy-deep); color: #e9e4d8; border-bottom: 1px solid rgba(207,161,78,.4); }
.trust-strip .wrap { display: flex; flex-wrap: wrap; gap: .6rem 2.4rem; padding-top: 1.05rem; padding-bottom: 1.05rem; justify-content: center; }
.trust-strip span { font-family: var(--serif); font-size: .98rem; letter-spacing: .02em; }
.trust-strip b { color: var(--gold-bright); font-weight: normal; margin-right: .45rem; }

/* Positioning cards */
.positioning-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.pos-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 1.5rem 1.5rem .8rem;
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
}
.pos-eyebrow { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: var(--gold); font-weight: 600; margin-bottom: .5rem; }
.pos-card h3 { font-size: 1.3rem; }
.pos-card p { font-size: .97rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  padding: 1.4rem 1.4rem .7rem;
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-top-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-top-color: var(--gold); }
.card p { font-size: .97rem; }
.card .more { font-size: .93rem; }
.card .more a { text-decoration: none; }
.card .more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.note { margin-top: 1.4rem; font-size: .97rem; max-width: 70ch; }

/* Service detail rows */
.service-row { padding: 1.7rem 0; border-bottom: 1px solid var(--line); }
.service-row:last-of-type { border-bottom: none; }
.service-row h3 { font-size: 1.32rem; }
.service-row p { max-width: 74ch; margin-bottom: .4rem; }
.service-row .covers { font-size: .93rem; color: var(--slate); font-family: var(--serif); font-style: italic; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.steps li { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 1.4rem 1.4rem .7rem; border-radius: 2px; box-shadow: var(--shadow-soft); }
.steps p { font-size: .97rem; }

/* Split (media + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: center; }
.split figure { margin: 0; }
.split figure img {
  border-radius: 2px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(10, 21, 38, .15);
  filter: saturate(.88) contrast(1.03);
  width: 100%;
}
.split figcaption { font-size: .83rem; color: #68727c; margin-top: .55rem; font-style: italic; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.split.about-bio { grid-template-columns: 340px 1fr; align-items: start; gap: 2.2rem; }
@media (max-width: 760px) { .split.about-bio { grid-template-columns: 1fr; } .split.about-bio figure { max-width: 340px; } }

/* Desk nameplate treatment */
.desk-plate {
  background: linear-gradient(178deg, #6d5426 0%, #a8843c 38%, #c9a558 55%, #96762f 100%);
  border: 1px solid #6d5426;
  box-shadow: inset 0 1px 0 rgba(255, 244, 200, .65), inset 0 -8px 18px rgba(60, 42, 8, .35), 0 16px 34px rgba(10, 21, 38, .28);
  padding: 1.15rem 1.4rem 1rem;
  text-align: center;
  position: relative;
}
.desk-plate::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid rgba(74, 56, 20, .55);
  pointer-events: none;
}
.desk-plate .plate-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: .02em;
  color: #43330f;
  text-shadow: 0 1px 0 rgba(255, 240, 190, .55);
  margin: 0;
}
.desk-plate .plate-role {
  font-family: var(--serif);
  font-size: .92rem;
  letter-spacing: .52em;
  text-indent: .52em;
  text-transform: uppercase;
  color: #4a3814;
  text-shadow: 0 1px 0 rgba(255, 240, 190, .5);
  margin: .3rem 0 0;
}
.desk-plate-base {
  height: 14px;
  background: linear-gradient(180deg, #4a3220, #2e1f12);
  box-shadow: 0 10px 22px rgba(10, 21, 38, .3);
}

/* Supervision / disclaimer band */
.supervision-band { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.supervision-band .wrap { padding-top: 2.2rem; padding-bottom: 2.2rem; }
.supervision-band h2 { font-size: 1.45rem; border-bottom: none; display: block; }
.supervision-band p { max-width: 78ch; font-size: .99rem; }

/* Segment chips */
.seg-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.seg-list li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: .4rem 1.05rem; font-size: .95rem; font-family: var(--serif); }
.seg-list a { color: var(--navy); text-decoration: none; }
.seg-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* CTA band */
.cta-band { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #eef0f2; padding: 3rem 0; border-top: 3px solid var(--gold); }
.cta-band h2 { color: var(--white); border-bottom-color: var(--gold); }
.cta-band p { max-width: 62ch; color: #d8dde3; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.contact-item { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 1.3rem 1.4rem .6rem; border-radius: 2px; box-shadow: var(--shadow-soft); }
.contact-item a { word-break: break-all; }
.assign-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; margin-top: 1.4rem; max-width: 860px; }
.assign-form label { display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.assign-form .wide { grid-column: 1 / -1; }
.assign-form input, .assign-form select, .assign-form textarea {
  font-family: var(--sans); font-size: 1rem; letter-spacing: normal; text-transform: none;
  padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--ink);
}
.assign-form input:focus, .assign-form select:focus, .assign-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.assign-form .form-actions { grid-column: 1 / -1; }
@media (max-width: 640px) { .assign-form { grid-template-columns: 1fr; } }

/* Legal pages */
.legal-copy h2 { font-size: 1.32rem; display: block; border-bottom: none; margin: 1.9rem 0 .55rem; padding-bottom: 0; }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p, .legal-copy li { max-width: 76ch; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #c9cfd6; padding: 2.6rem 0; font-size: .95rem; border-top: 3px solid var(--gold); }
.site-footer strong { color: var(--white); font-family: var(--serif); letter-spacing: .03em; }
.site-footer nav { margin: .45rem 0 .85rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer nav a { color: #c9cfd6; text-decoration: none; font-size: .9rem; letter-spacing: .02em; }
.site-footer nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .fine { font-size: .83rem; color: #8d99a6; max-width: 70ch; margin-bottom: 0; }
.site-footer .legal-links a { color: #c9cfd6; text-decoration: none; }
.site-footer .legal-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.foot-tel { color: #e9e4d8; font-weight: 700; text-decoration: none; white-space: nowrap; }
.foot-tel:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* Reveal motion */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  /* Header fit: brand takes the full first row, controls the second —
     the full brand name always renders, never clipped or covered */
  .header-inner { flex-wrap: wrap; padding: .6rem 1rem .7rem; row-gap: .5rem; }
  .brand { flex: 1 1 100%; }
  .brand-emblem { width: 40px; height: 40px; }
  .brand-name { font-size: 1.08rem; }
  .brand-sub { font-size: .56rem; }
  .nav { margin-left: auto; }
  .nav-toggle { height: 42px; }
  .lang-btn { height: 42px; }
  .hero { padding: 3.2rem 0 2.8rem; }
  .hero h1 { font-size: 1.95rem; }
  .page-hero h1 { font-size: 1.85rem; }
  h2 { font-size: 1.6rem; }
  .section { padding: 2.8rem 0; }
  body { font-size: 16px; }
  .brand-emblem { width: 38px; height: 38px; }
  .brand-name { font-size: 1.08rem; }
  .brand-sub { font-size: .62rem; letter-spacing: .13em; }
  .header-inner { min-height: 64px; gap: .5rem; }
  .nav-toggle { padding: 0 .8rem; }
  /* Picker collapses to flag + caret so the brand name always keeps its room */
  header .langpick .langpick-btn span:not(.lp-flag):not(.lp-caret) { display: none; }
  header .langpick .langpick-panel { width: min(84vw, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
