/* 99toAI, 2026. One stylesheet for the whole site.
   Colours come from the Brand Systems table in Solomon OS. Do not invent new ones. */

:root{
  --ink:#050709;
  --card:#16121F;
  --card-2:#120F1A;
  --line:rgba(255,255,255,0.14);
  --line-soft:rgba(255,255,255,0.10);
  --text:#FFFFFF;
  --muted:#A6ADC2;
  --dim:#7B8296;
  --soft:#C9CEDC;
  --purple:#7B2FFF;
  --purple-text:#A878FF;
  --teal:#00C6A7;
  --teal-bright:#5FE8D2;
  --green:#7FE3C0;
  --amber:#FFC078;
  --serif:"Instrument Serif",Georgia,"Times New Roman",serif;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --wrap:1180px;
}

*,*::before,*::after{box-sizing:border-box}

html{scroll-behavior:smooth}

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

a{color:var(--teal);text-decoration:none}
a:hover{color:var(--teal-bright)}
a:focus-visible,button:focus-visible{outline:2px solid var(--teal);outline-offset:3px;border-radius:4px}

img{max-width:100%;height:auto;display:block}

.wrap{max-width:var(--wrap);margin:0 auto;padding:0 32px}
.centre{text-align:center}
.centre .lede,.centre h1,.centre h2{margin-left:auto;margin-right:auto}

/* ---------- header ---------- */

.site-head{border-bottom:1px solid var(--line);padding:18px 0;position:sticky;top:0;background:rgba(5,7,9,0.92);backdrop-filter:blur(8px);z-index:20}
.site-head .wrap{display:flex;flex-wrap:wrap;align-items:center;gap:24px}
.logo{font-family:var(--serif);font-size:27px;color:var(--text);letter-spacing:-0.3px;line-height:1}
.logo span{color:var(--purple-text)}
.nav{display:flex;flex-wrap:wrap;gap:26px;flex:999 1 320px;min-width:0;font-size:15px}
.nav a{color:var(--soft)}
.nav a:hover{color:var(--text)}
.nav a[aria-current="page"]{color:var(--text);border-bottom:2px solid var(--purple);padding-bottom:2px}

/* ---------- buttons ---------- */

.btn,.btn-ghost{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:16px 30px;border-radius:8px;
  font-size:16px;font-weight:600;line-height:1;border:1px solid transparent;
  cursor:pointer;font-family:var(--sans);
}
.btn{background:var(--purple);color:#fff}
.btn:hover{background:#6A22E8;color:#fff}
.btn-ghost{border-color:rgba(255,255,255,0.2);color:var(--text);background:none}
.btn-ghost:hover{border-color:rgba(255,255,255,0.4);color:var(--text)}
.btn-sm{padding:13px 22px;font-size:14px}
.btn-row{display:flex;flex-wrap:wrap;gap:14px;margin-top:40px}
.centre .btn-row{justify-content:center}

/* ---------- type ---------- */

h1,h2,h3{font-weight:400;margin:0}
h1{font-family:var(--serif);font-size:clamp(42px,7vw,76px);line-height:1.03;letter-spacing:-1.4px}
h2{font-family:var(--serif);font-size:clamp(32px,4.4vw,50px);line-height:1.08;letter-spacing:-0.8px}
h3{font-family:var(--serif);font-size:clamp(24px,2.6vw,30px);line-height:1.18}
h3.sans{font-family:var(--sans);font-weight:600;font-size:20px;line-height:1.3}
.eyebrow{margin:0 0 20px;font-size:12px;font-weight:600;letter-spacing:2.4px;color:var(--teal);text-transform:uppercase}
.eyebrow.grey{color:var(--muted)}
.eyebrow.plum{color:var(--purple-text)}
.eyebrow.sm{font-size:11px;letter-spacing:1.8px;margin-bottom:14px}
.lede{margin:28px 0 0;max-width:64ch;font-size:19px;line-height:1.7;color:var(--muted)}
.lede.tight{margin-top:18px;font-size:17px}
.note{margin:20px 0 0;font-size:14px;color:var(--dim)}
.plum{color:var(--purple-text)}
.teal{color:var(--teal)}
p{margin:0 0 16px}
p:last-child{margin-bottom:0}

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

section{padding:88px 0}
section.hero{padding:104px 0 88px}
section.bordered{border-top:1px solid var(--line-soft)}
section.tight{padding-top:0}

/* ---------- cards ---------- */

.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:34px}
.card.flat{background:var(--card-2)}
.card.plum{background:linear-gradient(145deg,#15092B,var(--card-2));border-color:rgba(123,47,255,0.3);color:var(--text)}
.card.plum h2{color:var(--purple-text)}
.grid{display:grid;gap:20px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.stack{display:flex;flex-direction:column;gap:20px}

.tag{display:inline-flex;align-items:center;font-size:11px;font-weight:600;letter-spacing:1.4px;border-radius:6px;padding:5px 11px;border:1px solid}
.tag.live{color:var(--green);border-color:rgba(127,227,192,0.35)}
.tag.build{color:var(--amber);border-color:rgba(255,192,120,0.35)}
.tag-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:16px}
.tag-note{font-size:11px;font-weight:600;letter-spacing:2px;color:var(--dim);text-transform:uppercase}
.meta{font-size:15px;line-height:1.7;color:var(--dim)}

.pull{background:var(--card-2);border-left:3px solid var(--teal);border-radius:0 14px 14px 0;padding:32px 36px}
.pull.plum{border-left-color:var(--purple)}
.value{background:#120B24;border:1px solid rgba(123,47,255,0.3);border-radius:12px;padding:26px 30px}

/* ---------- steps and rows ---------- */

.rows{display:flex;flex-direction:column;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.row{background:var(--card-2);padding:24px 28px;display:flex;flex-wrap:wrap;gap:18px;align-items:baseline}
.row.on{background:#120B24;border-left:3px solid var(--purple)}
.row .n{flex:0 0 32px;font-size:13px;font-weight:600;color:var(--teal)}
.row.on .n{color:var(--purple-text)}
.row .t{flex:0 0 220px;font-size:17px;font-weight:600}
.row .d{flex:999 1 280px;min-width:0;font-size:15px;line-height:1.65;color:var(--muted);margin:0}

.sevens{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;margin-bottom:32px}
.sevens .k{margin:0 0 10px;font-size:11px;font-weight:600;letter-spacing:1.8px;color:var(--dim)}
.sevens p:last-child{font-size:16px;line-height:1.7;color:var(--soft);margin:0}

.shape{background:var(--card-2);border:1px solid var(--line);border-radius:14px;padding:26px 30px;display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;justify-content:center;font-size:14px;color:var(--soft)}
.shape .sep{color:#3A3F52}
.shape .lbl{font-size:11px;font-weight:600;letter-spacing:1.8px;color:var(--muted)}

/* ---------- form ---------- */

.field{margin-bottom:20px}
.field label{display:block;margin-bottom:8px;font-size:14px;font-weight:600;color:var(--soft)}
.field input,.field textarea,.field select{
  width:100%;background:var(--ink);border:1px solid var(--line);border-radius:8px;
  padding:14px 16px;color:var(--text);font-family:var(--sans);font-size:16px;min-height:48px;
}
.field textarea{min-height:120px;resize:vertical;line-height:1.6}
.field input:focus,.field textarea:focus,.field select:focus{outline:none;border-color:var(--purple)}
.form-msg{margin-top:18px;font-size:15px;min-height:24px}
.form-msg.ok{color:var(--teal)}
.form-msg.bad{color:var(--amber)}

/* ---------- footer ---------- */

.site-foot{border-top:1px solid var(--line);padding:56px 0 40px;margin-top:0}
.foot-cols{display:flex;flex-wrap:wrap;gap:40px}
.foot-cols .about{flex:999 1 300px;min-width:0}
.foot-cols .col{flex:0 0 180px}
.foot-cols h4{margin:0 0 14px;font-size:11px;font-weight:600;letter-spacing:1.8px;color:var(--text);text-transform:uppercase}
.foot-cols .col p{margin:0 0 10px;font-size:14px}
.foot-cols .col a{color:var(--muted)}
.foot-cols .col a:hover{color:var(--text)}
.foot-bar{margin-top:40px;padding-top:24px;border-top:1px solid var(--line-soft);display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;font-size:13px;color:var(--dim)}

/* ---------- mobile ---------- */

@media (max-width:860px){
  .grid.two,.grid.three,.sevens{grid-template-columns:1fr}
  .row .t{flex:1 1 100%}
  .row .n{flex:0 0 auto}
}

@media (max-width:620px){
  /* ch based widths are set per element for desktop rhythm; on a phone they
     overflow, so nothing is allowed to be wider than the column. */
  h1,h2,h3,p,.lede,.sevens p,img{max-width:100%!important}
  /* except the walkthrough, which is deliberately wider than its frame */
  .walk-view img{max-width:none!important}
  body{font-size:16px}
  .wrap{padding:0 16px}
  section{padding:64px 0}
  section.hero{padding:72px 0 64px}
  .card{padding:24px 20px}

  /* On a phone every grid collapses to one column, so a page of bordered
     cards becomes a wall of identical rectangles with nothing to tell the
     reader a new idea has started. Where the cards are a list of ideas
     rather than separate objects, the box comes off and a hairline does
     the separating instead. The text also gets the full column width,
     which takes a line or two off every card. */
  .grid.list{gap:0}
  .grid.list > .card{
    background:none;border:0;border-radius:0;
    padding:26px 0 28px;
    border-top:1px solid var(--line-soft);
  }
  .grid.list > .card:first-child{border-top:0;padding-top:2px}
  .grid.list > .card:last-child{padding-bottom:2px}

  /* Less air between sections, so the page is not mostly gaps. */
  section{padding:54px 0}
  section.hero{padding:64px 0 54px}
  .grid{gap:16px}
  .pull{padding:26px 24px}
  .site-head{position:static}
  .site-head .wrap{gap:16px}
  .nav{flex:1 1 100%;gap:18px;font-size:14px}
  .btn,.btn-ghost{width:100%}
  .btn-row{gap:10px}
  .lede{font-size:17px}
}

/* ---------- portfolio shots ---------- */
/* The card holds a tall full page screenshot and slowly pans down it, so a
   visitor sees the whole site rather than just the hero. Hover to pause.
   The pan distance reads --h, so any card can set its own height.
   An odd number of cards would leave a hole at the end of the row, so the last
   card of an odd set spans the full width and lays out side by side instead. */

.shot{--h:300px;position:relative;height:var(--h);background:var(--card-2);border-bottom:1px solid var(--line);overflow:hidden}
.shot img{width:100%;height:auto;display:block;animation:pan var(--dur,26s) ease-in-out infinite alternate}
.shot:hover img,.shot:focus-within img{animation-play-state:paused}
/* set by work.html: a card that is not on screen does not animate */
.shot img.off{animation-play-state:paused}
@keyframes pan{from{transform:translateY(0)}to{transform:translateY(calc(var(--h) - 100%))}}
.shot .ph{display:none}
.shot .live{position:absolute;right:12px;top:12px;z-index:2;font-size:10px;font-weight:600;letter-spacing:1.4px;
  background:rgba(5,7,9,0.82);border:1px solid rgba(255,255,255,0.18);color:#fff;border-radius:5px;padding:5px 9px}
.shot.empty{display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,#120B24,var(--card-2))}
.shot.empty .ph{display:block;font-family:var(--serif);font-size:30px;line-height:1.2;color:rgba(255,255,255,0.3);text-align:center;padding:0 24px}
.shot.empty .live{display:none}
.shot-body{padding:28px 30px}

.grid.two > .card:last-child:nth-child(odd){
  grid-column:1 / -1;display:grid;grid-template-columns:1.15fr 1fr;align-items:stretch;
}
.grid.two > .card:last-child:nth-child(odd) .shot{--h:420px;border-bottom:none;border-right:1px solid var(--line)}
.grid.two > .card:last-child:nth-child(odd) .shot img{animation-duration:calc(var(--dur,26s) * 2)}

.grid.two > .card:last-child:nth-child(odd) .shot-body{align-self:center;padding:34px 36px;max-width:62ch}

@media (prefers-reduced-motion:reduce){ .shot img{animation:none} }

@media (max-width:860px){
  .grid.two > .card:last-child:nth-child(odd){grid-template-columns:1fr}
  .grid.two > .card:last-child:nth-child(odd) .shot{--h:300px;border-right:none;border-bottom:1px solid var(--line)}
  .grid.two > .card:last-child:nth-child(odd) .shot-body{padding:28px 30px;max-width:100%}
}

@media (max-width:620px){ .shot{--h:220px} .shot-body{padding:26px 22px} }

/* A result strip, for the cards where there is real recorded before and after. */
.result{margin:18px 0 0;padding:16px 18px;background:var(--card-2);border-left:2px solid var(--teal);
  border-radius:0 10px 10px 0;font-size:14px;line-height:1.65;color:var(--soft)}
.result b{display:block;font-size:11px;font-weight:600;letter-spacing:1.8px;color:var(--teal);
  margin-bottom:8px;text-transform:uppercase}

/* Section headings centred site wide: the eyebrow, heading and intro line of every section.
   Cards, lists and body copy inside them stay left aligned for reading. */
main section > .wrap > .eyebrow,
main section > .wrap > h2,
main section > .wrap > .lede{text-align:center;margin-left:auto;margin-right:auto}
main section > .wrap > h2{max-width:30ch}

/* ---------- brand presence ----------
   The page was one flat sheet of near black: the ground and the cards were
   within a few per cent of each other, and the brand only appeared in the
   hero and one card. These rules give the page a rhythm and put 99toAI
   colour into the structure rather than leaving it as decoration. */

/* Alternating sections sit on a purple tinted ground, so scrolling moves
   between near black and brand rather than staying on one colour. */
main > section:nth-of-type(even){background:linear-gradient(180deg,#0C0818,#0A0714)}

/* Section openers carry the brand instead of grey. */
.eyebrow.grey{color:var(--teal)}

/* A purple to teal hairline opens each section, in place of the plain rule. */
section.bordered{border-top:none;position:relative}
section.bordered::before{content:"";position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(123,47,255,0.6),rgba(0,198,167,0.45),transparent)}

/* A purple glow behind the hero, so the first screen is unmistakably ours. */
section.hero{position:relative;overflow:hidden}
section.hero::after{content:"";position:absolute;inset:-30% 15% auto;height:700px;z-index:-1;
  background:radial-gradient(ellipse at 50% 0%,rgba(123,47,255,0.38),transparent 70%)}

/* The teal proof lines were too small to register. */
.card .teal{font-size:15px}

/* ---------- headlines ----------
   Section headings were reading at about the weight of body copy. Bigger,
   brighter and tighter, with a short brand bar under each one. */
main section > .wrap > h2{
  font-size:clamp(40px,5.4vw,66px);
  line-height:1.03;
  letter-spacing:-1.4px;
  color:#fff;
}
main section > .wrap > h2::after{
  content:"";display:block;width:68px;height:3px;border-radius:2px;
  margin:24px auto 0;
  background:linear-gradient(90deg,var(--purple),var(--teal));
}
main section > .wrap > .eyebrow{margin-bottom:18px}

/* ---------- case study evidence ----------
   A screenshot of a real system is the strongest thing on a case study page,
   so it gets room and a slow drift rather than sitting there as a flat image.
   Motion is the point: it reads as a live system, not a mockup. */
.evidence{position:relative;border:1px solid var(--line);border-radius:14px;overflow:hidden;
  background:var(--card-2);margin:0}
.evidence img{width:100%;height:auto;display:block;transform-origin:50% 20%;
  animation:drift 26s ease-in-out infinite alternate}
.evidence:hover img,.evidence:focus-within img{animation-play-state:paused}
@keyframes drift{from{transform:scale(1)}to{transform:scale(1.07)}}
.evidence figcaption{padding:16px 20px;font-size:14px;color:var(--muted);
  border-top:1px solid var(--line);background:var(--card)}
.evidence .redacted{display:inline-block;margin-right:8px;font-size:11px;font-weight:600;
  letter-spacing:1.4px;text-transform:uppercase;color:var(--teal)}
@media (prefers-reduced-motion:reduce){ .evidence img{animation:none} }

/* The flow behind the work. Each step is a node, the line between them is
   drawn with a moving dash so the system reads as running. */
.flow{display:grid;gap:14px;margin-top:8px}
.flow .step{display:grid;grid-template-columns:44px 1fr;gap:18px;align-items:start;
  padding:20px 22px;background:var(--card-2);border:1px solid var(--line);border-radius:12px;
  position:relative}
.flow .step .num{font-family:var(--serif);font-size:24px;line-height:1;color:var(--purple-text)}
.flow .step h4{font-family:var(--sans);font-size:17px;font-weight:600;margin:0 0 6px}
.flow .step p{margin:0;font-size:15px;line-height:1.6;color:var(--muted)}
.flow .step:not(:last-child)::after{content:"";position:absolute;left:43px;bottom:-15px;
  width:2px;height:15px;
  background:repeating-linear-gradient(180deg,var(--purple) 0 4px,transparent 4px 8px);
  background-size:2px 8px;animation:run 1.1s linear infinite}
@keyframes run{to{background-position-y:8px}}
@media (prefers-reduced-motion:reduce){ .flow .step:not(:last-child)::after{animation:none} }
.flow-note{margin-top:18px;padding:16px 18px;background:var(--card-2);
  border-left:2px solid var(--teal);border-radius:0 10px 10px 0;font-size:14px;
  line-height:1.65;color:var(--soft)}

/* A rebuilt flow diagram. Scrolls sideways on a phone rather than shrinking
   to the point of being unreadable. */
.diagram{margin-top:24px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#120F1A}
.diagram .scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.diagram img{display:block;min-width:720px;width:100%;height:auto}
.diagram figcaption{padding:14px 20px;font-size:13.5px;color:var(--muted);
  border-top:1px solid var(--line);background:var(--card)}
@media (max-width:620px){ .diagram figcaption::after{content:" Scroll sideways to follow it.";color:var(--dim)} }

/* The real build canvases are light on a dark page, so they get a lifted
   frame and a slow drift rather than sitting flat. */
.diagram{background:#EDEEF2}
.diagram img{animation:drift 30s ease-in-out infinite alternate;transform-origin:30% 50%}
.diagram:hover img,.diagram:focus-within img{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){ .diagram img{animation:none} }

/* ---------- canvas walkthrough ----------
   The real build, moved through one step at a time with the explanation
   changing underneath it. Visual people get the system in fifteen seconds
   where a paragraph would lose them. */
.walk{margin-top:26px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card)}
.walk-view{position:relative;overflow:hidden;aspect-ratio:var(--ar);background:#EDEEF2}
.walk-view img{position:absolute;display:block;max-width:none;width:calc(var(--z,2) * 100%);height:auto;
  left:var(--l,0%);top:var(--t,0%);
  transition:left 1.5s cubic-bezier(.45,0,.2,1),top 1.5s cubic-bezier(.45,0,.2,1),width 1.1s ease}
.walk-bar{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:start;
  padding:18px 20px;border-top:1px solid var(--line)}
.walk-i{font-size:11px;font-weight:600;letter-spacing:1.6px;color:var(--teal);padding-top:3px;white-space:nowrap}
.walk-t{margin:0;font-size:15px;line-height:1.6;color:var(--soft);min-height:3em}
.walk-btn{background:none;border:1px solid var(--line);color:var(--muted);border-radius:8px;
  padding:6px 12px;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.walk-btn:hover{color:var(--text);border-color:var(--purple)}
.walk-prog{height:2px;background:rgba(255,255,255,0.08)}
.walk-prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--purple),var(--teal));
  transition:width .3s linear}
@media (max-width:620px){
  .walk-bar{grid-template-columns:1fr;gap:10px}
  .walk-t{min-height:0}
}

/* ---------- phone header ----------
   On a phone the header stays pinned to the top while the page scrolls.
   One slim row: logo left, a small diagnostic button right, and the menu
   as a single swipeable line underneath rather than wrapping onto two. */
@media (max-width:620px){
  .site-head{position:sticky;top:0;padding:12px 0 0}
  .site-head .wrap{flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 12px}
  .site-head .logo{font-size:23px;order:1}
  .site-head .btn-sm{order:2;width:auto;margin-left:auto;padding:9px 14px;font-size:13px;border-radius:9px}
  .site-head .nav{
    order:3;flex:1 1 100%;flex-wrap:nowrap;gap:22px;font-size:14px;white-space:nowrap;
    overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;
    padding:6px 0 12px;
    -webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);
            mask-image:linear-gradient(90deg,#000 88%,transparent);
  }
  .site-head .nav::-webkit-scrollbar{display:none}
  .site-head .nav a{flex:0 0 auto}
}
