/* Layout: dark navy "ledger" bands carry the gold wordmark; cool paper sections hold reading copy.
   Service pages = reading column + sticky service index. Single deliberate light/navy look. */
:root {
  --ink: #0d1929;          /* deep navy: header, hero, bands */
  --ink-2: #15253b;        /* raised navy surfaces */
  --gold: #ddb33b;         /* sampled from the xPERITUS wordmark */
  --gold-soft: #f1dc9c;    /* gold tint for text on navy */
  --gold-deep: #85640f;    /* gold that passes contrast on light grounds */
  --paper: #f4f6f9;        /* cool off-white with a navy bias */
  --white: #ffffff;
  --text: #17222f;
  --muted: #586579;
  --line: #d9dee6;
  --line-dark: rgba(221, 179, 59, .22);

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.8vw, 4.1rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--gold-deep); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--body); font-weight: 700; letter-spacing: 0; line-height: 1.3; }
p { margin: 0; max-width: 68ch; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--body); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-deep); display: inline-flex; align-items: center; gap: .7em;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.on-ink .eyebrow { color: var(--gold); }
.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.6rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6em; padding: .85em 1.5em; border-radius: var(--radius);
  font-family: var(--body); font-weight: 700; font-size: .95rem; letter-spacing: .02em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); color: var(--ink); }
.btn-line { border-color: var(--line-dark); color: var(--gold-soft); background: transparent; }
.btn-line:hover { border-color: var(--gold); color: var(--white); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--ink-2); color: var(--gold-soft); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Header */
.topbar { background: #08111d; color: rgba(255,255,255,.7); font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: flex-end; gap: 1.6rem; padding-block: .45rem; flex-wrap: wrap; }
.topbar a { color: var(--gold-soft); text-decoration: none; }
.topbar a:hover { color: var(--white); }
.site-header { background: var(--ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; border-bottom: 1px solid var(--line-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1rem; }
.brand { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; flex-shrink: 0; }
.brand img { width: clamp(150px, 16vw, 190px); }
.brand span { font-size: .62rem; letter-spacing: .42em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; padding-left: 2px; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: rgba(255,255,255,.86); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.has-sub { position: relative; }
.has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: .5em; }
.sub {
  position: absolute; top: calc(100% + 14px); left: -1rem; min-width: 260px; background: var(--ink-2);
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: .5rem 0 !important; display: block !important;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.sub::before { content: ""; position: absolute; inset: -16px 0 auto 0; height: 16px; }
.sub li a { display: block; padding: .55rem 1.2rem; font-size: .92rem; }
.sub li a:hover { background: rgba(221,179,59,.08); }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-dark); color: var(--gold); border-radius: var(--radius); padding: .5rem .7rem; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 1px solid var(--line-dark); flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1.4rem; gap: 1rem; display: none; max-height: calc(100vh - 90px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li > a { display: block; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; box-shadow: none; padding: 0 0 .4rem 1rem !important; min-width: 0; }
  .sub li a { padding: .45rem 0; color: rgba(255,255,255,.7); }
  .has-sub > a::after { display: none; }
  .nav .btn { align-self: flex-start; }
}

/* Hero (home) */
.on-ink { background: var(--ink); color: rgba(255,255,255,.82); }
.on-ink h1, .on-ink h2, .on-ink h3 { color: var(--white); }
.on-ink h1 em, .on-ink h2 em { color: var(--gold); font-style: italic; }
.hero { position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line-dark); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3rem, 7vw, 6rem); }
.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.hero-copy p { font-size: 1.12rem; color: rgba(255,255,255,.78); }
.hero-media { position: relative; min-width: 0; }
.hero-media img { aspect-ratio: 4 / 4.4; object-fit: cover; width: 100%; border-radius: var(--radius); filter: saturate(.85); }
.ledger {
  position: absolute; left: -2rem; bottom: 2rem; background: var(--white); color: var(--text); border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.2rem; width: min(320px, 90%); box-shadow: 0 24px 50px rgba(5,12,22,.35);
}
.ledger-title { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-block: .8rem .7rem; }
.day { text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: .35rem; align-items: center; }
.day i { width: 100%; height: 34px; border-radius: 3px; background: var(--paper); border: 1px solid var(--line); display: block; }
.day.on i { background: var(--gold); border-color: var(--gold); }
.day.on { color: var(--text); }
.ledger p { font-size: .86rem; line-height: 1.45; color: var(--muted); }
.ledger strong { color: var(--text); }

/* Page hero (inner pages) */
.page-hero { background: var(--ink); color: rgba(255,255,255,.8); border-bottom: 1px solid var(--line-dark); }
.page-hero .wrap { padding-block: clamp(2.8rem, 6vw, 4.8rem); display: flex; flex-direction: column; gap: 1.2rem; }
.page-hero h1 { color: var(--white); }
.page-hero .lede { font-size: 1.15rem; max-width: 60ch; color: rgba(255,255,255,.78); }
.crumbs { font-size: .82rem; color: rgba(255,255,255,.55); display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs a { color: var(--gold-soft); text-decoration: none; }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-white { background: var(--white); }
.section-head { display: flex; flex-direction: column; gap: 1rem; max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split > * { min-width: 0; }
.split.flip > :first-child { order: 2; }
.split img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: var(--radius); }
.muted { color: var(--muted); }

/* Home: service rows */
.offer-list { display: flex; flex-direction: column; }
.offer { display: grid; grid-template-columns: 5rem 1fr 1.2fr auto; gap: 2rem; align-items: start; padding-block: 2.2rem; border-top: 1px solid var(--line); }
.offer:last-child { border-bottom: 1px solid var(--line); }
.offer > * { min-width: 0; }
.offer .tag { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--gold-deep); padding-top: .55rem; }
.offer h3 { font-size: var(--step-2); }
.offer p { color: var(--muted); }
.offer .more { white-space: nowrap; font-weight: 700; font-size: .92rem; text-decoration: none; padding-top: .4rem; }
@media (max-width: 860px) { .offer { grid-template-columns: 1fr; gap: .7rem; } .offer .tag { padding-top: 0; } }

/* Difference band */
.band { background: var(--ink); color: rgba(255,255,255,.8); }
.band .wrap { padding-block: clamp(3.5rem, 8vw, 6rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.band .wrap > * { min-width: 0; }
.band h2 { color: var(--white); }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); }
.pillar { padding: 1.4rem; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); display: flex; flex-direction: column; gap: .4rem; }
.pillar b { font-family: var(--display); font-size: 1.45rem; color: var(--gold); font-weight: 600; line-height: 1.15; }
.pillar span { font-size: .92rem; color: rgba(255,255,255,.72); line-height: 1.5; }

/* Service index grid */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc-card { background: var(--white); padding: 1.6rem 1.4rem 1.5rem; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: .7rem; transition: background .2s; min-width: 0; }
.svc-card:hover { background: var(--paper); color: var(--text); }
.svc-card .code { font-size: .72rem; letter-spacing: .14em; font-weight: 700; color: var(--gold-deep); text-transform: uppercase; }
.svc-card h3 { font-size: 1.5rem; }
.svc-card p { font-size: .93rem; color: var(--muted); line-height: 1.55; }
.svc-card .go { margin-top: auto; font-size: .88rem; font-weight: 700; color: var(--gold-deep); }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .svc-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta { background: var(--ink-2); color: rgba(255,255,255,.8); border-top: 1px solid var(--line-dark); }
.cta .wrap { padding-block: clamp(3rem, 6vw, 4.5rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta .wrap > div { display: flex; flex-direction: column; gap: .8rem; max-width: 640px; min-width: 0; }
.cta h2 { color: var(--white); }

/* Service page body */
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.prose { display: flex; flex-direction: column; gap: clamp(2.6rem, 5vw, 3.6rem); min-width: 0; }
.block { display: flex; flex-direction: column; gap: 1.1rem; }
.block h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.35rem); }
.block > img { aspect-ratio: 16 / 8; object-fit: cover; width: 100%; border-radius: var(--radius); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.checks li { padding-left: 1.9rem; position: relative; max-width: 68ch; }
.checks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 11px; height: 11px; border: 2px solid var(--gold); transform: rotate(45deg); }
.checks b { color: var(--text); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature { background: var(--white); padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.feature h4 { font-size: 1.05rem; }
.feature p { font-size: .95rem; color: var(--muted); line-height: 1.6; }
.features.odd .feature:last-child { grid-column: 1 / -1; }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 1.2rem; padding-block: 1.4rem; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li > * { min-width: 0; }
.steps .n { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--gold-deep); font-weight: 600; }
.steps h4 { margin-bottom: .35rem; }
.steps p { color: var(--muted); font-size: .97rem; }
.pull { border-left: 2px solid var(--gold); padding: .4rem 0 .4rem 1.5rem; font-family: var(--display); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem); line-height: 1.25; font-weight: 500; font-style: italic; color: var(--text); max-width: 34ch; }
.inline-cta { background: var(--ink); color: rgba(255,255,255,.8); border-radius: var(--radius); padding: 1.8rem; display: flex; justify-content: space-between; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.inline-cta p { max-width: 50ch; min-width: 0; }

.aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 110px); display: flex; flex-direction: column; gap: 1.2rem; }
.aside nav { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.aside nav h4 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 1rem 1.2rem .6rem; }
.aside nav ul { list-style: none; margin: 0; padding: 0 0 .5rem; }
.aside nav a { display: block; padding: .5rem 1.2rem; text-decoration: none; color: var(--text); font-size: .94rem; border-left: 2px solid transparent; }
.aside nav a:hover { color: var(--gold-deep); }
.aside nav a[aria-current="page"] { border-left-color: var(--gold); color: var(--gold-deep); font-weight: 700; background: var(--paper); }
.aside .card { background: var(--ink); color: rgba(255,255,255,.8); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; font-size: .93rem; }
.aside .card h4 { color: var(--white); font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.aside .card a:not(.btn) { color: var(--gold-soft); text-decoration: none; overflow-wrap: anywhere; }
@media (max-width: 960px) { .svc-layout { grid-template-columns: 1fr; } .aside { position: static; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact-lines li { padding-block: 1.1rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; }
.contact-lines small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-lines a, .contact-lines span { font-size: 1.15rem; font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.contact-lines a:hover { color: var(--gold-deep); }
form.contact { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
form.contact .full { grid-column: 1 / -1; }
form.contact label { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; font-weight: 600; min-width: 0; }
form.contact input, form.contact textarea, form.contact select {
  font: inherit; font-size: 1rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--text); width: 100%;
}
form.contact input:focus, form.contact textarea:focus, form.contact select:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); background: var(--white); }
form.contact textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .9rem; color: var(--muted); }
.form-status { grid-column: 1 / -1; font-size: .95rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--gold); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { form.contact { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: #08111d; color: rgba(255,255,255,.66); font-size: .93rem; }
.site-footer .wrap { padding-block: 3.5rem 1.5rem; display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; gap: 2.5rem; }
.site-footer .wrap > * { min-width: 0; }
.site-footer h4 { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.site-footer a { color: rgba(255,255,255,.8); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand img { width: 170px; }
.site-footer .about { display: flex; flex-direction: column; gap: 1rem; }
.legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: rgba(255,255,255,.45); }
@media (max-width: 900px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .wrap { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .hero .wrap, .split, .band .wrap { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .hero-media img { aspect-ratio: 4 / 3; }
  .ledger { left: 1rem; bottom: 1rem; }
  .topbar .wrap { justify-content: flex-start; gap: 1rem; }
}
@media (max-width: 480px) { .pillars { grid-template-columns: 1fr; } .ledger { position: relative; left: 0; bottom: 0; width: 100%; margin-top: -2.5rem; margin-inline: auto; width: calc(100% - 2rem); } }

/* keyword line inside the homepage H1 */
.h1-sub { display: block; margin-top: 1rem; font-family: var(--body); font-size: var(--step-0); font-weight: 600; line-height: 1.45; letter-spacing: .01em; color: var(--gold-soft); }
