/* Verita Law design tokens — the CMS Colours and Fonts tabs map onto these custom properties.
   An off-white page on a soft drafting grid, deep ink, one refined brass accent used sparingly,
   big editorial DM Serif Display headlines with a brass full stop, clean Inter Tight body text,
   black pill buttons with a round brass "knob" and dark rounded feature cards. */
:root {
  --color-primary: #c9a44e;
  --color-primary-dark: #8a6a20;
  --color-primary-soft: #f2ead6;
  --color-secondary: #121513;
  --color-secondary-light: #1f2420;
  --color-secondary-soft: #2c322e;
  --color-surface: #f4f3ef;
  --color-surface-deep: #e9e7e0;
  --color-default: #4a4f4b;
  --color-muted: #868b86;
  --color-line: #dedcd4;
  --color-white: #ffffff;
  --color-success: #2f7d55;
  --color-error: #b0392e;
  --font-default: 'Inter Tight', system-ui, sans-serif;
  --font-primary: 'Inter Tight', system-ui, sans-serif;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --radius: 30px;
  --radius-sm: 18px;
  --section-max-width: 82rem;
  --header-h: 92px;
  --section-pad-y: 112px;
  --base-size: 16px;
  --grid-size: 84px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; }
body {
  font-family: var(--font-default); color: var(--color-default); line-height: 1.65; -webkit-font-smoothing: antialiased;
  background-color: var(--color-surface);
  /* the soft drafting grid behind every page */
  background-image:
    linear-gradient(color-mix(in srgb, var(--color-secondary) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--color-secondary) 5%, transparent) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center top;
}
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 400; line-height: 1.02; letter-spacing: -.012em; }
h3, h4, h5 { line-height: 1.15; letter-spacing: -.005em; }
h5 { font-family: var(--font-primary); font-weight: 700; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--color-primary); color: var(--color-secondary); }

.container { max-width: var(--section-max-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad-y) 0; position: relative; }
/* entrance start positions must never widen the page; clip keeps sticky children working */
section, footer { overflow-x: clip; }
section.white { background: var(--color-white); }
section.deep { background: var(--color-surface-deep); }
section.dark { background: var(--color-secondary); color: color-mix(in srgb, #fff 70%, transparent); }
section.dark h2, section.dark h3 { color: #fff; }

/* the italic accent words in a headline ("Clear advice, *honest fees*") */
.hl { font-style: italic; color: var(--color-primary-dark); }
.dark .hl, .on-dark .hl { color: var(--color-primary); }
/* the brass full stop that closes a display headline */
.dotted::after { content: '.'; color: var(--color-primary); }

/* ── Buttons: black pills with a round brass knob ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .9rem; padding: .95rem 1.6rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--color-secondary); color: #fff; font: 600 .95rem var(--font-primary); letter-spacing: -.005em; white-space: nowrap;
  transition: background .25s ease, transform .3s var(--ease), box-shadow .3s ease, color .25s ease;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn.knobbed { padding: .42rem .42rem .42rem 1.5rem; }
.btn .knob { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--color-primary); color: var(--color-secondary); transition: transform .35s var(--ease); }
.btn .knob svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -16px color-mix(in srgb, var(--color-secondary) 70%, transparent); }
.btn:hover .knob { transform: rotate(-45deg); }
.btn .go { color: var(--color-primary); }
.btn:hover .go { transform: translateX(3px); }
.btn.accent { background: var(--color-primary); color: var(--color-secondary); }
.btn.accent .knob { background: var(--color-secondary); color: var(--color-primary); }
.btn.light { background: #fff; color: var(--color-secondary); }
.btn.light .knob { background: var(--color-secondary); color: var(--color-primary); }
.btn.outline { background: transparent; color: var(--color-secondary); box-shadow: inset 0 0 0 1.5px var(--color-line); }
.btn.outline:hover { box-shadow: inset 0 0 0 1.5px var(--color-secondary); }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--color-primary); }
.btn[disabled] { opacity: .6; pointer-events: none; }
/* a round arrow button */
.round { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; background: var(--color-primary); color: var(--color-secondary);
  transition: background .25s ease, transform .3s var(--ease); }
.round svg { width: 20px; height: 20px; }
.round:hover { transform: rotate(-45deg); }
.round.line { background: transparent; color: var(--color-secondary); box-shadow: inset 0 0 0 1.5px var(--color-secondary); }
.arrow-link { display: inline-flex; align-items: center; gap: .55rem; font: 600 .95rem var(--font-primary); color: var(--color-secondary); }
.arrow-link svg { width: 17px; height: 17px; color: var(--color-primary-dark); transition: transform .3s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* accent pill tags */
.tag { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .8rem; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary-dark);
  font: 600 .76rem var(--font-primary); letter-spacing: .01em; white-space: nowrap; }
.tag.dark { background: var(--color-secondary); color: var(--color-primary); }
.tag.brass { background: var(--color-primary); color: var(--color-secondary); }

/* ── Section heads: dotted eyebrow, big serif headline ── */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font: 600 .74rem var(--font-primary); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 22%, transparent); }
.section-head { max-width: 780px; margin-bottom: 60px; }
.section-head h2 { font-size: clamp(2.5rem, 4.8vw, 4.2rem); margin: 1rem 0 1.1rem; text-wrap: balance; }
.section-head > p { font-size: 1.06rem; color: var(--color-default); max-width: 60ch; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.centered .eyebrow { justify-content: center; }
.section-head.centered > p { margin-left: auto; margin-right: auto; }
.section-head.split { max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 80px; align-items: end; }
.section-head.split h2 { margin-bottom: 0; }

/* white rounded card */
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--color-line); }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font: 600 .8rem var(--font-primary); color: var(--color-secondary); margin-bottom: .4rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: var(--color-surface); border: 1.5px solid transparent; border-radius: 14px; padding: .85rem 1rem; color: var(--color-secondary);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 18%, transparent); }
.form-grid ::placeholder { color: var(--color-muted); }
.form-grid select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
.form-grid textarea { resize: vertical; min-height: 120px; }
.field-err { color: var(--color-error); font-size: .82rem; margin-top: .35rem; }
.form-note { font-size: .82rem; color: var(--color-muted); }
.form-ok { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--color-success) 12%, #fff); color: var(--color-success); }
.form-ok svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form-bad { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--color-error) 10%, #fff); color: var(--color-error); font-size: .9rem; }

/* a tick list, the tick drawn in CSS so it follows the theme colours */
.tick-list { list-style: none; display: grid; gap: .7rem; }
.tick-list li { position: relative; padding-left: 1.95rem; color: var(--color-secondary); }
.tick-list li::before { content: ''; position: absolute; left: 0; top: .18em; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--color-secondary); }
.tick-list li::after { content: ''; position: absolute; left: .45rem; top: .44em; width: .3rem; height: .55rem; border: solid var(--color-primary); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* rating stars */
.stars { display: inline-flex; gap: 2px; color: var(--color-primary); }
.stars svg { width: 15px; height: 15px; fill: currentColor; }

/* ── Logo: "Verita." in the display serif with a brass full stop ── */
.logo { display: inline-flex; align-items: center; gap: .6rem; font: 400 1.75rem var(--font-heading); color: var(--color-secondary); letter-spacing: -.01em; line-height: 1; }
.logo img { max-height: 44px; width: auto; }
.logo .dot { color: var(--color-primary); }
.logo .wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.05; min-width: 0; }
.logo .wl { display: block; }
.logo .sub { display: block; margin-top: .3em; font: 600 .38em var(--font-primary); letter-spacing: .2em; text-transform: uppercase; color: var(--color-muted); }
.logo { min-width: 0; }
.logo img { max-width: min(46vw, 240px); object-fit: contain; }

/* ══ Motion: section-enter animations (plugins/motion.client.ts) ══
   Hidden states apply only while html.hg-motion is set and the section has not
   entered the frame yet; --i staggers siblings, --d adds a fixed delay. */
.hg-motion [data-anim] {
  transition:
    opacity .8s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    transform 1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    filter .9s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    clip-path 1.1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms));
}
.hg-motion section:not(.hg-inview) [data-anim], .hg-motion footer:not(.hg-inview) [data-anim] { opacity: 0; }
.hg-motion section:not(.hg-inview) [data-anim="up"], .hg-motion footer:not(.hg-inview) [data-anim="up"] { transform: translateY(42px); }
.hg-motion section:not(.hg-inview) [data-anim="down"] { transform: translateY(-34px); }
.hg-motion section:not(.hg-inview) [data-anim="left"] { transform: translateX(60px); }
.hg-motion section:not(.hg-inview) [data-anim="right"] { transform: translateX(-60px); }
.hg-motion section:not(.hg-inview) [data-anim="zoom"] { transform: scale(.88); }
.hg-motion section:not(.hg-inview) [data-anim="blur"] { filter: blur(14px); transform: scale(1.04); }
.hg-motion section:not(.hg-inview) [data-anim="pop"] { transform: translateY(18px) scale(.8); }
/* headings rise out of a mask */
.hg-motion section:not(.hg-inview) [data-anim="rise"] { clip-path: inset(0 0 100% 0); transform: translateY(40%); }
.hg-motion section.hg-inview [data-anim="rise"] { clip-path: inset(-10% -5% -20% -5%); }
/* photos unveil with a wipe while settling from a slight zoom */
.hg-motion section:not(.hg-inview) [data-anim="clip"] { opacity: 1; clip-path: inset(0 0 100% 0 round var(--radius)); }
.hg-motion section.hg-inview [data-anim="clip"] { clip-path: inset(0 0 0 0 round var(--radius)); }
.hg-motion [data-anim="clip"] img { transition: transform 1.6s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)); }
.hg-motion section:not(.hg-inview) [data-anim="clip"] img { transform: scale(1.18); }
/* lines draw from left to right */
.hg-motion section:not(.hg-inview) [data-anim="draw"] { opacity: 1; transform: scaleX(0); transform-origin: left; }
.hg-motion [data-anim="draw"] { transition-duration: 1.4s; }

/* gentle idle float for cards on photos (on a child, so it never fights the entrance) */
@keyframes sw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.float { animation: sw-float 6s ease-in-out infinite; }
.float.slow { animation-duration: 8s; animation-delay: -2s; }
.float.late { animation-delay: -4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
}
@media (max-width: 960px) {
  .section-head.split { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 640px) {
  :root { --section-pad-y: 78px; --radius: 24px; --header-h: 80px; --grid-size: 56px; }
  .form-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 40px; }
}
