/* Pragmaticians — site styles */
:root {
  --ultra: #2B36E8;
  --ultra-deep: #1D26B0;
  --signal: #FFC83D;
  --night: #151826;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --text: #151826;
  --muted: #555B6E;
  --rule: #D9DCE3;
  --accent: #2B36E8;
  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body: "Public Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--ultra);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11131C; --surface: #1A1D2A; --text: #ECEEF4; --muted: #A3A8B8; --rule: #2C3042; --accent: #9AA2FF;
  }
}
:root[data-theme="dark"] {
  --bg: #11131C; --surface: #1A1D2A; --text: #ECEEF4; --muted: #A3A8B8; --rule: #2C3042; --accent: #9AA2FF;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 1.125rem; line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--signal); color: var(--night); padding: .5rem 1rem; z-index: 10; }

h1, h2, h3 { font-family: var(--display); font-weight: 750; margin: 0; }
h1 { font-size: clamp(2.9rem, 7.2vw, 6.2rem); line-height: .94; letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.02; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 65ch; }
.lede { font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.5; }

/* Header */
.site-header { background: var(--ultra); color: #fff; }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 96px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; }
.wordmark::before { content: ""; width: .8rem; height: .8rem; background: var(--signal); border-radius: 50%; }
#nav { display: flex; align-items: center; gap: 2rem; }
#nav a { text-decoration: none; font-weight: 500; font-size: 1rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
#nav a:hover, #nav a[aria-current="page"] { border-bottom-color: var(--signal); }
#nav a.nav-cta { background: var(--signal); color: var(--night); padding: .6rem 1.1rem; border-radius: 999px; border: 0; font-weight: 650; }
#nav a.nav-cta:hover { background: #fff; }
.nav-toggle { display: none; background: none; border: 2px solid rgba(255,255,255,.6); color: #fff; font: 600 1rem var(--body); padding: .4rem .9rem; border-radius: 999px; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  #nav { display: none; position: absolute; left: 0; right: 0; top: calc(96px + env(safe-area-inset-top, 0px)); background: var(--ultra-deep); flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem; z-index: 5; }
  #nav.open { display: flex; }
  #nav a { padding: .8rem 0; font-size: 1.15rem; width: 100%; }
  #nav a.nav-cta { margin-top: .75rem; width: auto; }
  .site-header { position: relative; }
}

/* Hero (home) */
.hero { background: var(--ultra); color: #fff; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero .lede { color: rgba(255,255,255,.88); margin-top: 1.75rem; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .pipeline { max-width: 520px; } }

.btn { display: inline-block; font: 650 1.05rem var(--body); text-decoration: none; padding: .9rem 1.5rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer; }
.btn-signal { background: var(--signal); color: var(--night); }
.btn-signal:hover { background: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-ink { background: var(--ultra); color: #fff; }
.btn-ink:hover { background: var(--ultra-deep); }

/* Pipeline graphic */
.pipeline { width: 100%; height: auto; display: block; }
.pipeline .src { font: 500 19px var(--body); fill: rgba(255,255,255,.9); }
.pipeline .flow { fill: none; stroke: rgba(255,255,255,.5); stroke-width: 2.5; stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 1.1s cubic-bezier(.3,.7,.3,1) forwards; }
.pipeline .dot { fill: #fff; }
.pipeline .out { fill: none; stroke: var(--signal); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .6s ease-out 1.25s forwards; }
.pipeline .end { fill: var(--signal); opacity: 0; animation: pop .3s ease-out 1.8s forwards; }
.pipeline .out-label { font: 700 25px var(--display); fill: var(--signal); opacity: 0; animation: pop .4s ease-out 1.9s forwards; }
.pipeline .flow:nth-of-type(2) { animation-delay: .08s; } .pipeline .flow:nth-of-type(3) { animation-delay: .16s; }
.pipeline .flow:nth-of-type(4) { animation-delay: .24s; } .pipeline .flow:nth-of-type(5) { animation-delay: .32s; }
.pipeline .flow:nth-of-type(6) { animation-delay: .4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pipeline .flow, .pipeline .out { animation: none; stroke-dashoffset: 0; }
  .pipeline .end, .pipeline .out-label { animation: none; opacity: 1; }
}

/* Inner page intro */
.intro { background: var(--ultra); color: #fff; padding: clamp(2.75rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.intro h1 { font-size: clamp(2.6rem, 6vw, 5rem); max-width: 16ch; }
.intro .lede { color: rgba(255,255,255,.88); margin-top: 1.5rem; max-width: 46ch; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section + .section { padding-top: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { color: var(--muted); margin: 0; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } }

/* Service rows */
.rows { border-top: 2px solid var(--text); }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--rule); }
.row h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.row p { color: var(--muted); margin: 0; }
.row p + p { margin-top: .9em; }
.row .tools { font-size: 1rem; color: var(--text); margin-top: 1rem; }
a.more { display: inline-block; margin-top: 1rem; font-weight: 650; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: .75rem; } }

/* Steps (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; border-top: 6px solid var(--ultra); padding-top: 1.25rem; }
.steps li::before { content: "Step " counter(step); display: block; font-weight: 650; color: var(--accent); font-size: 1rem; margin-bottom: .4rem; }
.steps h3 { margin-bottom: .6rem; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Packages */
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.package { background: var(--surface); padding: 2rem; border-radius: 6px; border: 1px solid var(--rule); display: flex; flex-direction: column; }
.package.feature { background: var(--night); color: #fff; border-color: var(--night); }
.package.feature p, .package.feature li { color: rgba(255,255,255,.8); }
.package h3 { margin-bottom: .75rem; }
.package p { color: var(--muted); }
.package ul { margin: 0 0 1.5rem; padding-left: 1.1rem; color: var(--muted); font-size: 1rem; }
.package li { margin-bottom: .35rem; }
.package .who { font-size: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--text); }
.package.feature .who { border-color: rgba(255,255,255,.2); color: #fff; }
@media (max-width: 960px) { .packages { grid-template-columns: 1fr; } }

/* Tools strip */
.toolbelt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.toolbelt-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem; align-items: start; }
.toolbelt h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.toollist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.toollist li { border: 1.5px solid var(--rule); border-radius: 999px; padding: .4rem .95rem; font-size: 1rem; font-weight: 500; }
@media (max-width: 760px) { .toolbelt-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { background: var(--signal); color: var(--night); padding: clamp(3rem, 7vw, 5rem) 0; }
.cta-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2rem; }
.cta-band h2 { max-width: 18ch; }
.cta-band .btn { background: var(--night); color: #fff; }
.cta-band .btn:hover { background: var(--ultra); }

/* About */
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.15em; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.person { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 2rem; }
.person .role { color: var(--accent); font-weight: 650; margin: .25rem 0 1rem; }
.person p { color: var(--muted); }
.person.placeholder { border-style: dashed; background: transparent; }
@media (max-width: 800px) { .people { grid-template-columns: 1fr; } }
.partner-note { background: var(--surface); border-left: 6px solid var(--ultra); padding: 1.5rem 1.75rem; border-radius: 0 6px 6px 0; }
.partner-note p { margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: 1rem; }
.field .hint { font-weight: 400; color: var(--muted); }
input, textarea, select { font: inherit; font-size: 1.05rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--rule); border-radius: 6px; padding: .8rem .95rem; width: 100%; }
input:focus, textarea:focus { outline: 3px solid var(--ultra); outline-offset: 0; border-color: var(--ultra); }
textarea { min-height: 170px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 1rem 1.25rem; border-radius: 6px; font-weight: 500; }
.notice.ok { background: #E4F6EA; color: #0F5A2A; }
.notice.err { background: #FDE8E8; color: #8A1C1C; }
.details dl { margin: 0; display: grid; gap: 1.25rem; }
.details dt { font-weight: 650; }
.details dd { margin: .2rem 0 0; color: var(--muted); }
.details a { text-decoration-color: var(--ultra); text-underline-offset: 3px; }

/* Footer */
.site-footer { background: var(--night); color: rgba(255,255,255,.8); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; font-size: 1rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr)); gap: 2rem; }
.site-footer .wordmark { color: #fff; margin-bottom: 1rem; }
.site-footer h2 { font: 650 1rem var(--body); color: #fff; margin-bottom: .75rem; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--signal); }
.foot-base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: rgba(255,255,255,.6); font-size: .95rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* Sport */
.intro-night { background: var(--night); }
.sport-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(2rem,5vw,4rem); align-items: center; }
@media (max-width: 900px) { .sport-intro { grid-template-columns: 1fr; } }
.sport-band { background: var(--night); color: #fff; padding: clamp(3.5rem,7vw,5.5rem) 0; }
.sport-band-grid { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap: clamp(2rem,5vw,4rem); align-items: center; }
.sport-band p { color: rgba(255,255,255,.82); margin: 1.25rem 0 2rem; max-width: 40ch; }
@media (max-width: 860px) { .sport-band-grid { grid-template-columns: 1fr; } }
.trace { width: 100%; height: auto; display: block; }
.trace .field { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 2; }
.trace .field.thin { stroke-dasharray: 6 8; stroke-width: 1.5; }
.trace .run { fill: none; stroke: var(--signal); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2s cubic-bezier(.4,.6,.3,1) .2s forwards; }
.trace .run-end { fill: var(--signal); opacity: 0; animation: pop .3s ease-out 2.1s forwards; }
@media (prefers-reduced-motion: reduce) { .trace .run { animation: none; stroke-dashoffset: 0; } .trace .run-end { animation: none; opacity: 1; } }
.steps.plain { counter-reset: none; }
.steps.plain li::before { content: none; }
.steps.plain li { border-top-color: var(--signal); }

/* Logo */
.logo { display: inline-block; line-height: 0; }
.logo img { height: 68px; width: auto; }
.site-footer .logo { margin-bottom: 1.25rem; }
.site-footer .logo img { height: 72px; }
@media (max-width: 760px) { .logo img { height: 54px; } }

/* Partner grid */
.partners { margin-top: clamp(3.5rem, 7vw, 5rem); }
.partners h2 { margin-bottom: 1.75rem; }
.partner-tile { flex: 0 0 200px; height: 104px; margin-right: 1rem; background: #fff; color: #151826; border: 1px solid var(--rule); border-radius: 6px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.25rem; font-weight: 600; font-size: 1.05rem; }
.partner-tile img { max-width: 100%; max-height: 34px; width: auto; height: auto; }
.partner-tile img.tall { max-height: 58px; }

/* Partner carousel */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 560px) { .partner-tile { flex-basis: 160px; height: 88px; } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; row-gap: 1rem; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

/* Collection notice */
.collection-notice { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.25rem 1.4rem; font-size: .95rem; color: var(--muted); }
.collection-notice h2 { font: 650 1rem var(--body); color: var(--text); margin-bottom: .6rem; letter-spacing: 0; }
.collection-notice p { margin-bottom: .75em; }
.collection-notice p:last-child { margin-bottom: 0; }
.collection-notice a { color: var(--text); }

/* Hero credibility */
.hero-cred { margin-top: 1.25rem; padding-left: 1rem; border-left: 4px solid var(--signal); color: #fff; font-weight: 500; max-width: 42ch; font-size: 1rem; }

/* Stance */
.stance { padding-bottom: clamp(3.5rem, 8vw, 6.5rem) !important; }
.stance-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.stance h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
.stance-list { margin: 0; display: grid; gap: 1.5rem; }
.stance-list div { border-top: 2px solid var(--text); padding-top: 1rem; }
.stance-list dt { font-family: var(--display); font-weight: 700; font-size: 1.35rem; margin-bottom: .35rem; }
.stance-list dd { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .stance-grid { grid-template-columns: 1fr; } }

/* Audiences */
.audiences { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.audiences li { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.75rem; display: flex; flex-direction: column; }
.audiences h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.audiences p { color: var(--muted); margin: 0; font-size: 1rem; }
.audiences a.more { margin-top: auto; padding-top: 1rem; font-size: 1rem; }
@media (max-width: 1000px) { .audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .audiences { grid-template-columns: 1fr; } }

/* Agencies */
.agency-band { background: var(--surface); border-top: 1px solid var(--rule); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.agency-grid, .agency-detail { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.agency-band p { color: var(--muted); margin: 1.25rem 0 2rem; }
.lede-sm { color: var(--muted); margin-top: 1.25rem; font-size: 1.2rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ticks li { position: relative; padding-left: 2rem; font-weight: 500; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: .95rem; height: .55rem; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }
@media (max-width: 860px) { .agency-grid, .agency-detail { grid-template-columns: 1fr; } }

/* Ways to work */
.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.ways .package p { margin: 0; }
@media (max-width: 1000px) { .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ways { grid-template-columns: 1fr; } }

/* Case study */
.case-section { padding-top: 0 !important; }
.case { background: var(--night); color: #fff; border-radius: 8px; padding: clamp(1.75rem, 4vw, 3rem); }
.case-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.case-client { color: var(--signal); font-weight: 650; margin-bottom: .6rem; }
.case h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.08; margin-bottom: 1.1rem; }
.case p { color: rgba(255,255,255,.82); }
.case-stats { margin: 0; display: grid; gap: 1.1rem; }
.case-stats div { border-top: 2px solid rgba(255,255,255,.25); padding-top: .75rem; }
.case-stats dt { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--signal); }
.case-stats dd { margin: .3rem 0 0; color: rgba(255,255,255,.8); font-size: 1rem; }
.case-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 3.5rem); margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.15); }
.case h4 { font: 650 1rem var(--body); margin: 0 0 1rem; color: #fff; }
.case .ticks li { font-weight: 400; color: rgba(255,255,255,.9); }
.case .ticks li::before { border-color: var(--signal); }
.toollist.small li { font-size: .9rem; padding: .3rem .75rem; border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.9); }
@media (max-width: 860px) { .case-top, .case-body { grid-template-columns: 1fr; } }
