:root {
  color-scheme: light;
  --bg: #f7f3ed;
  --surface: #ffffff;
  --surface-strong: #fffaf2;
  --ink: #102033;
  --muted: #5f6875;
  --line: rgba(16, 32, 51, 0.12);
  --brand: #0f2742;
  --brand-2: #193f68;
  --accent: #825d26;
  --accent-2: #d8bd84;
  --danger: #9d2f2f;
  --success: #216e4e;
  --shadow: 0 24px 60px rgba(15, 39, 66, 0.12);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
  --container: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08111d;
  --surface: #0e1a29;
  --surface-strong: #122237;
  --ink: #f6efe5;
  --muted: #b7c0cc;
  --line: rgba(255,255,255,.13);
  --brand: #e8d3a0;
  --brand-2: #f0dfb5;
  --accent: #d8bd84;
  --accent-2: #8a672e;
  --danger: #ff9b9b;
  --success: #81d9a9;
  --shadow: 0 24px 60px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 999;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--surface);
  padding: .75rem 1rem;
  border-radius: 999px;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.container { width: min(var(--container), calc(100% - 2rem)); margin-inline: auto; }
.section { padding: 6.5rem 0; }
.section[id], .practice-item[id] { scroll-margin-top: 82px; }
.narrow { max-width: 820px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: .9rem 0;
  background: rgba(247, 243, 237, .78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
[data-theme="dark"] .site-header { background: rgba(8,17,29,.78); }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.07); }
.nav-shell { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(1.1rem, 2vw, 2rem); }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: .8rem; text-decoration: none; }
.brand-mark {
  width: 54px;
  height: 40px;
  flex: 0 0 54px;
  display: block;
  background: transparent url("assets/brand/xiros-law-mark-navy.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
}
[data-theme="dark"] .brand-mark { background-image: url("assets/brand/xiros-law-mark-gold.svg"); }
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { font-size: 1rem; }
.brand-text small { color: var(--muted); font-size: .78rem; margin-top: .18rem; }
.primary-nav { display: flex; align-items: center; justify-self: end; gap: clamp(.7rem, 1.25vw, 1.2rem); white-space: nowrap; }
.primary-nav a, .text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
  color: var(--muted);
  font-weight: 680;
  font-size: .88rem;
  padding: .55rem .05rem;
  border-radius: 0;
  transition: color .22s ease;
}
.primary-nav a::after, .text-link::after, .site-footer a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .28rem;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}
.primary-nav a:hover, .primary-nav a:focus-visible, .text-link:hover { color: var(--ink); }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after, .text-link:hover::after, .site-footer a:hover::after { transform: scaleX(1); }
.primary-nav .nav-book { padding: .65rem .9rem; border: 1px solid #0f2742; border-radius: 3px; background: #0f2742; color: #f8f3eb; font-size: .82rem; }
.primary-nav .nav-book::after { display: none; }
.primary-nav .nav-book:hover, .primary-nav .nav-book:focus-visible { background: #193f68; color: #fff; }
[data-theme="dark"] .primary-nav .nav-book { background: #d8bd84; border-color: #d8bd84; color: #08111d; }
[data-theme="dark"] .primary-nav .nav-book:hover, [data-theme="dark"] .primary-nav .nav-book:focus-visible { background: #f0dfb5; color: #08111d; }
.header-utility { display: flex; align-items: center; justify-self: end; gap: .55rem; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 35px; min-height: 40px; color: var(--ink); text-decoration: none; font-size: .8rem; font-weight: 800; letter-spacing: .04em; }
.lang-switch:hover { color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.menu-toggle { display: none; }

.hero {
  position: relative;
  min-height: calc(100svh - 76px);
  padding: 6.5rem 0 5.5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 4.2rem;
  left: 0;
  width: min(52vw, 720px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .5;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  right: -16rem;
  top: 3rem;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181,138,70,.09), transparent 68%);
  pointer-events: none;
}
.hero-editorial {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(300px, .75fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}
.hero-artwork {
  isolation: isolate;
  background: #101821;
}
.hero-artwork-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  overflow: hidden;
}
.hero-artwork-media picture { display: block; width: 100%; height: 100%; }
.hero-artwork-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 14%;
  filter: saturate(.68) contrast(1.08) brightness(.62);
  animation: hero-artwork-drift 22s ease-in-out infinite alternate;
}
.hero-artwork::before {
  z-index: 2;
  opacity: .72;
}
.hero-artwork::after {
  inset: 0;
  z-index: 1;
  width: auto;
  height: auto;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(8,15,24,.94) 0%, rgba(8,15,24,.82) 35%, rgba(8,15,24,.28) 68%, rgba(8,15,24,.48) 100%),
    linear-gradient(180deg, rgba(8,15,24,.3) 0%, transparent 32%, rgba(8,15,24,.5) 100%);
}
.hero-artwork .hero-editorial {
  z-index: 2;
  display: block;
}
.hero-artwork .hero-copy-editorial {
  max-width: 670px;
}
.hero-artwork .hero-copy-editorial h1 {
  max-width: 22ch;
  color: #f8f3eb;
}
.hero-artwork .lead { color: rgba(248,243,235,.82); }
.hero-artwork .lead { max-width: 48ch; }
.hero-artwork .eyebrow { color: var(--accent-2); }
.hero-artwork .btn-primary {
  background: #f8f3eb;
  color: #102033;
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
}
@keyframes hero-artwork-drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.012) translate3d(-.2%, .12%, 0); }
}
.eyebrow {
  color: var(--accent);
  font-weight: 780;
  letter-spacing: .035em;
  text-transform: uppercase;
  font-size: .78rem;
  margin: 0 0 1.1rem;
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; margin: 0; }
h1 { font-size: clamp(2.15rem, 4.6vw, 4.35rem); max-width: 15ch; }
.hero-copy-editorial h1 {
  max-width: 23ch;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 520;
  font-size: clamp(1.75rem, 2.35vw, 2.35rem);
  letter-spacing: -.03em;
  line-height: 1.08;
}
h2 { font-size: clamp(1.75rem, 3vw, 2.65rem); text-wrap: balance; }
h3 { font-size: 1.24rem; }
.lead {
  font-size: clamp(1.02rem, 1.55vw, 1.16rem);
  color: var(--muted);
  max-width: 58ch;
  margin: 1.35rem 0 0;
}
.lead-small { font-size: 1.08rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.15rem; margin-top: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .92rem 1.15rem;
  min-height: 48px;
  text-decoration: none;
  font-weight: 820;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--surface); box-shadow: 0 14px 30px rgba(15,39,66,.18); }
.hero .btn { border-radius: 2px; }
.primary-nav a, .btn, .quick-action { position: relative; }
.hero-copy-editorial { position: relative; z-index: 1; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-full { width: 100%; }
.service-card, .contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.service-grid { display: grid; }
.service-card p { color: var(--muted); }
.split-heading { display: grid; grid-template-columns: minmax(0, .95fr) minmax(280px, .65fr); align-items: end; gap: 2rem; margin-bottom: 2rem; }
.split-heading > p { color: var(--muted); margin: 0; }
.service-grid { grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.service-card { padding: 1.55rem 1.55rem 1.35rem 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.service-card:nth-child(even) { padding-left: 1.55rem; }
.service-card h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.service-card p { margin-bottom: 0; max-width: 48ch; }
.section-tail { margin-top: 1.35rem; }
.content-split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.content-split p { margin-top: 0; color: var(--muted); }
.panel-section { background: var(--surface-strong); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(220px, .58fr) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.portrait-card { margin: 0; align-self: start; }
.portrait-card img { width: 100%; height: auto; object-fit: cover; border: 1px solid var(--line); }
.credential-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; }
.credential-list li { display: grid; grid-template-columns: minmax(150px, .6fr) 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .93rem; }
.credential-list li span { color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 2rem; align-items: start; }
.contact-section { min-height: calc(100svh - 76px); display: grid; align-items: center; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0; }
.contact-note { margin: 1.5rem 0 0; color: var(--muted); }
.quick-action { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .8rem 1rem; text-decoration: none; font-weight: 850; }
.quick-action svg { width: 20px; height: 20px; fill: var(--accent); }
.contact-form { padding: 1.5rem; box-shadow: none; display: grid; gap: 1rem; }
.form-row { display: grid; gap: .35rem; }
label { font-weight: 850; }
label span { color: var(--muted); font-weight: 600; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
}
textarea { resize: vertical; }
.field-error { color: var(--danger); min-height: 1.2rem; font-size: .86rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: .7rem; font-weight: 650; color: var(--muted); }
.checkbox-row input { width: auto; margin-top: .33rem; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.form-status { min-height: 1.4rem; font-weight: 800; }
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--success); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer { background: #0f2742; color: #f8f3eb; padding: 4rem 0; }
.site-footer a { position: relative; color: #f8f3eb; text-decoration: none; display: block; width: fit-content; margin: .45rem 0; padding-bottom: .2rem; }
.site-footer p { color: rgba(248,243,235,.82); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr .6fr .8fr; gap: 2rem; }
.footer-grid h2 { font-size: 1rem; letter-spacing: 0; }
.footer-brand .brand-mark { background-image: url("assets/brand/xiros-law-mark-gold.svg"); }
.footer-cookie-link { background: transparent; border: 0; padding: 0; color: #f8f3eb; text-decoration: underline; text-underline-offset: .25em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); margin-top: 2rem; padding-top: 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-status { max-width: 70ch; margin: 0; font-size: .88rem; }
.footer-legal-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .35rem 1rem; }
.footer-legal-links a { margin: 0; }

.back-to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.back-to-top svg { width: 22px; height: 22px; fill: currentColor; }
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 110; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 980px; margin: auto; }
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.05rem; letter-spacing: 0; }
.cookie-banner p { margin: .2rem 0 0; color: var(--muted); }
.cookie-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
[hidden] { display: none !important; }

.policy-page main { padding: 4rem 0; }
.policy-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.2rem, 4vw, 3rem); }
.policy-card h1 { max-width: none; font-size: clamp(2.2rem, 5vw, 4rem); }
.policy-card h2 { font-size: 1.4rem; margin-top: 2rem; }
.policy-card p, .policy-card li { color: var(--muted); }
.interior-intro { padding: clamp(4.5rem, 8vw, 7rem) 0 3rem; }
.interior-intro h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.2vw, 3rem); font-weight: 520; max-width: 22ch; }
.interior-intro .lead { max-width: 68ch; }
.interior-page .section { padding: 4.5rem 0; }
.interior-page .service-grid { margin-top: 1.6rem; }
.interior-page .service-card { min-width: 0; }
.interior-page .service-card p { max-width: 62ch; }
.interior-page .about-grid { align-items: start; }
.interior-page .portrait-card { max-width: 450px; }
.book-policy { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 2rem; }
.book-link { color: var(--muted); margin-top: 1.4rem; }

.practice-list { margin-top: 2rem; border-top: 1px solid var(--line); }
.practice-item { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); padding: 2.3rem 0; border-bottom: 1px solid var(--line); }
.practice-item h3 { font: 500 clamp(1.5rem, 2.2vw, 2rem)/1.18 Georgia, "Times New Roman", serif; }
.practice-item .eyebrow { margin-bottom: .55rem; }
.practice-item p { margin: 0 0 .75rem; color: var(--muted); }
.practice-item ul { margin: .5rem 0 0; padding-left: 1.25rem; color: var(--ink); }
.practice-item li { padding: .15rem 0; }
.service-contact-note { padding-top: 1rem; border-top: 1px solid var(--line); }
.service-contact-note a, .contact-section .lead-small a { text-decoration-color: var(--accent); text-underline-offset: .2em; }
.principal-profile .about-grid { grid-template-columns: minmax(290px, .78fr) minmax(0, 1fr); align-items: start; }
.principal-profile .portrait-card { max-width: 520px; }
.principal-profile .credential-list { margin-bottom: 1.2rem; }
.legal-tech-section { border-top: 1px solid var(--line); }
.legal-tech-section .content-split { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); }
.tech-person-name { margin: 1.2rem 0 0; font-size: 1.1rem; font-weight: 700; color: var(--ink) !important; }
.tech-person-name span { display: block; font-size: .86rem; color: var(--muted); font-weight: 600; }
.tech-service-list { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.tech-service-list li { display: grid; grid-template-columns: minmax(150px, .8fr) 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.tech-service-list strong { font-weight: 700; }
.tech-service-list span { color: var(--muted); }
.tech-disclaimer { margin: 1rem 0 0; font-size: .9rem; }


[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
.service-grid [data-reveal]:nth-child(even) { transition-delay: .08s; }

@media (max-width: 1180px) {
  .nav-shell { display: flex; justify-content: flex-start; }
  .brand { margin-right: auto; }
  .header-utility { order: 1; }
  .menu-toggle { display: grid; order: 2; gap: 4px; width: 44px; height: 44px; margin-left: .5rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
  .menu-toggle span:not(.sr-only) { width: 18px; height: 2px; background: var(--ink); display: block; }
  .primary-nav { position: absolute; top: calc(100% + .75rem); left: 1rem; right: 1rem; justify-self: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1rem; display: none; flex-direction: column; align-items: stretch; }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { width: 100%; }
  .primary-nav .nav-book { text-align: center; justify-content: center; }
  .hero-editorial, .split-heading, .about-grid, .contact-grid, .content-split, .legal-tech-section .content-split { grid-template-columns: 1fr; }
  .hero-artwork .hero-copy-editorial { max-width: 610px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .practice-item, .principal-profile .about-grid { grid-template-columns: 1fr; }
  .tech-service-list li { grid-template-columns: 1fr; gap: .2rem; }
}

@media (max-width: 650px) {
  .section { padding: 4.5rem 0; }
  .hero { padding-top: 4.8rem; min-height: auto; }
  .hero-copy-editorial h1 { font-size: clamp(1.75rem, 7.5vw, 2.05rem); }
  .hero-artwork { min-height: max(690px, calc(100svh - 76px)); }
  .hero-artwork-media img { object-position: 59% 14%; }
  .hero-actions .btn { width: 100%; }
  .service-grid, .footer-grid { grid-template-columns: 1fr; }
  .service-card, .service-card:nth-child(even) { padding: 1.2rem 0; }
  .credential-list li { grid-template-columns: 1fr; gap: .2rem; }
  .about-grid { gap: 2rem; }
  .portrait-card { width: min(100%, 440px); }
  .hero-artwork .eyebrow { max-width: 30ch; }
  .cookie-banner { max-height: calc(100svh - 5.5rem); overflow-y: auto; }
  .cookie-banner { bottom: 1rem; display: grid; }
  .footer-bottom { display: grid; }
  .back-to-top { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
