/* A.P. Gilfoyle website styles.
   Layout follows worldquant.com (home) and worldquant.com/how-we-work (approach), translated into the
   A.P. Gilfoyle brand: deep purple replaces black, pale lavender replaces grey, purple/lavender accents,
   Noto Serif Bold headings, Avenir Next body. The wordmark only ever sits on the white header. */

:root {
  --brand: #662D91;
  --brand-deep: #3d1a59;
  --night: #12071d;
  --deep: #1d0b30;
  --plum: #21132f;
  --lav: #c7a6e4;
  --ink: #1d0b30;
  --muted: #5e5070;
  --mist: #f1ebf7;
  --line: #ddd0ea;
  --white: #fff;
  --serif: 'Noto Serif', Georgia, serif;
  --sans: 'AvenirNextLTPro-Regular', 'Avenir Next', Avenir, 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --head: 84px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--head); }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; color: var(--brand); letter-spacing: -.02em; line-height: 1.06; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--lav); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--brand); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { top: 12px; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.label { display: block; font-size: 1rem; color: var(--muted); }
.dark .label { color: var(--lav); }

/* Links and buttons */
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 48px; padding: 16px 24px; border: 1.5px solid var(--brand); border-radius: 12px; background: var(--brand); color: #fff; font: inherit; font-size: 1.05rem; text-decoration: none; cursor: pointer; transition: background .25s var(--ease), border-color .25s var(--ease); }
.btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; transition: transform .25s var(--ease); }
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn:hover svg { transform: translateX(4px); }
.dark .btn { background: var(--lav); border-color: var(--lav); color: var(--night); }
.dark .btn:hover { background: #fff; border-color: #fff; }

/* Header: white, so the black wordmark keeps its colours and clear space */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--head); }
.logo { display: block; padding: 12px 0; }
.logo img { height: 34px; width: auto; }
/* Menu button and full-screen menu */
.menu-btn, .menu-close { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1.5px solid var(--brand); border-radius: 0; background: none; color: var(--brand); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.menu-btn svg, .menu-close svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--brand); color: #fff; }
.menu { position: fixed; inset: 0; z-index: 100; padding: clamp(10px, 1.4vw, 20px); background: linear-gradient(135deg, var(--brand) 0%, #8a4fbf 45%, var(--lav) 100%); visibility: hidden; opacity: 0; transition: opacity .35s var(--ease), visibility 0s linear .35s; }
.menu.is-open { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }
.menu-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(24px, 4vw, 64px); padding-top: clamp(28px, 5vw, 72px); background: var(--night); color: #fff; overflow-y: auto; transform: scale(.985); transition: transform .45s var(--ease); }
.menu.is-open .menu-inner { transform: none; }
.menu-close { position: absolute; top: clamp(14px, 2vw, 28px); right: clamp(14px, 2vw, 28px); border-color: rgba(255,255,255,.55); color: #fff; }
.menu-close:hover { background: #fff; border-color: #fff; color: var(--night); }
.menu-links { list-style: none; margin: 0; padding: 0; }
.menu-links li { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.menu.is-open .menu-links li { opacity: 1; transform: none; }
.menu.is-open .menu-links li:nth-child(2) { transition-delay: .06s; }
.menu.is-open .menu-links li:nth-child(3) { transition-delay: .12s; }
.menu-links a { display: inline-block; font-family: var(--serif); font-weight: 700; font-size: clamp(3rem, 9vw, 8.5rem); line-height: 1.1; letter-spacing: .02em; font-kerning: normal; color: #fff; text-decoration: none; transition: color .2s; }
.menu-links a:hover, .menu-links a:focus-visible { color: var(--lav); }
.menu-links a[aria-current="page"] { color: var(--lav); }
.menu-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 24px; }
.menu-socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.menu-socials a { display: block; border-radius: 50%; }
.menu-socials .ico { display: block; width: 46px; height: 46px; background: #fff; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; transition: background .2s; }
.menu-socials a:hover .ico { background: var(--lav); }
html.menu-open { overflow: hidden; }

/* Generated art canvases */
.art-canvas, .char-canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }

/* HOME 1: full-screen art with a two-line headline that overlaps into the band below */
.hero { position: relative; height: calc(100vh - var(--head)); height: calc(100svh - var(--head)); min-height: 520px; background: var(--night); overflow: hidden; }
.hero .art { position: absolute; inset: 0; background: radial-gradient(120% 90% at 70% 40%, #4a2370 0%, var(--deep) 60%, var(--night) 100%); overflow: hidden; }
.hero h1 { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(12px, 2.4vw, 36px); z-index: 1; color: #fff; font-size: clamp(3rem, 13.5vw, 13rem); line-height: .94; letter-spacing: -.005em; font-kerning: normal; }
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 span:last-child { padding-left: 34%; }
.hero-note { position: absolute; right: var(--gutter); top: clamp(32px, 5vw, 64px); z-index: 1; max-width: 26ch; color: #f1e6fa; font-size: .98rem; line-height: 1.5; text-shadow: 0 0 3px var(--night), 0 0 10px var(--night), 0 0 22px var(--night); }
.hero-note::before { content: ""; position: absolute; inset: -48px -40px -36px -64px; z-index: -1; background: radial-gradient(closest-side, rgba(18,7,29,.9), rgba(18,7,29,.6) 55%, transparent); pointer-events: none; }

/* HOME 2: scroll-driven statement chain over a character texture */
.chain { position: relative; height: 320vh; background: var(--night); }
.chain .stick { position: sticky; top: var(--head); height: calc(100vh - var(--head)); height: calc(100svh - var(--head)); display: flex; align-items: center; overflow: hidden; border-top: 1px solid rgba(199,166,228,.35); }
.chain .char-canvas { inset: 0; width: 100%; }
.chain .lines { position: relative; z-index: 1; font-family: var(--serif); font-weight: 700; color: #fff; font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 1.12; letter-spacing: .01em; font-kerning: normal; }
.chain .s { display: block; opacity: .26; transition: opacity .6s var(--ease); }
.chain .s + .s { margin-top: .38em; }
.chain .s.on { opacity: 1; }

/* HOME 3: core beliefs carousel with segmented progress */
.beliefs { position: relative; background: var(--night); color: #fff; min-height: calc(100vh - var(--head)); min-height: calc(100svh - var(--head)); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(64px, 9vw, 120px) 0 clamp(28px, 4vw, 44px); overflow: hidden; }
.beliefs::before { content: ""; position: absolute; right: -20vw; top: -10vw; width: 70vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(102,45,145,.55), transparent 65%); pointer-events: none; }
.beliefs .container { position: relative; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease), visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; transform: none; }
.slide .label { margin-bottom: 20px; }
.slide h2 { color: #fff; font-size: clamp(2.8rem, 8vw, 7rem); max-width: 12ch; }
.slide p { margin-top: 28px; max-width: 44ch; color: #e2d2f2; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.beliefs-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: clamp(48px, 7vw, 96px) 0 6px; }
.beliefs-title { color: #fff; font-size: clamp(1.3rem, 2vw, 1.7rem); }
.bel-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--lav); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.bel-toggle:hover { background: rgba(199,166,228,.18); }
.bel-toggle svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.bel-toggle .i-play { fill: currentColor; stroke: none; display: none; }
.beliefs.paused .bel-toggle .i-play { display: block; }
.beliefs.paused .bel-toggle .i-pause { display: none; }
.segments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.segments button { all: unset; box-sizing: border-box; position: relative; display: block; height: 30px; cursor: pointer; }
.segments button:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }
.segments .track, .segments .fill { position: absolute; left: 0; bottom: 0; height: 8px; }
.segments .track { right: 0; background: rgba(255,255,255,.22); }
.segments .fill { width: 0; background: linear-gradient(90deg, var(--brand), var(--lav)); }

/* HOME 4 / shared: pale section with two columns */
.duo { background: var(--mist); padding: clamp(72px, 10vw, 140px) 0; }
.duo h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); max-width: 16ch; }
.duo .intro { margin-top: 26px; max-width: 46ch; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.65; }
.rule { position: relative; height: 3px; margin: clamp(48px, 6vw, 80px) 0; background: var(--line); }
.rule::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 72px; background: var(--brand); }
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.duo-grid h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 16px; }
.duo-grid p { max-width: 44ch; color: var(--muted); }

/* APPROACH 1: About us */
.about { background: var(--mist); padding: clamp(72px, 10vw, 140px) 0; }
.about h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
.about p { margin-top: 26px; max-width: 72ch; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.7; }
.not-found { min-height: 52vh; }

/* APPROACH 3: statement + horizontal principles with a progress bar */
.how { background: var(--night); color: #fff; padding: clamp(72px, 10vw, 140px) 0 clamp(56px, 7vw, 100px); }
.how h2 { color: #fff; font-size: clamp(2.6rem, 6vw, 5rem); max-width: 15ch; }
.how .sub { margin-top: 26px; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: #e2d2f2; max-width: 46ch; }
.progress { position: relative; height: 4px; margin-top: clamp(48px, 6vw, 72px); background: rgba(255,255,255,.22); }
.progress span { position: absolute; left: 0; top: 0; bottom: 0; width: 25%; background: linear-gradient(90deg, var(--brand), var(--lav)); transition: width .25s var(--ease); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 44%); gap: clamp(28px, 5vw, 80px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: clamp(40px, 5vw, 64px) var(--pad) 8px; scroll-padding-inline: var(--pad); --pad: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.scroller::-webkit-scrollbar { display: none; }
.pcard { scroll-snap-align: start; }
.pcard h3 { color: #fff; font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: 14px 0 16px; }
.pcard p { color: #e2d2f2; max-width: 44ch; }
.how-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(40px, 5vw, 64px); }
.arrows { display: flex; gap: 12px; }
.arrows button { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--lav); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.arrows button:hover { background: rgba(199,166,228,.18); }
.arrows button:disabled { opacity: .35; cursor: default; background: transparent; }
.arrows svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; }

/* CONTACT */
.contact-sec { padding: clamp(64px, 9vw, 120px) 0; }
.offices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: clamp(48px, 7vw, 96px); }
.office { text-align: center; padding: 32px 28px; border-top: 4px solid var(--brand); background: var(--mist); }
.office h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin-bottom: 8px; }
.office address { font-style: normal; color: var(--muted); line-height: 1.6; }
form.contact { display: grid; gap: 26px; max-width: 640px; margin-inline: auto; }
form.contact label { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
form.contact input, form.contact textarea { width: 100%; font: inherit; font-size: 1.1rem; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
form.contact input:focus, form.contact textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(102,45,145,.18); }
form.contact textarea { min-height: 160px; resize: vertical; }
form.contact .btn { justify-self: center; }
form.contact .form-status { text-align: center; }
.form-status { min-height: 1.5em; color: var(--brand); }
.hp { position: absolute; left: -9999px; }

/* Footer: frosted white glass panel floating over the bead art.
   White glass (not dark) so the black wordmark keeps its colours, per the logo guide. */
.site-footer { position: relative; overflow: hidden; background: radial-gradient(120% 120% at 30% 0%, #4a2370 0%, var(--deep) 55%, var(--night) 100%); padding: clamp(56px, 7vw, 104px) 0 clamp(28px, 3vw, 44px); }
.site-footer .container { position: relative; z-index: 1; }
.glass { background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); border: 1px solid rgba(255,255,255,.6); border-radius: 24px; box-shadow: 0 24px 64px rgba(10,3,18,.45), inset 0 1px 0 rgba(255,255,255,.8); padding: clamp(32px, 4vw, 56px); color: var(--ink); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(255,255,255,.94); } }
.glass a { color: var(--ink); text-decoration: none; }
.glass a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.glass-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 40px clamp(24px, 4vw, 56px); align-items: start; }
.foot-logo { display: inline-block; padding: 4px 0 28px; }   /* clear space around the wordmark */
.foot-logo img { height: 40px; width: auto; }
.foot-h { font-size: 1.05rem; letter-spacing: 0; margin-bottom: 14px; }
.foot-k { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.foot-col li + li .foot-k { margin-top: 6px; }
.foot-col ul { display: grid; gap: 10px; }
.socials { display: flex !important; flex-wrap: wrap; gap: 12px; }
.socials a { display: block; border-radius: 50%; }
.socials .ico { display: block; width: 42px; height: 42px; background: var(--ink); -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; transition: background .2s; }
.socials a:hover .ico { background: var(--brand); }
.glass-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; margin-top: clamp(36px, 4vw, 56px); padding-top: 24px; border-top: 1px solid rgba(29,11,48,.14); font-size: .88rem; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* Important Disclosures */
.disc-hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(340px, 52vh, 560px); background: var(--night); overflow: hidden; }
.disc-hero .art { position: absolute; inset: 0; background: radial-gradient(120% 90% at 70% 40%, #4a2370 0%, var(--deep) 60%, var(--night) 100%); }
.disc-hero .container { position: relative; z-index: 1; padding-bottom: clamp(36px, 5vw, 72px); }
.disc-hero h1 { color: #fff; font-size: clamp(3rem, 8vw, 7.5rem); line-height: 1.02; letter-spacing: .005em; font-kerning: normal; text-shadow: 0 0 24px var(--night); }
.disc { padding: clamp(64px, 8vw, 120px) 0 clamp(96px, 12vw, 180px); }
.disc-grid { display: grid; gap: clamp(64px, 7vw, 104px); }
.disc-group { max-width: 760px; }
.disc-group h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.1; }
.disc-links { list-style: square; margin: clamp(24px, 3vw, 40px) 0 0; padding-left: 1.4em; display: grid; gap: 22px; }
.disc-links li { padding-left: .3em; font-size: 1.15rem; }
.disc-links li::marker { color: var(--ink); font-size: .8em; }
.disc-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s; }
.disc-links a:hover { color: var(--brand); }
.legal-links a[aria-current="page"] { color: var(--brand); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .duo-grid, .offices { grid-template-columns: 1fr; }
  .scroller { grid-auto-columns: 84%; }
  .glass-grid { grid-template-columns: 1fr 1fr; }
  .foot-logo { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .glass-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hero h1 span:last-child { padding-left: 18%; }
  .hero-note { display: none; }
  .segments { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .chain { height: auto; }
  .chain .stick { position: relative; top: auto; height: auto; padding: clamp(72px, 10vw, 140px) 0; }
  .chain .s { opacity: 1; }
  .slide { transition: none; transform: none; }
  .progress span, }

/* Vulnerability Disclosure Policy (long-form legal text) */
.policy { padding: clamp(48px, 6vw, 88px) 0 clamp(96px, 12vw, 180px); }
.policy-back { margin-bottom: clamp(32px, 4vw, 56px); font-size: .95rem; }
.policy-back a { color: var(--muted); text-decoration: none; }
.policy-back a::before { content: "\2190\00a0"; }
.policy-back a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.policy-body { max-width: 760px; }
.policy-meta { font-size: .9rem; color: var(--muted); padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.policy-body h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; margin: clamp(48px, 5vw, 72px) 0 18px; }
.policy-body p + p, .policy-body ul + p, .policy-body p + ul { margin-top: 16px; }
.policy-body ul { list-style: square; padding-left: 1.4em; display: grid; gap: 12px; }
.policy-body li { padding-left: .3em; }
.policy-body li::marker { color: var(--brand); font-size: .8em; }
.policy-body a { color: var(--brand); text-underline-offset: 3px; overflow-wrap: anywhere; }
.policy-body blockquote { margin: 32px 0 0; padding: 20px 24px; background: var(--mist); border-left: 4px solid var(--brand); color: var(--muted); }
