/* BritishAI — britishai.uk */

@font-face{font-family:"London Tube";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/londontube.woff2?v=20260922a) format("woff2")}

/* ---- the page is printed dark by default; light is the same stock turned over ---- */
:root{
  color-scheme:dark;
  --paper:#15130f;
  --ink:#f4efe3;
  --muted:#a69d89;
  --muted-2:#b8af9b;
  --rule:rgba(244,239,227,.17);
  --rule-mid:rgba(244,239,227,.3);
  --rule-hi:rgba(244,239,227,.34);
  --rule-max:rgba(244,239,227,.56);
  --field:rgba(244,239,227,.045);
  --field-2:rgba(244,239,227,.05);
  --field-on:rgba(244,239,227,.09);
  --placeholder:#8a8272;
  --sel:rgba(244,239,227,.16);
  --band-op:.17;
  --body:"London Tube","Gill Sans Nova","Gill Sans MT",Futura,ui-sans-serif,system-ui,sans-serif;
  --cap:150px;
  --base-h:100px;
  --display:"London Tube","Gill Sans Nova","Gill Sans MT",Futura,ui-sans-serif,system-ui,sans-serif;
}

html[data-theme="light"]{
  color-scheme:light;
  --paper:#fefbf4;
  --ink:#1a1815;
  --muted:#6b6455;
  --muted-2:#5b5545;
  --rule:rgba(26,24,21,.15);
  --rule-mid:rgba(26,24,21,.28);
  --rule-hi:rgba(26,24,21,.3);
  --rule-max:rgba(26,24,21,.55);
  --field:rgba(255,255,255,.4);
  --field-2:rgba(255,255,255,.5);
  --field-on:#fff;
  --placeholder:#7a7463;
  --sel:rgba(26,24,21,.1);
  --band-op:.165;
}

*,*::before,*::after{box-sizing:border-box}
html{background:var(--paper);-webkit-text-size-adjust:100%}
body{
  margin:0;padding:0;
  background:var(--paper);color:var(--ink);
  font-family:var(--body);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  font-kerning:normal;font-variant-ligatures:common-ligatures;text-rendering:optimizeLegibility;
  font-synthesis:none;
}
strong,b{font-weight:400;color:var(--ink)}
img{display:block;max-width:100%}
::selection{background:var(--sel)}

a{color:inherit;text-decoration:none}
.rule-link{position:relative;border-bottom:1px solid var(--rule-mid);transition:color .22s ease,border-color .22s ease}
.rule-link:hover{color:var(--ink);border-bottom-color:var(--ink)}
/* the rule under a link draws itself in from the left on hover, then retracts */
.rule-link::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:currentColor;transform:scaleX(0);transform-origin:left center;transition:transform .38s cubic-bezier(.16,1,.3,1)}
.rule-link:hover::after,.rule-link:focus-visible::after{transform:scaleX(1)}

:focus-visible{outline:1px solid var(--ink);outline-offset:3px;border-radius:1px}

.vh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px;top:0;z-index:5}
.skip:focus{left:24px;top:16px;background:var(--ink);color:var(--paper);padding:8px 14px;font-family:var(--display);font-size:13px}

/* ---- shell ---- */
.shell{display:flex;min-height:100vh;flex-direction:column;background:var(--paper)}

.sheet{
  margin:0 auto;display:flex;width:100%;max-width:940px;flex:1 1 auto;flex-direction:column;
  padding:56px 24px 0;
}
.lockup{display:inline-block;align-self:flex-start;margin-bottom:-4px;transform:translateX(-2px)}
.lockup svg{width:84px;height:auto;color:var(--ink);display:block}

/* ---- masthead row: lockup left, light switch right ---- */
.top{display:flex;width:100%;align-items:flex-start;justify-content:space-between;gap:20px}
.themer{
  position:relative;flex:0 0 auto;margin:1px 0 0;padding:0;
  display:grid;place-items:center;width:32px;height:32px;
  appearance:none;border:1px solid var(--rule);border-radius:50%;background:none;
  color:var(--muted);cursor:pointer;
}
.top .themer{transition:color .22s ease,border-color .22s ease,transform .32s cubic-bezier(.22,1.5,.36,1)}
.themer:active{transform:scale(.9);transition-duration:.09s}
.themer::after{content:"";position:absolute;inset:-6px;border-radius:50%}
.themer:hover{color:var(--ink);border-color:var(--rule-hi)}
.themer:focus-visible{outline:1px solid var(--ink);outline-offset:3px;border-radius:50%}
.themer svg{display:block;width:17px;height:17px;overflow:visible}
.themer .glyph{fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.themer .i-sun,.themer .i-moon,.themer .rays{transform-origin:12px 12px}
.themer .i-sun,.themer .rays{opacity:1;transform:none}
.themer .i-moon{opacity:0;transform:rotate(95deg) scale(.32)}
html[data-theme="light"] .themer .i-sun{opacity:0;transform:rotate(-95deg) scale(.32)}
html[data-theme="light"] .themer .rays{opacity:0;transform:scale(.4)}
html[data-theme="light"] .themer .i-moon{opacity:1;transform:none}
/* the ring warms for the length of the switch, then settles back */
html.theming .themer{color:var(--ink);border-color:var(--rule-max)}
@media (min-width:640px){.themer{width:34px;height:34px;margin-top:3px}.themer svg{width:18px;height:18px}}

.statement{display:flex;flex:1 1 auto;align-items:center;padding:48px 0}
h1{
  margin:0;font-family:var(--display);font-weight:400;text-wrap:balance;
  font-size:clamp(25px,1.075rem + 2vw,46px);line-height:1.2;letter-spacing:-.017em;color:var(--ink);
}
/* the statement is set to break over two lines; balance evens them out */
.statement h1{max-width:16em}
h1 .sub{display:block;margin-top:.62em;font-family:var(--body);font-weight:400;font-size:clamp(14.6px,.79rem + .52vw,19px);line-height:1.6;letter-spacing:.006em;text-wrap:pretty;color:var(--muted);max-width:24em}

.cred{
  margin:0;font-family:var(--display);font-size:12px;font-weight:400;
  text-transform:uppercase;letter-spacing:.13em;color:var(--muted-2);
}

.foot{
  margin-top:24px;display:flex;align-items:baseline;justify-content:space-between;gap:20px;
  border-top:1px solid var(--rule);padding-top:16px;font-size:13.6px;letter-spacing:.014em;
}
.foot .right{display:flex;align-items:baseline;gap:20px}

.band{position:relative;margin-top:22px;width:100%;height:min(calc(100vw / 3.13), 58vh);overflow:hidden}
/* the dot field is vector: one svg, inked through a mask so it follows --ink in both themes */
.band::before{
  content:"";position:absolute;inset:0;pointer-events:none;background:var(--ink);
  opacity:var(--band-op);transition:opacity .34s ease;
  -webkit-mask:url(/assets/westminster.svg?v=20260922a) no-repeat bottom center/100% auto;
          mask:url(/assets/westminster.svg?v=20260922a) no-repeat bottom center/100% auto;
}
/* once the canvas takes over, the static layer steps aside */
.band.live::before{opacity:0;transition:opacity .2s ease}
.band canvas.dots{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none}
@supports not ((-webkit-mask-image:url(#m)) or (mask-image:url(#m))){
  .band::before{background:url(/assets/westminster.svg?v=20260922a) no-repeat bottom center/100% auto;filter:invert(1) sepia(.3) saturate(.5) hue-rotate(348deg)}
  html[data-theme="light"] .band::before{filter:none}
}

/* on wide screens the statement sits over the engraving, so the skyline surfaces
   out of the paper: nothing at the top, full ink down at the frontage */
/* the phone band is small, so the ink carries a little more weight there */
@media (max-width:639px){:root{--band-op:.2} html[data-theme="light"]{--band-op:.2}}

@media (min-width:640px){
  .band{
    -webkit-mask-image:linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 33%, rgba(0,0,0,.20) 49%, rgba(0,0,0,.66) 66%, #000 80%);
            mask-image:linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 33%, rgba(0,0,0,.20) 49%, rgba(0,0,0,.66) 66%, #000 80%);
  }
}

@media (min-width:640px){
  .sheet{padding:78px 32px 0}
  .lockup svg{width:100px}
  .statement{padding:56px 0}
  .foot{margin-top:28px;font-size:14.4px}
  .band{margin-top:26px}
}
@media (min-width:1024px){
  h1{line-height:1.16;letter-spacing:-.025em}
  h1 .sub{line-height:1.55}
}

/* ---- one-screen pages: statement dead-centre, footer on the floor ---- */
.shell.screen{position:relative;overflow:hidden}
.shell.screen .band{position:absolute;left:0;right:0;bottom:0;margin:0;z-index:0;pointer-events:none}
.shell.screen .sheet{
  position:relative;z-index:1;flex:0 0 auto;display:grid;
  grid-template-rows:var(--cap) minmax(0,1fr) var(--cap);
  min-height:100vh;min-height:100svh;padding:0 24px;
}
.shell.screen .top{align-self:start;margin:56px 0 0}
.shell.screen .statement{align-self:stretch;display:flex;align-items:center;padding:0;flex:0 1 auto}
.shell.screen .base{align-self:end;width:100%;padding-bottom:calc(28px + env(safe-area-inset-bottom,0px))}
.shell.screen .cred{margin:0}
.shell.screen .base > .foot:first-child{margin-top:0}
/* the engraving now runs under the footer, so its rule and links take a little more ink to stay crisp */
.shell.screen .foot{border-top-color:var(--rule-mid)}
.shell.screen .foot .rule-link{border-bottom-color:var(--rule-hi)}
@media (min-width:640px){
  .shell.screen{--cap:200px;--base-h:109px}
  .shell.screen .sheet{padding:0 32px}
  .shell.screen .top{margin-top:78px}
  .shell.screen .base{padding-bottom:calc(32px + env(safe-area-inset-bottom,0px))}
}
/* home has no credential line, so its base is shorter and the band sits lower */
.shell.screen.tight{--base-h:64px}
@media (min-width:640px){.shell.screen.tight{--base-h:69px}}

@media (max-height:620px){
  .shell.screen{--cap:120px}
  .shell.screen .top{margin-top:34px}
}

/* deep zoom / landscape phones: below this the screen cannot hold a centred page,
   so the one-screen lock releases and the page scrolls rather than clipping */
@media (max-height:430px){
  .shell.screen{overflow:visible}
  .shell.screen .sheet{display:flex;min-height:0}
  .shell.screen .top{margin-top:24px}
  .shell.screen .statement{align-self:auto;padding:26px 0;flex:1 1 auto}
  .shell.screen .base{align-self:auto;padding-bottom:22px}
  .shell.screen .band{position:relative;left:auto;right:auto;bottom:auto;margin:0}
}

/* ---- talk ---- */
.head{margin:0 auto;width:100%;max-width:1040px;padding:48px 24px 0}
.head .lockup{margin-bottom:0;transform:none}
.head .lockup svg{width:76px}
.talk{margin:0 auto;width:100%;max-width:1040px;flex:1 1 auto;padding:48px 24px 64px}
.cols{display:grid;gap:48px}
.talk h1{font-size:clamp(24px,1.221rem + 1.143vw,36px);line-height:1.17}
.talk .lede{margin:16px 0 0;max-width:34em;font-size:15.6px;line-height:1.64;letter-spacing:.008em;text-wrap:pretty;color:var(--muted-2)}
.talk .back{margin-top:24px;font-size:13.6px;letter-spacing:.014em}

fieldset{border:0;padding:0;margin:0;min-width:0}
legend,.lab{display:block;font-family:var(--display);font-size:11px;font-weight:400;text-transform:uppercase;letter-spacing:.15em;color:var(--muted-2)}
.picks{margin-top:12px;display:grid;gap:10px}
.pick{
  appearance:none;border:1px solid var(--rule);border-radius:3px;background:var(--field);
  padding:12px 16px;text-align:left;font-family:var(--display);font-size:16px;color:var(--ink);
  cursor:pointer;transition:border-color .2s,background-color .2s;
}
.pick:hover{border-color:var(--rule-hi)}
.pick[aria-pressed="true"]{border-color:var(--rule-max);background:var(--field-on)}

.row{margin-top:16px;display:grid;gap:16px}
.row.two{grid-template-columns:1fr}
.grp:first-child{margin-top:0}
input,select,textarea{
  margin-top:8px;width:100%;border:1px solid var(--rule);border-radius:3px;background:var(--field-2);
  padding:11px 14px;font-family:var(--body);font-size:16px;letter-spacing:.01em;color:var(--ink);
  outline:none;transition:border-color .2s,background-color .2s;
}
input::placeholder,textarea::placeholder{color:var(--placeholder)}
input:hover,select:hover,textarea:hover{border-color:var(--rule-mid)}
input:focus,select:focus,textarea:focus{border-color:var(--rule-max);background:var(--field-on)}
select{appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238f8a7c' stroke-width='1.2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:12px 8px;padding-right:38px}
html[data-theme="dark"] select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23918876' stroke-width='1.2'/%3E%3C/svg%3E")}
textarea{resize:vertical;line-height:1.5}
.bad input,.bad select,.bad textarea{border-color:var(--rule-max)}

.send{margin-top:24px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.btn{
  appearance:none;border:0;border-radius:3px;background:var(--ink);color:var(--paper);
  padding:16px 24px;font-family:var(--display);font-size:18px;letter-spacing:.015em;cursor:pointer;transition:opacity .2s,transform .12s;width:100%;
}
.btn:hover{opacity:.9}
.btn:disabled{opacity:.6;cursor:default}
.note{margin:0;opacity:1;transition:opacity .18s ease;font-family:var(--display);font-size:11px;text-transform:uppercase;letter-spacing:.15em;color:var(--muted-2)}
.sent{border-top:1px solid var(--rule);padding-top:20px;animation:rise .5s cubic-bezier(.16,1,.3,1) both}
/* slot-text: old line rolls up and out, new line rolls up and in */
.slot{position:relative;display:inline-block;overflow:hidden;vertical-align:bottom;transition:width .34s cubic-bezier(.16,1,.3,1)}
.slot span{display:block}
.slot .out{position:absolute;inset:0;white-space:nowrap}
@keyframes slot-out{from{transform:translateY(0);opacity:1}to{transform:translateY(-105%);opacity:0}}
@keyframes slot-in{from{transform:translateY(105%);opacity:0}to{transform:translateY(0);opacity:1}}
@media (prefers-reduced-motion:no-preference){
  .slot.rolling .out{animation:slot-out .34s cubic-bezier(.16,1,.3,1) both}
  .slot.rolling .in{animation:slot-in .34s cubic-bezier(.16,1,.3,1) both}
}
.note{min-height:1em}
.sent h2{margin:0;font-family:var(--display);font-weight:400;font-size:23px;line-height:1.24}
.sent p{margin:12px 0 0;font-size:15.6px;line-height:1.62;letter-spacing:.008em;text-wrap:pretty;color:var(--muted-2)}

@media (min-width:640px){
  .head{padding:64px 32px 0}
  .head .lockup svg{width:88px}
  .talk{padding:64px 32px 64px}
  .picks{grid-template-columns:1fr 1fr}
  .row.two{grid-template-columns:1fr 1fr}
  .btn{width:auto;padding:16px 38px}
}
@media (min-width:1024px){
  .cols{grid-template-columns:minmax(0,.82fr) minmax(0,1fr);gap:80px}
}

/* ---- mission ---- */
.essay{margin:0 auto;width:100%;max-width:1040px;flex:1 1 auto;padding:44px 24px 0}
.essay .cred{margin:0 0 20px}
.essay h1{font-size:clamp(27px,1.2rem + 2.1vw,44px);line-height:1.16;max-width:15em}
.essay .lede{margin:22px 0 0;max-width:30em;font-size:clamp(16.4px,.86rem + .6vw,20px);line-height:1.58;letter-spacing:.004em;text-wrap:pretty;color:var(--muted-2)}
/* each part is ruled off, its label set small in the margin */
.part{margin-top:38px;border-top:1px solid var(--rule);padding-top:22px;display:grid;gap:12px}
.part h2{margin:0;font-family:var(--display);font-weight:400;font-size:11px;line-height:1.5;text-transform:uppercase;letter-spacing:.15em;color:var(--muted-2)}
.prose{max-width:34em}
/* the last section opens out of the margin-label rhythm: label above, wider measure */
.part.open .prose{max-width:38em}
.part.open .prose p{font-size:clamp(16.2px,.85rem + .52vw,19.5px);line-height:1.62}
.prose p{margin:0;font-size:clamp(15.8px,.83rem + .45vw,18px);line-height:1.66;letter-spacing:.006em;text-wrap:pretty;color:var(--ink)}
.prose p + p{margin-top:.95em}
/* one line is lifted out of the column and set large across the page */
.pull{margin:56px 0 0;padding-bottom:18px}
.pull::before{content:"";display:block;width:76px;height:1px;background:var(--rule-max);margin-bottom:26px}
.pull + .part{margin-top:56px}
.pull p{margin:0;max-width:19em;font-family:var(--display);font-size:clamp(21px,1rem + 1.45vw,32px);line-height:1.24;letter-spacing:-.014em;text-wrap:balance;color:var(--ink)}
.close{margin-top:40px}
.coda{margin:0;max-width:24em;font-family:var(--display);font-size:clamp(18px,.92rem + .86vw,24px);line-height:1.34;letter-spacing:-.008em;text-wrap:pretty;color:var(--ink)}
.go{margin:22px 0 0;font-family:var(--display);font-size:18.5px;letter-spacing:.006em}
.gonote{margin:12px 0 0;max-width:28em;font-size:14px;line-height:1.55;letter-spacing:.01em;color:var(--muted)}
.essay .foot{margin-top:42px}
@media (min-width:640px){.essay{padding:56px 32px 0}.essay .foot{margin-top:48px}.part{margin-top:44px}.pull{margin-top:84px;padding-bottom:30px}.pull::before{margin-bottom:34px}.pull + .part{margin-top:84px}.close{margin-top:46px}.go{font-size:22px;margin-top:26px}.gonote{font-size:14.8px;margin-top:14px}}
@media (min-width:900px){
  .part{grid-template-columns:154px minmax(0,1fr);gap:40px}
  .part h2{padding-top:.45em}
  .part.open{grid-template-columns:none;gap:18px}
  .part.open h2{padding-top:0}
}

/* sections settle in as they arrive; class is added by JS, so no-JS shows everything */
@media (prefers-reduced-motion:no-preference){
  html.rev .part,html.rev .pull,html.rev .close{opacity:0;transform:translateY(10px);transition:opacity .72s cubic-bezier(.16,1,.3,1),transform .72s cubic-bezier(.16,1,.3,1)}
  html.rev .part.in,html.rev .pull.in,html.rev .close.in{opacity:1;transform:none}
}

/* ---- entrance (pure CSS, no JS gating) ---- */
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ease-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:no-preference){
  .lockup{animation:ease-in .8s cubic-bezier(.16,1,.3,1) both}
  .themer{animation:ease-in .9s cubic-bezier(.16,1,.3,1) .18s both}
  /* leaving: short and flat */
  .themer .i-sun,.themer .i-moon{transition:opacity .19s ease,transform .24s cubic-bezier(.4,0,.75,.25)}
  .themer .rays{transition:opacity .15s ease,transform .22s cubic-bezier(.4,0,.75,.25)}
  /* arriving: springs past and settles, rays open a beat later */
  html[data-theme="dark"] .themer .i-sun{transition:opacity .26s ease .05s,transform .62s cubic-bezier(.22,1.52,.36,1)}
  html[data-theme="dark"] .themer .rays{transition:opacity .24s ease .15s,transform .52s cubic-bezier(.22,1.72,.36,1) .11s}
  html:not([data-theme="dark"]) .themer .i-moon{transition:opacity .26s ease .05s,transform .62s cubic-bezier(.22,1.52,.36,1)}
  .statement h1{animation:rise .9s cubic-bezier(.16,1,.3,1) .06s both}
  .talk .cols > *{animation:rise .8s cubic-bezier(.16,1,.3,1) .06s both}
  .essay h1{animation:rise .9s cubic-bezier(.16,1,.3,1) .06s both}
  .essay .lede{animation:rise .9s cubic-bezier(.16,1,.3,1) .14s both}
  .talk .cols > *:last-child{animation-delay:.14s}
  .cred{animation:ease-in .9s cubic-bezier(.16,1,.3,1) .22s both}
  .foot{animation:ease-in .9s cubic-bezier(.16,1,.3,1) .3s both}
  .band{animation:band-in 1.05s cubic-bezier(.16,1,.3,1) .36s both;will-change:transform,opacity}
  @keyframes band-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
}
.rule-link{padding-bottom:1px}
.lockup svg{transition:opacity .25s}
.lockup:hover svg{opacity:.75}
.btn:active{transform:translateY(1px)}

/* ---- 404 ---- */
.oops{margin:0;font-size:21px;line-height:1.42;letter-spacing:.006em}
.oops .sub{display:block;margin-top:12px;color:var(--muted)}

/* only while a switch is in flight, so nothing transitions on first paint */
html.theming *{transition:background-color .34s ease,color .34s ease,border-color .34s ease,fill .34s ease,opacity .34s ease}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
