/* Paintbay landing page. Colours follow the app (src/ui.css); type is the bundled Barlow. */
@font-face{font-family:"Barlow";font-weight:400;font-display:swap;src:url("app/vendor/fonts/barlow/Barlow-Regular.ttf") format("truetype")}
@font-face{font-family:"Barlow";font-weight:700;font-display:swap;src:url("app/vendor/fonts/barlow/Barlow-Bold.ttf") format("truetype")}

:root{
  color-scheme:dark;
  --bg:#0d0e0f;--bg-2:#111314;--panel:#151819;--raised:#1d2022;--hover:#25292b;
  --line:#23272a;--line-strong:#30363a;
  --text:#eceeea;--text-2:#adb3b0;--text-3:#7b827f;
  --accent:#d4ee8b;--accent-hover:#e2f6ae;--accent-ink:#1b2210;--accent-soft:#d4ee8b14;--accent-line:#d4ee8b40;
  --gutter:clamp(20px,4vw,72px);
  --wrap:1600px;
  font:17px/1.6 "Barlow","Segoe UI Variable Text","Segoe UI",system-ui,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text)}
/* A fine grain over the whole page, so the dark surfaces read as material rather than flat colour. */
body::after{content:"";position:fixed;inset:0;z-index:100;pointer-events:none;opacity:.04;
  background:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}
a{color:inherit}
p,dl,dd,ol{margin:0}
p{text-wrap:pretty}
h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.015em}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.grow{flex:1}
.icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.wrap{width:min(var(--wrap),100% - 2*var(--gutter));margin:0 auto}
.eyebrow{margin-bottom:14px;color:var(--accent);font-size:15px;font-weight:700;letter-spacing:.04em}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:42px;padding:8px 18px;border-radius:10px;border:1px solid var(--line-strong);
  background:var(--raised);text-decoration:none;font-weight:700;font-size:16px;white-space:nowrap;box-shadow:inset 0 1px 0 #ffffff0d;
  transition:background .15s,border-color .15s,box-shadow .25s}
.btn:hover{background:var(--hover);border-color:#41484c}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);box-shadow:inset 0 1px 0 #ffffff66,0 6px 20px -10px #d4ee8b66}
.btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);box-shadow:inset 0 1px 0 #ffffff80,0 10px 32px -10px #d4ee8b99}
.btn.big{min-height:52px;padding:10px 24px;font-size:17px;border-radius:11px}
/* The hero's small Ko-fi button: just a heart until pointed at, when a Support on Ko-fi label shows beside it. The
   label is laid over the page, not in the button: when the button grew to hold it, it no longer fitted its row, jumped
   to the next line and out from under the pointer, shrank, jumped back, and so on, shaking the whole hero. */
.btn.kofi-pop{position:relative;padding:10px 16px;gap:0}
.kofi-pop .icon{color:var(--accent)}
.kofi-pop span{position:absolute;left:calc(100% + 10px);top:50%;translate:-6px -50%;padding:7px 13px;border-radius:9px;border:1px solid var(--line-strong);background:var(--raised);
  font-size:15px;white-space:nowrap;opacity:0;pointer-events:none;box-shadow:0 12px 28px -12px #000;transition:opacity .2s,translate .25s cubic-bezier(.2,.7,.2,1)}
.kofi-pop:is(:hover,:focus-visible) span{opacity:1;translate:0 -50%}

/* Top bar */
.top{position:sticky;top:0;z-index:10;background:#0d0e0fd9;backdrop-filter:blur(14px);border-bottom:1px solid #ffffff0d}
.top-in{display:flex;align-items:center;gap:40px;height:70px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;flex:none}
.brand .mark{width:28px;height:26px;fill:var(--accent)}
.brand .word{width:112px;height:25px;fill:var(--text)}
.brand.small .mark{width:21px;height:19px}
.brand.small .word{width:84px;height:19px}
nav{display:flex;gap:32px;margin-left:auto;font-size:16px}
nav a{color:var(--text-2);text-decoration:none;white-space:nowrap}
nav a:hover{color:var(--text)}
.nav-kofi{display:inline-flex;align-items:center;gap:7px}
.nav-kofi .icon{width:15px;height:15px;color:var(--accent)}

/* Hero */
.hero{position:relative;padding:clamp(64px,7vw,120px) 0 clamp(56px,5.5vw,96px);isolation:isolate;overflow:hidden}
.hero::before{content:"";position:absolute;z-index:-1;left:50%;top:-30%;width:min(1800px,140vw);height:120%;transform:translateX(-35%);
  background:radial-gradient(ellipse at center,#d4ee8b1f 0%,#d4ee8b08 40%,transparent 70%);pointer-events:none}
.hero-in{display:grid;grid-template-columns:minmax(0,10fr) minmax(0,13fr);gap:clamp(36px,4vw,72px);align-items:center}
/* Beside the screenshot the headline is sized to sit on two lines; stacked above it (narrower screens) it is larger. */
h1{max-width:18ch;font-size:clamp(40px,4.1vw,72px);line-height:1.04;letter-spacing:-.03em;text-wrap:balance}
/* The highlighted words sit on a dry-brush stroke (site/brush-stroke.png, made by tools/make_brush_stroke.mjs) that is
   painted in from left to right once on load. They never wrap, so the stroke stays one piece. */
h1 .nb{white-space:nowrap}
h1 em{position:relative;isolation:isolate;display:inline-block;white-space:nowrap;font-style:normal;color:var(--accent)}
h1 em::after{content:"";position:absolute;z-index:-1;left:-.06em;right:-.14em;bottom:-.19em;height:.3em;
  background:url("brush-stroke.png") 0 0/100% 100% no-repeat}
.lead{max-width:660px;margin-top:30px;font-size:clamp(18px,1.35vw,22px);line-height:1.55;color:var(--text-2)}
/* Above the screenshot, so the heart's label shows over its edge on a narrower screen. */
.actions{position:relative;z-index:2;display:flex;flex-wrap:wrap;gap:12px;margin-top:42px}
/* Four facts in one quiet line under the headline and the screenshot: an icon and a few words each, spread across the
   page's width above a hairline, with no boxes. */
.facts{display:grid;grid-template-columns:repeat(4,auto);justify-content:space-between;gap:14px 32px;margin:clamp(44px,4.5vw,76px) 0 0;padding:26px 0 0;list-style:none;border-top:1px solid var(--line);
  font-size:16.5px;color:var(--text-2)}
.facts li{display:flex;align-items:center;gap:11px}
.facts .icon{width:18px;height:18px;color:var(--accent)}
.facts b{color:var(--text)}

/* Shown only on phones, where the app's panels do not fit. */
.phone-note{display:none;margin-top:22px;padding:14px 16px;border-radius:12px;border:1px solid var(--accent-line);background:var(--accent-soft);font-size:15.5px;line-height:1.5;color:var(--text-2)}
/* A real screenshot of the app (site/screenshot.webp, made by tools/make_site_screenshot.mjs): the hero's other half.
   It fills its column and stops at the page's right edge, in line with the bar above and the facts below. (It used to
   be wider than its column and run on to the right; on a wide screen that left it hanging past everything else.)
   The lime glow behind it is the hero's own. */
.shot{margin:0;border-radius:16px;border:1px solid var(--line-strong);background:var(--panel);overflow:hidden;
  box-shadow:inset 0 1px 0 #ffffff0d,0 60px 120px -50px #000,0 0 0 1px #0008,0 0 140px -40px #d4ee8b2e}
.shot img{display:block;width:100%;height:auto}

/* Formats strip */
.strip{border-block:1px solid var(--line);background:var(--bg-2)}
.strip-in{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px 56px;padding:24px 0}
.strip-in .g{display:flex;flex-wrap:wrap;align-items:center;gap:6px 22px}
.strip-in i{font-style:normal;font-size:13px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--accent)}
.strip-in b{font-size:18px;font-weight:700;color:var(--text-2)}

/* Sections */
.section{padding:clamp(56px,5.5vw,96px) 0}
.sec-head{max-width:760px;margin:0 auto 48px;text-align:center}
.sec-head h2{font-size:clamp(32px,3vw,52px);line-height:1.08;background:linear-gradient(180deg,#fff 30%,#c4c9c6);-webkit-background-clip:text;background-clip:text;color:transparent}
.sec-head p:not(.eyebrow){margin-top:16px;font-size:18.5px;color:var(--text-2)}
.split{display:grid;grid-template-columns:minmax(260px,5fr) minmax(0,7fr);gap:clamp(40px,6vw,120px);align-items:center}
.sec-head.side{margin:0;text-align:left}
h3{font-size:21px;line-height:1.25}

.cards{display:grid;gap:18px;margin:0;padding:0;list-style:none}
.cards.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.cards>*{position:relative;isolation:isolate;padding:30px 28px 32px;border-radius:18px;background:linear-gradient(180deg,#191c1d,#141617);border:1px solid var(--line);
  box-shadow:inset 0 1px 0 #ffffff0a,0 1px 2px #0006;transition:border-color .2s,transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s}
.cards>*:hover{border-color:var(--line-strong);transform:translateY(-3px);box-shadow:inset 0 1px 0 #ffffff0f,0 24px 48px -24px #000}
/* Under the pointer, cards and panels light up softly and their edge catches a lime glint (landing.js sets --mx, --my). */
.cards>*::before,.panel::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .35s;
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,0%),#d4ee8b10,transparent 65%)}
.cards>*::after,.panel::after{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1px;pointer-events:none;opacity:0;transition:opacity .35s;
  background:radial-gradient(260px circle at var(--mx,50%) var(--my,0%),#d4ee8b99,transparent 70%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.cards>*:hover::before,.cards>*:hover::after,.panel:hover::before,.panel:hover::after{opacity:1}
.cards h3{margin-top:22px}
.cards p{margin-top:10px;color:var(--text-2);font-size:16.5px}
.card-top{display:flex;align-items:center;justify-content:space-between}
.card-top .n{font-size:15px;font-weight:700;color:var(--text-3);font-variant-numeric:tabular-nums}
/* The Stickers card's number is a race-number sticker. landing.js lays it on in WebGL (.gl, its canvas); this is how it
looks without. */
.decal{display:inline-block;transform:rotate(-7deg);filter:drop-shadow(0 1px 1px #000a)}
.card-top .sticker{position:relative;display:grid;place-items:center;min-width:66px;height:44px;padding:0 14px;border-radius:10px;overflow:hidden;
  background:var(--accent);color:var(--accent-ink);font-size:20px;box-shadow:inset 0 0 0 3px var(--accent),inset 0 0 0 4.5px #1b221066}
.decal.gl{position:relative;transform:none;filter:none}
.decal.gl .sticker{opacity:0}
.cards.four>li{overflow:clip;overflow-clip-margin:16px}
.sticker-gl{position:absolute;left:50%;top:50%;width:240px;height:180px;transform:translate(-50%,-50%);pointer-events:none}
.icon.tile{width:46px;height:46px;padding:11px;border-radius:12px;background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent);stroke-width:1.8}

.sheet{border-radius:18px;background:var(--panel);border:1px solid var(--line);overflow:hidden}
.sheet div{display:grid;grid-template-columns:minmax(130px,2fr) 5fr;gap:24px;padding:20px 30px;border-bottom:1px solid var(--line)}
.sheet div:last-child{border-bottom:0}
.sheet dt{color:var(--text-3);font-size:16px;padding-top:1px}
.sheet dd{font-size:18px;font-weight:700}
.sheet dd span{display:block;margin-top:2px;font-size:15.5px;font-weight:400;color:var(--text-2)}
/* What's new: the version on the left, what changed in ordinary text on the right. */
.sheet.log dt{color:var(--text);font-size:19px;font-weight:700}
.sheet.log dd{font-size:16.5px;font-weight:400;color:var(--text-2)}

.panel{position:relative;isolation:isolate;border-radius:22px;border:1px solid var(--line-strong);background:linear-gradient(180deg,#191c1e,#141617);box-shadow:inset 0 1px 0 #ffffff0d}
.download{display:flex;align-items:center;gap:clamp(24px,3vw,48px);padding:clamp(28px,4vw,56px);
  background:radial-gradient(ellipse 40% 90% at 100% 50%,#d4ee8b0f,transparent 70%),linear-gradient(180deg,#191c1e,#141617)}
.app-icon{flex:none;width:88px;height:88px;align-self:flex-start;filter:drop-shadow(0 14px 24px #0009)}
.download>div{flex:1;max-width:820px}
.download h2,.closing h2{font-size:clamp(28px,2.4vw,40px);line-height:1.1}
.download p:not(.eyebrow){margin-top:14px;color:var(--text-2)}
.download .note{font-size:15.5px;color:var(--text-3)}
.download b{color:var(--text)}
.btn.dl{flex:none;margin-left:auto;padding:14px 28px;gap:14px}
/* The Ko-fi panel shares the download panel's layout; its heart stands in for the app icon. */
.support .btn{flex:none;margin-left:auto}
.support .btn .icon{color:var(--accent)}
.support .btn:hover>.icon:first-child{translate:none}
.icon.tile.big{width:64px;height:64px;padding:16px;border-radius:16px;align-self:flex-start}
.btn.dl span{display:flex;flex-direction:column;align-items:flex-start;line-height:1.25}
.btn.dl i{font-style:normal;font-weight:400;font-size:14px;opacity:.75}

.closing,#download+#ko-fi{padding-top:0}
/* The format strip and the first section's heading sit closer together. */
.strip+.section{padding-top:clamp(56px,5vw,88px)}
/* Jumping to a section from the nav leaves room for the sticky top bar. */
section[id]{scroll-margin-top:96px}
.closing-in{position:relative;display:flex;flex-direction:column;align-items:center;gap:14px;padding:clamp(56px,6vw,88px) 24px;text-align:center;
  background:radial-gradient(ellipse 60% 100% at 50% 0%,#d4ee8b14,transparent 70%),linear-gradient(180deg,#191c1e,#141617)}
.closing-in p{font-size:18.5px;color:var(--text-2);margin-bottom:12px}

.foot{border-top:1px solid var(--line);padding:28px 0 32px;color:var(--text-3);font-size:14px}
.foot-in{display:flex;flex-wrap:wrap;align-items:center;gap:10px 24px}
.foot a{color:var(--text-3);text-decoration:none}
.foot a:not(.brand):hover{color:var(--text);text-decoration:underline}

/* A little narrower: the hero's halves are equal, so its three buttons still fit on one row, and the facts are two by two. */
@media (max-width:1340px){
  .hero-in{grid-template-columns:1fr 1fr}
  .facts{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1180px){
  .hero-in,.split{grid-template-columns:1fr}
  h1{font-size:clamp(44px,7.4vw,84px)}
  .shot{margin-top:8px}
  .cards.four,.cards.three{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1080px){
  .top-in{flex-wrap:wrap;height:auto;gap:0 16px;padding-top:11px;justify-content:space-between}
  nav{order:3;width:100%;margin:0;padding:12px 0 13px;gap:26px;overflow-x:auto;scrollbar-width:none}
  section[id]{scroll-margin-top:124px}
}
@media (max-width:700px){
  /* On a phone the bar scrolls away with the page: two rows are too much to keep on screen. */
  .top{position:static}
  section[id]{scroll-margin-top:16px}
  nav{gap:22px;font-size:15px}
  .phone-note{display:block}
  .shot{border-radius:10px}
  .top .btn{min-height:38px;padding:6px 14px;font-size:15px}
  .actions .btn{flex:1}
  .btn.kofi-pop{flex-basis:100%}
  .kofi-pop span{position:static;translate:none;padding:0;border:0;background:none;box-shadow:none;font-size:inherit;opacity:1;margin-left:10px}
  .cards.four,.cards.three{grid-template-columns:1fr}
  .strip-in{justify-content:flex-start;gap:12px}
  .strip-in .g{width:100%;gap:4px 16px}
  .strip-in i{min-width:84px}
  .sheet div{grid-template-columns:1fr;gap:2px}
  .facts{grid-template-columns:1fr;gap:12px}
  .sheet div{padding:18px 20px}
  .download{flex-direction:column;align-items:stretch}
  .btn.dl,.support .btn{margin-left:0;white-space:normal}
  .app-icon{width:64px;height:64px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.btn,.cards>*{transition:none}}

/* Motion, only for people who have not asked for less. Without it (or without scroll-driven animation) every part
   shows its finished state. */
@media (prefers-reduced-motion:no-preference){
  /* On load the hero comes up in reading order, then the brush paints the stroke under the highlighted words. */
  .hero-copy>*,.shot,.facts{animation:enter .8s cubic-bezier(.2,.7,.2,1) both}
  h1{animation-delay:.08s}.lead{animation-delay:.18s}.actions{animation-delay:.28s}.shot{animation-delay:.3s}.facts{animation-delay:.5s}
  @keyframes enter{from{opacity:0;translate:0 18px}}
  h1 em::after{-webkit-mask:linear-gradient(90deg,#000 47%,transparent 53%) 0 0/300% 100% no-repeat;mask:linear-gradient(90deg,#000 47%,transparent 53%) 0 0/300% 100% no-repeat;
    animation:brush 1.1s cubic-bezier(.45,.05,.25,1) .65s both}
  @keyframes brush{from{-webkit-mask-position:100% 0;mask-position:100% 0}}

  /* The arrow in Open Paintbay nudges forward on hover; the download arrow dips. */
  .btn>.icon{transition:translate .2s cubic-bezier(.2,.7,.2,1)}
  .btn:hover>.icon:last-child{translate:3px 0}
  .btn:hover>.icon:first-child{translate:0 2px}

  /* Ko-fi: the heart on the Support button beats on hover, and the big one beats once as the panel comes into view. */
  .support .btn:is(:hover,:focus-visible)>.icon,.kofi-pop:is(:hover,:focus-visible)>.icon{animation:heartbeat .9s ease-in-out}
  .btn.kofi-pop:hover>.icon:first-child{translate:none}
  /* It pops in just after the other two buttons. */
  .actions .kofi-pop{animation:pop .55s cubic-bezier(.3,1.6,.5,1) .85s both}
  @keyframes pop{from{opacity:0;scale:.4}}
  .support.seen>.icon.tile{animation:heartbeat 1s ease-in-out .25s}
  @keyframes heartbeat{0%,100%{scale:1}18%{scale:1.22}36%{scale:.95}54%{scale:1.12}72%{scale:1}}

  /* As they scroll into view: section headings and panels rise in, cards one after another, and each card's icon
     draws itself on. */
  @supports (animation-timeline:view()){
    .cards.four>li{view-timeline:--card block;animation:rise linear both;animation-timeline:--card;animation-range:entry 0% entry 70%}
    .cards.four>li:nth-child(2){animation-range:entry 10% entry 80%}
    .cards.four>li:nth-child(3){animation-range:entry 20% entry 90%}
    .cards.four>li:nth-child(4){animation-range:entry 30% entry 100%}
    .cards.three>*{animation:rise linear both;animation-timeline:view();animation-range:entry 0% entry 70%}
    .cards.three>:nth-child(3n+2){animation-range:entry 10% entry 80%}
    .cards.three>:nth-child(3n){animation-range:entry 20% entry 90%}
    .sec-head,.sheet>div,.panel{animation:lift linear both;animation-timeline:view();animation-range:entry 0% entry 90%}
    .cards .icon.tile{animation:draw linear both;animation-timeline:view();animation-range:entry 100% cover 45%}
    @keyframes rise{from{opacity:0;translate:0 56px}}
    @keyframes lift{from{opacity:0;translate:0 28px}}
    @keyframes draw{from{stroke-dasharray:0 100}to{stroke-dasharray:100 0}}
  }
}
