/* =========================================================================
   NUMERIC Business Services — site styles
   Layout: airy white sections punctuated by navy panels with rounded lower
   corners and a gold-to-bronze bottom edge (as in the ads); gold dotted lines
   divide the page; the brochure's dotted-rule labels mark each section.
   ========================================================================= */

:root {
  /* Brand colors */
  --navy: #133457;
  --navy-top: #064566;          /* gradient start */
  --gold: #D9A462;
  --bronze: #B27C36;            /* logo mark left stroke; gold-edge gradient end */
  --ink: #133457;               /* text on white */
  --ink-soft: #4d6079;          /* secondary text on white */
  --paper: #ffffff;
  --mist: #f4f6f9;              /* faint navy-tinted neutral for fields */
  --line: #e1e6ed;
  --on-navy: #ffffff;
  --on-navy-soft: #c5d1de;

  --panel-bg: linear-gradient(168deg, var(--navy-top) 0%, var(--navy) 62%);
  --gold-edge: linear-gradient(90deg, var(--gold) 0%, var(--bronze) 100%);

  /* Fonts.
     Roc Grotesk comes from the Adobe Fonts web project linked in each page's
     <head> (use.typekit.net/kud5aqz.css, on the Illustrator subscription).
     Archivo stays as the fallback: if the Adobe Fonts project ever stops
     loading, headlines fall back to it automatically. --head-cond-stretch only
     affects the Archivo fallback; Roc Grotesk Condensed is condensed already. */
  --font-head: "roc-grotesk", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-head-cond: "roc-grotesk-condensed", "Archivo", "Arial Narrow", sans-serif;
  --head-cond-stretch: 72%;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-label: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --radius-panel: 26px;
  --edge: 7px;                  /* gold bottom edge thickness */
  --gutter: clamp(20px, calc(5 * var(--vw)), 64px);
  --max: 1140px;
  --dots: radial-gradient(circle, var(--gold) 1.15px, transparent 1.65px);

  /* Fixed designs: 1vw of the design canvas. --z is the scale set by the script. */
  --vw: 12.8px;                 /* desktop/tablet canvas: 1280px */
  --z: 1;
}
html.is-mobile { --vw: 3.9px; }  /* phone canvas: 390px */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* The footer is the end of the page: everything behind and below its bottom
   edge is navy (the strip under an iPhone/iPad home bar, and any sub-pixel seam
   from scaling), so no white line or band can show beneath it. */
html { background: var(--paper) linear-gradient(var(--navy), var(--navy)) left bottom / 100% env(safe-area-inset-bottom, 0px) no-repeat; }
html:has(.portal-body) { background: var(--mist); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 100px; overflow-x: hidden; }

/* ---------- Fixed designs ----------
   Everything is drawn at the design width (1280px desktop/tablet, 390px phone)
   and scaled to the window as one picture by the script in each page's <head>.
   .frame takes the scaled height; the top bar sits in its own fixed frame. */
.page-scale { width: 1280px; transform-origin: 0 0; transform: translateX(var(--x, 0px)) scale(var(--z)); }
html.is-mobile .page-scale { width: 390px; }
/* hidden (not clip) so every browser cuts off the unscaled height below the page */
.frame { overflow: hidden; position: relative; }
/* navy behind the bottom of the page itself (page width only), so no seam shows under the footer */
body:not(.portal-body) .page { background: linear-gradient(to top, var(--navy) 0 80px, var(--paper) 80px); }
/* Solid white bar across the full screen (no blur: it drew box edges on
   Windows). Once scrolled, a thin line appears under the header, page width only. */
.bar-frame {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 20;
  background: var(--paper);
}
.topbar.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.bar-space { height: var(--bar-h, 92px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.gold { color: var(--gold); }

/* ---------- Brand pieces ---------- */

.logo { display: inline-flex; text-decoration: none; line-height: 0; }
.logo-img { display: block; height: auto; width: 196px; }

/* ACCOUNTING + BOOKKEEPING stamp, as on the business card and banner:
   right-aligned, the plus hanging in gold, a short gold rule centered below */
.stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-head);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--navy);
  white-space: nowrap;
}
.stamp::after { content: ""; align-self: center; width: 64%; height: 1px; margin-top: 8px; background: var(--gold); }
.stamp .plus { color: var(--gold); font-weight: 400; margin-right: .55em; letter-spacing: 0; }
.stamp--light { color: var(--on-navy); }

/* Gold dotted lines */
.dots-v { width: 4px; background-image: var(--dots); background-size: 4px 8px; background-repeat: repeat-y; background-position: center top; }
.dots-h { height: 4px; background-image: var(--dots); background-size: 8px 4px; background-repeat: repeat-x; background-position: left center; }

/* Navy panel: gradient fill, rounded lower corners, gold-to-bronze edge */
.panel {
  position: relative;
  color: var(--on-navy);
  border-bottom: var(--edge) solid transparent;
  border-radius: var(--radius-panel);
  background: var(--panel-bg) padding-box, var(--gold-edge) border-box;
}

/* Brochure-style section label: gold serif capitals between dotted rules */
.kicker {
  display: inline-flex; align-items: center; gap: 18px;
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bronze);
}
.kicker::before, .kicker::after { content: ""; width: 4px; height: 30px; background-image: var(--dots); background-size: 4px 6px; background-repeat: repeat-y; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-label);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--on-navy);
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--navy-top); border-color: var(--navy-top); }
.btn svg { width: 14px; height: 14px; flex: none; color: var(--gold); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Top bar ---------- */

body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
.topbar {
  position: relative;
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow .25s;
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;   /* links centred between logo and stamp */
  align-items: center;
  gap: 24px;
  min-height: 92px;
}
.topbar .logo { justify-self: start; }
.nav { display: flex; justify-self: center; gap: clamp(22px, calc(3.2 * var(--vw)), 48px); }
.nav a {
  font-family: var(--font-label);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none; color: var(--navy);
  padding: 6px 0;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat;
  transition: background-size .3s;
}
.nav a:hover, .nav a:focus-visible { background-size: 100% 1px; }
.topbar-right { justify-self: end; display: flex; align-items: center; gap: 24px; }
.topbar-right .dots-v { height: 46px; }
/* header stamp: heavier and larger than the section links beside it */
.topbar .stamp { font-size: 12px; font-weight: 500; letter-spacing: .2em; line-height: 1.45; }
.topbar .stamp .plus { font-weight: 500; font-size: 1.15em; margin-right: .4em; }
.topbar .stamp::after { height: 2px; width: 58%; margin-top: 7px; }

/* ---------- Opening ---------- */

/* The panel hangs from the top bar like the ads: square top, rounded base */
.hero-panel {
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  padding-inline: clamp(20px, calc(6 * var(--vw)), 80px);
  text-align: center;
  padding-block: clamp(32px, calc(4 * var(--vw)), 52px);
  overflow: hidden;
  isolation: isolate;
}

/* ---- Ambient background: slow, quiet movement so the panel never sits still ---- */
.hero-ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; overflow: hidden; }
/* outer span: where each light sits for the current statement (eases between them) */
.glow-pos { position: absolute; width: 70%; aspect-ratio: 1; transition: transform 6s cubic-bezier(.45,0,.2,1); }
.glow-pos-a { left: -20%; top: -45%; }
.glow-pos-b { right: -22%; bottom: -60%; }
/* inner span: a slow drift that never stops */
.glow { position: absolute; inset: 0; border-radius: 50%; }
.glow-a { background: radial-gradient(closest-side, rgba(20,110,150,.55), rgba(20,110,150,0)); animation: drift-a 26s ease-in-out infinite alternate; }
.glow-b { background: radial-gradient(closest-side, rgba(46,128,172,.32), rgba(46,128,172,0)); animation: drift-b 32s ease-in-out infinite alternate; }
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(18%, 14%) scale(1.15); } }
@keyframes drift-b { from { transform: translate(0, 0) scale(1.05); } to { transform: translate(-16%, -10%) scale(.92); } }
.hero-panel[data-slide="1"] .glow-pos-a { transform: translate(55%, 25%); }
.hero-panel[data-slide="1"] .glow-pos-b { transform: translate(-60%, -10%); }
.hero-panel[data-slide="2"] .glow-pos-a { transform: translate(105%, 5%); }
.hero-panel[data-slide="2"] .glow-pos-b { transform: translate(-110%, -20%); }
/* --lock is the width of the logo lockup; every hero line is sized from it,
   so all three statements share one scale. */
.hero-rotator {
  --lock: clamp(240px, calc(27 * var(--vw)), 340px);
  --fade: 1.8s;
  display: grid;
}
.hero-slide {
  grid-area: 1 / 1;                     /* slides stack; the tallest sets the height */
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity var(--fade) ease, visibility 0s linear var(--fade);
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity var(--fade) ease; }

.hero h1, .hero-statement {
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  font-weight: 400;
  font-size: var(--lock);              /* children size themselves as a share of the lockup */
  line-height: 1.3;
  max-width: 100%;
}
.hero-lockup { display: block; width: 1em; height: auto; }
.hero-lines { display: flex; flex-direction: column; align-items: center; }
.hero-lines > span, .hero-statement > span { display: block; max-width: 100%; text-wrap: balance; }
/* serif capitals, quiet, opening the sentence */
.hero-first {
  margin-top: calc(var(--lock) * .09);
  font-family: var(--font-serif); font-variation-settings: "opsz" 36; font-weight: 400;
  font-size: .052em; letter-spacing: .24em; text-indent: .24em;
  color: var(--on-navy); line-height: 1.6;
}
/* the statement carries the weight: spaced capitals */
.hero-big {
  font-family: var(--font-label);
  font-weight: 500; font-size: .088em; letter-spacing: .14em; text-indent: .14em;
  color: var(--on-navy); line-height: 1.4;
}
.hero-first + .hero-big { margin-top: calc(var(--lock) * .012); }
.hero-alive {
  margin-top: calc(var(--lock) * .07);
  font-family: var(--font-serif); font-variation-settings: "opsz" 72;
  font-size: .135em; letter-spacing: .08em; text-indent: .08em; line-height: 1;
}
/* closing line of the second and third statements: serif capitals, one gold word */
.hero-close {
  margin-top: calc(var(--lock) * .07);
  font-family: var(--font-serif); font-variation-settings: "opsz" 48;
  font-size: .066em; letter-spacing: .1em; text-indent: .1em;
  color: var(--on-navy); line-height: 1.45;
}
.nobr { white-space: nowrap; }
/* ---- Each statement arrives line by line, rising gently into place ---- */
.hero-slide.is-active .hero-lockup,
.hero-slide.is-active .hero-lines > span,
.hero-slide.is-active .hero-statement > span {
  animation: hero-rise 1.6s cubic-bezier(.2,.7,.2,1) both;
}
.hero-slide.is-active .hero-lines > span:nth-child(1),
.hero-slide.is-active .hero-statement > span:nth-child(1) { animation-delay: .25s; }
.hero-slide.is-active .hero-lines > span:nth-child(2),
.hero-slide.is-active .hero-statement > span:nth-child(2) { animation-delay: .45s; }
.hero-slide.is-active .hero-lines > span:nth-child(3),
.hero-slide.is-active .hero-statement > span:nth-child(3) { animation-delay: .65s; }
.hero-slide.is-active .hero-lines > span:nth-child(4) { animation-delay: .95s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- A soft light passes once across the gold words as they arrive ---- */
.hero-slide .gold {
  /* gradient three times the word's width; sliding it from 100% to 0% keeps
     the word fully gold at both ends while the light band crosses it */
  background: linear-gradient(100deg, var(--gold) 0 42%, #f8e8cc 50%, var(--gold) 58% 100%) 100% 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-slide.is-active .gold { animation: hero-shimmer 2.6s ease-in-out 1.4s both; }
@keyframes hero-shimmer { from { background-position: 100% 0; } to { background-position: 0% 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .glow,
  .hero-slide.is-active .hero-lockup,
  .hero-slide.is-active .hero-lines > span,
  .hero-slide.is-active .hero-statement > span,
  .hero-slide.is-active .gold { animation: none; }
  .glow-pos { transition: none; }
}
/* statements 2 and 3 have no logo, so their lines are set larger to fill the
   panel to about the height of the first statement */
html.is-desktop .hero-statement .hero-big { font-size: .148em; line-height: 1.3; letter-spacing: .12em; text-indent: .12em; }
html.is-desktop .hero-statement .hero-close { font-size: .098em; margin-top: calc(var(--lock) * .1); }
/* phone design */
html.is-mobile .hero-statement .hero-big { font-size: .078em; letter-spacing: .1em; text-indent: .1em; }
html.is-mobile .hero-close { letter-spacing: .07em; text-indent: .07em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Service sections ---------- */

.section { padding-block: clamp(56px, calc(8 * var(--vw)), 112px); }
.service-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, calc(6 * var(--vw)), 96px); align-items: start; }
/* paragraph's first line sits level with the top of the headline's letters */
.service-head .intro { padding-top: 0; }
/* section label centred on the page, above the headline and paragraph */
.kicker--center { display: flex; width: max-content; margin: 0 auto 56px; gap: 30px; font-size: 24px; letter-spacing: .24em; text-indent: .24em; }
.kicker--center::before, .kicker--center::after { height: 46px; background-size: 4px 7px; }
.service-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(32px, calc(4.1 * var(--vw)), 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.service-head .intro { margin: 0; color: var(--ink-soft); font-size: 18px; max-width: 58ch; }

/* "Led by" set like the email signatures: serif name, gold spaced caps */
.led-by { margin: 28px 0 0; display: flex; flex-direction: column; gap: 4px; }
.led-by strong { order: 1; font-family: var(--font-serif); font-size: 24px; font-weight: 400; color: var(--navy); line-height: 1.2; }
.led-by .led-label { order: 0; font-family: var(--font-label); font-size: 11px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }

.groups {
  list-style: none; margin: clamp(48px, calc(6 * var(--vw)), 80px) 0 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: clamp(28px, calc(4 * var(--vw)), 56px);
}
/* five groups: three across, then two centred beneath */
.group { grid-column: span 2; }
.group:nth-child(4) { grid-column: 2 / span 2; }
.group {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.group svg { width: 34px; height: 34px; color: var(--gold); margin-top: 1px; }
.group h3 { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--navy); }
.group p { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }

.divider { display: flex; justify-content: center; }
.divider .dots-h { display: none; }
/* thin gold rule across the full width of the text */
.divider .rule { display: block; width: 100%; height: 1px; background: var(--gold); }

/* ---------- Why Numeric ---------- */

.why-panel { padding-block: clamp(56px, calc(8 * var(--vw)), 104px); padding-inline: clamp(24px, calc(6 * var(--vw)), 88px); }
.why-panel h2 {
  margin: 0 0 clamp(40px, calc(5 * var(--vw)), 64px);
  font-family: var(--font-head);
  font-weight: 500; font-size: clamp(30px, calc(4 * var(--vw)), 48px); letter-spacing: -0.02em; line-height: 1.1;
  text-align: center;
}
.why-panel h2 .gold { font-family: var(--font-serif); font-weight: 400; font-size: 1.08em; letter-spacing: 0; }
.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, calc(5 * var(--vw)), 60px) clamp(32px, calc(6 * var(--vw)), 96px); }
.point { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; }
.point .num {
  font-family: var(--font-head-cond); font-stretch: var(--head-cond-stretch);
  font-weight: 600; font-size: 50px; line-height: .9; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.point h3 { margin: 4px 0 10px; font-family: var(--font-head); font-weight: 500; font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }
.point p { margin: 0; color: var(--on-navy-soft); font-size: 16px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, calc(7 * var(--vw)), 112px); align-items: start; }
.contact h2 {
  margin: 0 0 30px;
  font-family: var(--font-head);
  font-weight: 500; font-size: clamp(38px, calc(5 * var(--vw)), 58px); line-height: 1.05; letter-spacing: -0.02em;
}
.phone-block .label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.phone {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(32px, calc(3.8 * var(--vw)), 42px); line-height: 1.1;
  text-decoration: none; color: var(--navy);
}

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--navy); }
.field label .opt { font-weight: 400; letter-spacing: .08em; text-transform: none; color: var(--ink-soft); font-size: 13px; margin-left: 6px; }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mist);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: var(--paper); box-shadow: 0 0 0 3px rgba(217,164,98,.18); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b8473e; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
#cf-captcha:empty { display: none; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: 15px; color: var(--ink-soft); min-height: 1.5em; }
.form-status.is-error { color: #a33b33; }
.thanks {
  grid-column: 1 / -1;
  padding: 48px 32px; text-align: center;
  border-radius: 20px; background: var(--mist);
}
.thanks p { margin: 0; font-family: var(--font-serif); font-size: clamp(24px, calc(3 * var(--vw)), 30px); color: var(--navy); }

/* ---------- Footer: laid out like the email signature ---------- */

.footer { padding-bottom: 0; }
.footer-panel { border-radius: var(--radius-panel) var(--radius-panel) 0 0; border-bottom: 0; background: var(--panel-bg); border-top: var(--edge) solid transparent; background: var(--panel-bg) padding-box, var(--gold-edge) border-box; padding-block: clamp(48px, calc(6 * var(--vw)), 72px) 28px; }
/* left: service area · centre: logo · right: stamp, with dotted dividers between */
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); align-items: center; column-gap: clamp(24px, calc(4 * var(--vw)), 56px); }
.footer-grid .logo-img { width: 220px; }
.footer-logo { justify-self: center; }
.footer-div { height: 70px; }
/* set exactly like the stamp opposite it */
.footer-serving { margin: 0; justify-self: start; font-family: var(--font-head); font-size: 12px; font-weight: 400; letter-spacing: .22em; line-height: 1.5; text-transform: uppercase; color: var(--on-navy); }
.footer-stamp { justify-self: end; font-size: 12px; font-weight: 400; }
.footer-legal { margin: 44px auto 0; font-size: 12.5px; letter-spacing: .06em; color: rgba(197,209,222,.65); }

/* ---------- Portal page ---------- */

.portal-body { background: var(--mist); }
.portal-body .page { min-height: calc(100vh / var(--z)); display: flex; flex-direction: column; }
.portal-body .bar-frame { background: var(--paper); }
.portal-body .topbar { box-shadow: 0 1px 0 var(--line); }
.portal-main { flex: 1; display: flex; align-items: center; padding-block: clamp(40px, calc(8 * var(--vw)), 96px); }
.portal-card {
  width: 100%; max-width: 460px; margin-inline: auto;
  background: var(--paper);
  border-radius: var(--radius-panel);
  box-shadow: 0 30px 60px -30px rgba(19,52,87,.28), 0 0 0 1px var(--line);
  overflow: hidden;
}
.portal-card-head { background: var(--panel-bg); color: var(--on-navy); padding: clamp(28px, calc(6 * var(--vw)), 40px) clamp(28px, calc(6 * var(--vw)), 44px) 30px; border-bottom: 4px solid var(--gold); border-image: var(--gold-edge) 1; }
.portal-card-head .lock { width: 36px; height: 36px; color: var(--gold); }
.portal-card-head h1 { margin: 14px 0 6px; font-family: var(--font-head); font-weight: 500; font-size: 32px; letter-spacing: -0.02em; line-height: 1.1; }
.portal-card-head .sub { margin: 0; color: var(--on-navy-soft); font-family: var(--font-serif); font-size: 18px; }
.portal-card-body { padding: clamp(28px, calc(6 * var(--vw)), 40px) clamp(28px, calc(6 * var(--vw)), 44px); }
.portal-card .form { grid-template-columns: minmax(0, 1fr); }
.portal-card .btn { width: 100%; padding-block: 15px; }
.portal-error {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0; padding: 14px 16px; border-radius: 12px;
  background: #fbf3ea; border: 1px solid #ecd4b5; color: var(--navy); font-size: 15px; line-height: 1.5;
}
.portal-error svg { width: 18px; height: 18px; color: var(--bronze); flex: none; margin-top: 2px; }
.portal-help { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); text-align: center; }
.portal-help a { font-family: var(--font-serif); font-size: 17px; color: var(--navy); text-decoration: none; }
.portal-top .topbar-inner { grid-template-columns: 1fr auto; }
.back-link { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--navy); display: inline-flex; align-items: center; gap: 8px; }
.back-link svg { width: 14px; height: 14px; color: var(--gold); }
.portal-foot { padding-block: 24px; text-align: center; font-size: 13px; color: var(--ink-soft); }

/* ---------- Responsive ---------- */

/* ---------- Phone design ----------
   The page has two fixed designs, chosen and scaled to fit by the script in each
   page's <head>: desktop/tablet (1280px wide) and phone (390px wide). The rules
   below build the phone design; nothing else changes with screen width. */

html.is-mobile .topbar-inner { grid-template-columns: 1fr auto; row-gap: 0; min-height: 0; padding-block: 16px 0; }
html.is-mobile .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: clamp(28px, calc(6 * var(--vw)), 64px); padding-block: 10px 9px; border-top: 1px solid rgba(217,164,98,.6); margin-top: 14px; }
html.is-mobile .service-head, html.is-mobile .contact-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
html.is-mobile .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.is-mobile .group, html.is-mobile .group:nth-child(4) { grid-column: auto; }
html.is-mobile .group:nth-child(5) { grid-column: 1 / -1; }
html.is-mobile .points { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .footer-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: 26px; text-align: center; }
html.is-mobile .footer-logo { order: -2; }
html.is-mobile .footer-div { width: 60px; height: 4px; background-image: var(--dots); background-size: 8px 4px; background-repeat: repeat-x; }
html.is-mobile .footer-div:first-of-type { order: -1; }
html.is-mobile .footer-div:nth-of-type(2) { order: 1; }
html.is-mobile .footer-stamp { order: 0; justify-self: center; }
html.is-mobile .footer-serving { order: 2; justify-self: center; }
html.is-mobile .footer-legal { text-align: center; }
html.is-mobile body { font-size: 16px; }
html.is-mobile .topbar-inner { padding-block: 12px 0; gap: 12px; }
html.is-mobile .nav { justify-self: stretch; justify-content: space-around; gap: 0; margin-top: 12px; padding-block: 9px 8px; }
html.is-mobile .nav a { font-size: 11px; letter-spacing: .16em; }
html.is-mobile .topbar-right { gap: 10px; }
html.is-mobile .topbar-right .dots-v { height: 34px; }
html.is-mobile .topbar-right .stamp { font-size: 7.5px; letter-spacing: .14em; }
html.is-mobile .topbar-right .stamp::after { margin-top: 5px; }
html.is-mobile .topbar-right .btn { padding: 9px 12px; font-size: 10px; letter-spacing: .1em; gap: 6px; }
html.is-mobile .topbar-right .btn svg { width: 11px; height: 11px; }
html.is-mobile .logo-img { width: 112px; }
html.is-mobile .groups { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .group:nth-child(5) { grid-column: auto; }
html.is-mobile .form { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .point { grid-template-columns: 42px minmax(0, 1fr); }
html.is-mobile .point .num { font-size: 42px; }
html.is-mobile .portal-top .topbar-inner { padding-block: 14px; }
/* phone: centred labels and gold rule as on desktop, sized for the small screen */
html.is-mobile .kicker--center { margin: 0 auto 30px; gap: 18px; font-size: 15px; letter-spacing: .14em; text-indent: 0; }
html.is-mobile .kicker--center::before, html.is-mobile .kicker--center::after { height: 30px; background-size: 4px 6px; }
html.is-mobile .service-head .intro { padding-top: 0; }
/* phone hero: shorter panel; statements 2 and 3 set larger to fill it */
html.is-mobile .hero-panel { padding-block: 20px; }
html.is-mobile .hero-rotator { --lock: 190px; }
html.is-mobile .hero-statement .hero-big { font-size: .112em; letter-spacing: .08em; text-indent: .08em; line-height: 1.3; }
html.is-mobile .hero-statement .hero-close { font-size: .086em; letter-spacing: .06em; text-indent: .06em; margin-top: calc(var(--lock) * .07); }

/* =====================================================================
   Phone layout (390px canvas). Designed for the small screen: compact
   spacing, phone-sized type, short scrolling. Overrides the rules above.
   ===================================================================== */
html.is-mobile body { font-size: 15px; line-height: 1.6; }
html.is-mobile { scroll-padding-top: 110px; }

/* top bar */
html.is-mobile .topbar-inner { padding-block: 10px 0; gap: 10px; }
html.is-mobile .logo-img { width: 104px; }
html.is-mobile .nav { margin-top: 10px; padding-block: 8px 7px; }
html.is-mobile .nav a { font-size: 10.5px; padding: 4px 0; }

/* hero: short band */
html.is-mobile .hero-panel { padding-block: 18px 20px; padding-inline: 16px; }
html.is-mobile .hero-rotator { --lock: 150px; }
html.is-mobile .hero-statement .hero-big { font-size: .118em; letter-spacing: .08em; text-indent: .08em; }
html.is-mobile .hero-statement .hero-close { font-size: .09em; margin-top: calc(var(--lock) * .06); }

/* service sections */
html.is-mobile .section { padding-block: 34px; }
html.is-mobile .kicker--center { margin: 0 auto 18px; font-size: 13px; gap: 14px; }
html.is-mobile .kicker--center::before, html.is-mobile .kicker--center::after { height: 22px; }
html.is-mobile .service-head { gap: 14px; }
html.is-mobile .service-head h2 { font-size: 26px; line-height: 1.12; }
html.is-mobile .led-by { margin-top: 12px; gap: 2px; }
html.is-mobile .led-by .led-label { font-size: 9.5px; }
html.is-mobile .led-by strong { font-size: 19px; }
html.is-mobile .service-head .intro { font-size: 15px; line-height: 1.6; }
html.is-mobile .groups { margin-top: 22px; }
html.is-mobile .group { grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-block: 13px; }
html.is-mobile .group svg { width: 24px; height: 24px; margin-top: 2px; }
html.is-mobile .group h3 { font-size: 17px; margin-bottom: 2px; }
html.is-mobile .group p { font-size: 13.5px; line-height: 1.5; }
html.is-mobile .divider .rule { opacity: 1; }

/* why numeric */
html.is-mobile .why-panel { padding: 32px 20px 34px; }
html.is-mobile .why-panel h2 { font-size: 26px; margin-bottom: 22px; }
html.is-mobile .points { gap: 18px; }
html.is-mobile .point { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
html.is-mobile .point .num { font-size: 30px; }
html.is-mobile .point h3 { font-size: 16.5px; margin: 1px 0 4px; }
html.is-mobile .point p { font-size: 14px; line-height: 1.5; }

/* contact */
html.is-mobile .contact-grid { gap: 22px; }

html.is-mobile .contact h2 { font-size: 30px; margin-bottom: 14px; }
html.is-mobile .phone-block .label { font-size: 9.5px; margin-bottom: 2px; }
html.is-mobile .phone { font-size: 28px; }
html.is-mobile .contact-note { margin: 10px 0 0; font-size: 14px; }
html.is-mobile .form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html.is-mobile .field { gap: 5px; }
html.is-mobile .field label { font-size: 9.5px; }
html.is-mobile .field input, html.is-mobile .field textarea { padding: 10px 12px; border-radius: 10px; }
html.is-mobile .field textarea { min-height: 96px; }
html.is-mobile .btn#cf-send { padding: 11px 26px; }
html.is-mobile .thanks { padding: 28px 18px; }

/* footer: logo on top, then service area | stamp side by side */
html.is-mobile .footer-panel { padding-block: 26px 16px; }
html.is-mobile .footer-grid { grid-template-columns: auto auto auto; justify-content: center; justify-items: center; column-gap: 14px; row-gap: 16px; }
html.is-mobile .footer-logo { order: -1; grid-column: 1 / -1; }
html.is-mobile .footer-grid .logo-img { width: 150px; }
html.is-mobile .footer-serving { order: 0; justify-self: end; text-align: right; font-size: 7.5px; letter-spacing: .13em; }
html.is-mobile .footer-div:first-of-type { order: 1; width: 4px; height: 34px; background-image: var(--dots); background-size: 4px 7px; background-repeat: repeat-y; }
html.is-mobile .footer-stamp { order: 2; justify-self: start; font-size: 7.5px; letter-spacing: .13em; }
html.is-mobile .footer-div:nth-of-type(2) { display: none; }
html.is-mobile .footer-legal { margin-top: 18px; font-size: 10.5px; }

/* client portal */
html.is-mobile .portal-main { padding-block: 26px; }
html.is-mobile .portal-card-head { padding: 22px 22px 20px; }
html.is-mobile .portal-card-head h1 { font-size: 26px; margin-top: 10px; }
html.is-mobile .portal-card-head .sub { font-size: 15px; }
html.is-mobile .portal-card-body { padding: 22px; }
html.is-mobile .portal-card .form { grid-template-columns: minmax(0, 1fr); }

/* phone header: more breathing room (button reads "Portal" with its lock) */
html.is-mobile .topbar-inner { padding-block: 14px 0; column-gap: 0; }
html.is-mobile .topbar-right { gap: 18px; }
html.is-mobile .topbar-right .btn { padding: 9px 15px; }
html.is-mobile .btn-client { display: none; }
html.is-mobile .nav { margin-top: 14px; padding-block: 10px 9px; }

/* phone: accounting headline on one line */
html.is-mobile .service-head h2 { font-size: 24.5px; }
html.is-mobile #acc-h { white-space: nowrap; }

/* phone footer: service area on the left (left-aligned), stamp on the right */
html.is-mobile .footer-serving { order: 0; justify-self: start; text-align: left; }
html.is-mobile .footer-div:first-of-type { order: 1; }
html.is-mobile .footer-stamp { order: 2; justify-self: end; }

/* Windows only: Windows renders type heavier than Apple devices, so the
   small spaced capitals are set lighter there to match the iPad/Mac look. */
html.is-windows .topbar .stamp,
html.is-windows .topbar .stamp .plus { font-weight: 400; }
/* Windows draws white-on-navy capitals heavy, so these two footer lines use
   Work Sans Light (the site's label face) there; Apple devices keep Roc Grotesk. */
html.is-windows.is-desktop .footer-serving,
html.is-windows.is-desktop .footer-stamp { font-family: var(--font-label); font-weight: 300; color: rgba(255,255,255,.82); letter-spacing: .26em; font-size: 11.5px; }
html.is-windows .nav a { color: rgba(19,52,87,.9); }

/* =====================================================================
   Scroll reveals (html.reveal-on is set in index.html's <head>; sections get
   .is-in from js/main.js as they come into view). Each plays once.
   ===================================================================== */
html.reveal-on .section .kicker--center > span,
html.reveal-on .section .kicker--center::before,
html.reveal-on .section .kicker--center::after,
html.reveal-on .service-head h2,
html.reveal-on .service-head .led-by,
html.reveal-on .service-head .intro,
html.reveal-on .contact-grid > div > *,
html.reveal-on .contact-grid > form {
  opacity: 0;
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1), letter-spacing 1.1s cubic-bezier(.2,.7,.2,1);
}
/* label: the dotted marks start beside the word and open outward */
html.reveal-on .section .kicker--center::before { transform: translateX(34px); }
html.reveal-on .section .kicker--center::after  { transform: translateX(-34px); }
html.reveal-on .section .kicker--center > span  { display: inline-block; transform: translateY(6px); }
html.reveal-on .section.is-in .kicker--center > span,
html.reveal-on .section.is-in .kicker--center::before,
html.reveal-on .section.is-in .kicker--center::after { opacity: 1; transform: none; }
html.reveal-on .section.is-in .kicker--center::before,
html.reveal-on .section.is-in .kicker--center::after { transition-delay: .1s; }

/* content rises in after the label, one piece at a time */
html.reveal-on .service-head h2,
html.reveal-on .service-head .led-by,
html.reveal-on .service-head .intro,
html.reveal-on .contact-grid > div > *,
html.reveal-on .contact-grid > form { transform: translateY(18px); }
html.reveal-on .section.is-in .service-head h2,
html.reveal-on .section.is-in .service-head .led-by,
html.reveal-on .section.is-in .service-head .intro,
html.reveal-on .section.is-in .contact-grid > div > *,
html.reveal-on .section.is-in .contact-grid > form { opacity: 1; transform: none; }
html.reveal-on .section.is-in .service-head h2 { transition-delay: .3s; }
html.reveal-on .section.is-in .service-head .led-by { transition-delay: .45s; }
html.reveal-on .section.is-in .service-head .intro { transition-delay: .55s; }
html.reveal-on .section.is-in .contact-grid > div > :nth-child(1) { transition-delay: .3s; }
html.reveal-on .section.is-in .contact-grid > div > :nth-child(2) { transition-delay: .42s; }
html.reveal-on .section.is-in .contact-grid > div > :nth-child(3) { transition-delay: .52s; }
html.reveal-on .section.is-in .contact-grid > form { transition-delay: .6s; }

/* gold divider draws out from the centre */
html.reveal-on .divider .rule { transform: scaleX(0); transform-origin: center; transition: transform 1.4s cubic-bezier(.65,0,.35,1); }
html.reveal-on .divider.is-in .rule { transform: scaleX(1); }

/* ---- Stamp arrival: ACCOUNTING + BOOKKEEPING comes in from a distance:
   it starts small, faint and soft, then travels in, growing and darkening
   until it lands at its normal size and place. Header: on page load.
   Footer: when it scrolls into view. Off with reduced motion. */
@keyframes stamp-arrive {
  0%   { opacity: 0;   transform: translate(-60px, -18px) scale(.35); filter: blur(6px); }
  30%  { opacity: .25; filter: blur(3px); }
  70%  { opacity: .75; filter: blur(.5px); }
  100% { opacity: 1;   transform: none; filter: none; }
}
html.reveal-on .topbar .stamp { animation: stamp-arrive 1.8s cubic-bezier(.22,.7,.2,1) .3s both; }
html.reveal-on .footer-stamp { opacity: 0; }
html.reveal-on .footer.is-in .footer-stamp { animation: stamp-arrive 1.8s cubic-bezier(.22,.7,.2,1) .15s both; }
