/* ============================================================================
   Rudegoat site. CJAX Labs. Theme A: yellow with black and white, light and dark.
   Colours are the app's own (src/looks/goat/theme.ts in the app preview, and the
   designer's coats.js, "Goat's own"). No other coats here.
   Motion rule: the goat is the only thing with long motion. Everything else changes
   at once or within 0.2 s.
   ========================================================================== */
@font-face{font-family:'Bricolage Grotesque';font-weight:800;font-style:normal;font-display:swap;src:url(../fonts/bricolage-grotesque-800.woff2) format('woff2')}
@font-face{font-family:'Hanken Grotesk';font-weight:500;font-style:normal;font-display:swap;src:url(../fonts/hanken-grotesk-500.woff2) format('woff2')}
@font-face{font-family:'Hanken Grotesk';font-weight:700;font-style:normal;font-display:swap;src:url(../fonts/hanken-grotesk-700.woff2) format('woff2')}
@font-face{font-family:'Hanken Grotesk';font-weight:800;font-style:normal;font-display:swap;src:url(../fonts/hanken-grotesk-800.woff2) format('woff2')}

:root{
  --yellow:#FFC928; --ink:#17130F; --cream:#FFF5E1; --pink:#FF4F8E;
  --display:'Bricolage Grotesque',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --text-font:'Hanken Grotesk',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --quick:180ms;
  /* light (Goat's own, light) */
  --page:#FFF5E1; --text:#17130F; --sub:#54493F; --line:#E6D7BC;
  --hero:#FFC928; --onHero:#17130F; --dareBg:#17130F; --dareInk:#FFC928; --heroFace:#17130F; --heroEye:#17130F;
  --face:#17130F; --eye:#17130F; --them:#17130F; --onThem:#FFF5E1;
  --btn:#17130F; --onBtn:#FFF5E1; --soonInk:#FFC928; --frame:#17130F;
  --heroCoat:#FFF5E1;                    /* the whole goat's coat on the first screen: on yellow it is the white of the page */
  color-scheme:light;
}
/* dark (Goat's own, dark): a plum dark page, cream words, the goat cream with yellow eyes, yellow buttons */
@media (prefers-color-scheme:dark){
  :root:not([data-scheme=light]){
    --page:#1E161C; --text:#FFF5E1; --sub:#E0D6C5; --line:#5D5453;
    --hero:#1E161C; --onHero:#FFF5E1; --dareBg:#FFC928; --dareInk:#17130F; --heroFace:#FFF5E1; --heroEye:#FFC928;
    --face:#FFF5E1; --eye:#FFC928; --them:#3A2D37; --onThem:#FFF5E1;
    --btn:#FFC928; --onBtn:#17130F; --soonInk:#17130F; --frame:#5D5453;
    --heroCoat:#FFC928;
    color-scheme:dark;
  }
}
:root[data-scheme=dark]{
  --page:#1E161C; --text:#FFF5E1; --sub:#E0D6C5; --line:#5D5453;
  --hero:#1E161C; --onHero:#FFF5E1; --dareBg:#FFC928; --dareInk:#17130F; --heroFace:#FFF5E1; --heroEye:#FFC928;
  --face:#FFF5E1; --eye:#FFC928; --them:#3A2D37; --onThem:#FFF5E1;
  --btn:#FFC928; --onBtn:#17130F; --soonInk:#17130F; --frame:#5D5453;
  --heroCoat:#FFC928;
  color-scheme:dark;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;overflow-x:hidden}
body{margin:0;background:var(--page);color:var(--text);font:500 17px/1.45 var(--text-font);-webkit-font-smoothing:antialiased;overflow-x:hidden}
h1,h2,p,ul{margin:0}
button{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0}
a{color:inherit}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
:focus-visible{outline:3px solid var(--ring,currentColor);outline-offset:3px}

/* ---- the goat: drawn by js/rig.js, one path per shape ---- */
.goat{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.goat .f{fill:var(--gf,var(--face))}
.goat .e{fill:var(--ge,var(--eye))}
.goat .k{fill:var(--pink)}
.goat .cr{fill:var(--yellow)}
/* the whole goat (js/body.js), under the face while the page opens. Its coat is the goat's own yellow; on the yellow first
   screen it is the white of the page. Eyes and mouth on the coat are always ink (the "inked" copy of the face, laid over the
   page's own); horns, ears and hooves take the ground's own ink: ink by day, cream at night. */
.goat .c{fill:var(--heroCoat)}
.goat .h{fill:var(--gf,var(--face))}
.goat .g{fill:var(--hero)}
.goat.inked{--gf:var(--ink);--ge:var(--ink)}
.home{position:relative;width:var(--gw);height:calc(var(--gw) * 0.7375)}
.poke{position:absolute;inset:0;border-radius:22%;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.poke:focus-visible{outline-offset:6px}

/* ---- the store buttons (all three places): solid, never a link until the app is out ---- */
.stores{display:flex;gap:10px}
.store{flex:1 1 0;min-width:0;height:62px;border-radius:31px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  background:var(--btn);color:var(--onBtn);text-decoration:none;white-space:nowrap;user-select:none;-webkit-user-select:none;cursor:pointer;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation}
.store b{font:800 19px/1 var(--text-font);letter-spacing:-.01em}
.store small{font:800 11px/1 var(--text-font);letter-spacing:.1em;text-transform:uppercase;color:var(--soonInk)}
.store.live small{color:inherit}
.store:active{transform:scale(.97)}

/* ---- 1. the hero ---- */
.hero{position:relative;background:var(--hero);color:var(--onHero);min-height:100vh;min-height:100svh;padding:18px 20px 26px;display:flex;flex-direction:column;
  overflow-x:hidden;overflow-x:clip;overflow-y:visible;--gf:var(--heroFace);--ge:var(--heroEye);--ring:var(--onHero)}
.bar{height:30px;display:flex;align-items:center}
.mark{display:block;height:25px;width:auto;fill:currentColor}
.hero-in{flex:1 0 auto;display:flex;flex-direction:column;justify-content:center;gap:2px}
.stage{display:flex;flex-direction:column;align-items:center;padding-top:4px;
  --gw:min(86vw, 360px, calc(31svh * 1.356))}
.say{position:relative;min-height:1.2em;margin-top:calc(var(--gw) * -0.07);font:800 28px/1.1 var(--display);letter-spacing:-.02em;text-align:center;white-space:pre-line}
.hint{display:block;font:700 15px/1.9 var(--text-font);letter-spacing:0}
.copy{position:relative;margin-top:6px}
h1{font:800 clamp(36px, 10.6vw, 104px)/1 var(--display);letter-spacing:-.035em;text-wrap:balance}
h1>span:first-child{display:block}
h1 .dare{display:inline-block;margin-top:.1em;padding:.02em .16em .08em;border-radius:.14em;background:var(--dareBg);color:var(--dareInk);transform:rotate(-2deg);transform-origin:0 100%}
.lede{font:500 18px/1.4 var(--text-font);margin-top:14px;max-width:31em;text-wrap:pretty}
.hero .get{margin-top:20px;max-width:440px}

/* ---- 4. who it is for, and the sample match ---- */
.how{padding:56px 16px 40px;max-width:1120px;margin:0 auto}
.for{font:800 clamp(30px, 8.2vw, 60px)/1.04 var(--display);letter-spacing:-.03em;max-width:15em;text-wrap:balance;margin:0 4px 32px}
.demo{position:relative;max-width:392px;margin:0 auto;padding:18px 16px 20px;border:2px solid var(--frame);border-radius:38px;background:var(--page);color:var(--text);
  --gw:124px;--u:calc(var(--gw) / 160);--panel:var(--page);
  transition:background-color var(--quick) linear,color var(--quick) linear,border-color var(--quick) linear}
.dhd{display:flex;justify-content:space-between;align-items:baseline;padding:0 6px}
.dhd b{font:800 22px/1 var(--display);letter-spacing:-.02em}
.dhd span{font:700 15px/1 var(--text-font);color:var(--sub);transition:color var(--quick) linear}
.dtop{position:relative;z-index:2;height:calc(var(--gw) * 0.862);margin-top:10px}
.dtop .home{position:absolute;left:calc(var(--u) * 2.13);top:0}
.dsay{position:absolute;left:calc(var(--gw) + 14px);right:2px;top:0;height:calc(var(--gw) * 0.7375);display:flex;align-items:center;font:800 24px/1.06 var(--display);letter-spacing:-.02em;white-space:pre-line}
.card{position:relative;z-index:1;border-radius:26px;overflow:hidden;transition:box-shadow var(--quick) linear}
.row{position:relative;height:104px;padding:14px 18px}
.row.you{background:var(--yellow);color:var(--ink)}
.row.them{background:var(--them);color:var(--onThem);transition:background-color var(--quick) linear,color var(--quick) linear}
.nm{display:flex;align-items:center;gap:8px;height:22px;font:800 17px/22px var(--text-font)}
.tag{display:none;font:800 11px/13px var(--text-font);font-style:normal;letter-spacing:.09em;text-transform:uppercase;padding:4px 8px;border-radius:99px}
.row.lead .tag{display:inline-block}
.row.you .tag{background:var(--ink);color:var(--yellow)}
.row.them .tag{background:var(--onThem);color:var(--them)}
.n{position:absolute;right:18px;bottom:7px;font:800 60px/1 var(--text-font);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.bites{position:absolute;left:calc(var(--u) * 93.8);top:0;width:calc(var(--u) * 64);height:calc(var(--u) * 64);overflow:visible;pointer-events:none}
.bites path{fill:var(--panel)}
.dfact{margin-top:16px;padding:0 6px;min-height:64px}
.dfact b{display:block;font:800 26px/1.1 var(--display);letter-spacing:-.02em}
.chip{display:inline-block;margin-top:10px;background:var(--ink);color:var(--yellow);font:800 15px/1 var(--text-font);padding:8px 14px;border-radius:99px}
.chip:empty{display:none}
/* the win: your yellow takes the panel, at once */
.demo.won{background:var(--yellow);color:var(--ink);border-color:var(--ink);--panel:var(--yellow);--gf:var(--ink);--ge:var(--ink)}
.demo.won .dhd span{color:var(--ink)}
.demo.won .card{box-shadow:0 0 0 2.5px var(--ink)}
.demo.won .row.them{background:var(--ink);color:var(--cream)}

/* ---- 5. three facts, each on a yellow tile, and Goa, smaller ---- */
.side{max-width:392px;margin:44px auto 0}
.facts{list-style:none;padding:0;display:grid;gap:18px}
.facts li{display:flex;align-items:center;gap:16px;text-wrap:balance;font:800 23px/1.12 var(--display);letter-spacing:-.02em}
.tile{flex:none;width:64px;height:64px;border-radius:18px;background:var(--yellow);display:block}
.tile svg{display:block;width:100%;height:100%}
.tile .i{fill:var(--ink)}
.tile .y{fill:var(--yellow)}
.goa{display:flex;align-items:center;gap:14px;margin-top:30px;padding-top:22px;border-top:1.5px solid var(--line);font:700 17px/1.3 var(--text-font)}
.goa .tile{width:44px;height:44px;border-radius:13px}

/* ---- 6. the dock: the store buttons, always in reach once the first screen has gone. The goat peeks over its top edge. ---- */
.dock{position:fixed;z-index:20;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom, 0px));max-width:500px;margin:0 auto;
  --gw:118px;--ring:var(--ink);--below:calc(10px + env(safe-area-inset-bottom, 0px));
  transform:translateY(calc(100% + 90px));visibility:hidden;transition:transform var(--quick) linear,visibility 0s linear var(--quick)}
.dock.on{transform:none;visibility:visible;transition:transform var(--quick) linear}
/* the page fades out above the bar, so the goat never sits on top of words */
.dock::before{content:'';position:absolute;z-index:0;left:50%;width:100vw;margin-left:-50vw;bottom:calc(var(--below) * -1);height:calc(100% + var(--below) + var(--gw) * 0.5 + 28px);background:linear-gradient(to bottom, transparent, var(--page) 28px);pointer-events:none}
.dock-bg{position:absolute;inset:0;z-index:2;background:var(--yellow);border:2px solid var(--ink);border-radius:41px}
.dock-in{position:relative;padding:10px}
.dock .get{position:relative;z-index:3}
.dock .store{background:var(--ink);color:var(--cream);height:58px}
.dock .store small{color:var(--yellow)}
.dock .home{position:absolute;left:calc(50% - var(--gw) / 2);top:calc(var(--gw) * -0.6188)}
.dock-face{z-index:1}
.dock-hooves{z-index:4;pointer-events:none}
.dock-hooves .goat{--gf:var(--ink)}
.dock-poke{position:absolute;z-index:5;inset:auto;left:calc(50% - var(--gw) * 0.32);width:calc(var(--gw) * 0.64);top:calc(var(--gw) * -0.46);height:calc(var(--gw) * 0.46);border-radius:40% 40% 0 0}

/* ---- 7. the footer (room at the bottom for the dock, the goat peeking over it, and its fade, so the last line is never covered) ---- */
.foot{border-top:1.5px solid var(--line);padding:24px 20px calc(190px + env(safe-area-inset-bottom, 0px));font:500 15px/1.5 var(--text-font);color:var(--sub);max-width:1120px;margin:0 auto}
.foot .made{color:var(--text);font-weight:700}
.foot .made a{color:inherit;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px}
.links{display:flex;gap:20px;margin:1px 0}
.links a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;color:var(--text);font-weight:700;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px}
.links a:not([href]){text-decoration-style:dotted}

/* reduced motion only: the whole goat, still, standing on the line above the footer (js/site.js, standStill) */
.foot{position:relative}
.stood{position:absolute;right:max(20px, env(safe-area-inset-right, 0px));bottom:100%;margin-bottom:1.5px;height:46px;width:auto;aspect-ratio:235/176;overflow:visible;pointer-events:none}
.stood .c{fill:var(--yellow)}
.stood .o{fill:var(--text)}
.stood .g{fill:var(--page)}
.stood .i{fill:var(--ink)}

/* ---- a laptop ---- */
@media (min-width:960px){
  .hero{padding:30px 56px 44px}
  .bar{height:36px}
  .mark{height:30px}
  .hero-in{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:center;gap:32px;max-width:1280px;width:100%;margin:0 auto}
  .stage{order:2;--gw:min(38vw, 520px, calc(54vh * 1.356))}
  .say{font-size:34px}
  h1{font-size:clamp(58px, 6.2vw, 86px)}                          /* capped so the headline keeps three lines once the column stops growing (1920 wide) */
  .lede{font-size:22px;margin-top:20px;max-width:24em}
  .hero .get{margin-top:30px;max-width:440px}
  .how{display:grid;grid-template-columns:392px minmax(0,1fr);grid-template-areas:'for for' 'demo side';column-gap:72px;align-items:center;padding:110px 56px 64px}
  .for{grid-area:for;margin:0 0 56px;font-size:clamp(44px, 4.6vw, 64px)}
  .demo{grid-area:demo;margin:0}
  .side{grid-area:side;margin:0;max-width:460px}
  .facts{gap:30px}
  .facts li{font-size:28px;gap:22px}
  .tile{width:72px;height:72px;border-radius:20px}
  .goa{font-size:19px;margin-top:40px;padding-top:28px}
  .dock{--gw:136px;bottom:20px;--below:20px}
  .foot{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 28px;padding:28px 56px 204px}
  .stood{height:64px;right:max(56px, env(safe-area-inset-right, 0px))}
  .links{margin:0}
}
/* a short phone: everything on the first screen, the buttons included */
@media (max-width:959px) and (max-height:700px){
  .hero{padding-top:14px;padding-bottom:18px}
  .stage{--gw:min(62vw, 300px, calc(28svh * 1.356))}
  .say{font-size:24px}
  h1{font-size:clamp(32px, 9.8vw, 44px)}
  .lede{font-size:16.5px;margin-top:10px}
  .hero .get{margin-top:14px}
  .hero .store{height:56px}
}
/* a phone on its side: the laptop's two columns, so the buttons stay on the first screen */
@media (max-width:959px) and (max-height:500px) and (orientation:landscape){
  .hero{padding-top:12px;padding-bottom:14px}
  .hero-in{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:20px}
  .stage{order:2;--gw:min(40vw, calc(58svh * 1.356))}
  .say{font-size:22px}
  h1{font-size:clamp(28px, 4.8vw, 42px)}
  .lede{font-size:16px;margin-top:8px}
  .hero .get{margin-top:14px}
  .hero .store{height:52px}
}
/* the screen's safe area (notches and rounded corners; the page is drawn edge to edge with viewport-fit=cover) */
.hero,.foot{padding-left:max(20px, env(safe-area-inset-left, 0px));padding-right:max(20px, env(safe-area-inset-right, 0px))}
.hero{padding-top:max(18px, env(safe-area-inset-top, 0px))}
.how{padding-left:max(16px, env(safe-area-inset-left, 0px));padding-right:max(16px, env(safe-area-inset-right, 0px))}
.dock{left:max(10px, env(safe-area-inset-left, 0px));right:max(10px, env(safe-area-inset-right, 0px))}
@media (min-width:960px){
  .hero,.how,.foot{padding-left:max(56px, env(safe-area-inset-left, 0px));padding-right:max(56px, env(safe-area-inset-right, 0px))}
  .hero{padding-top:max(30px, env(safe-area-inset-top, 0px))}
}
@media (max-width:959px) and (max-height:700px){ .hero{padding-top:max(14px, env(safe-area-inset-top, 0px))} }
@media (max-width:959px) and (max-height:500px) and (orientation:landscape){ .hero{padding-top:max(12px, env(safe-area-inset-top, 0px))} }

/* ---- the 404 page (404.html): the first screen's look, a still goat, one way home ---- */
.home-link{display:inline-flex;align-items:center;min-height:44px;color:inherit}
.lost-in{flex:1 0 auto;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;max-width:1280px;width:100%;margin:0 auto;padding:24px 0}
.lost-goat{display:block;width:min(70vw, 340px);height:auto;margin:0 0 28px;overflow:visible}
.lost-goat .f{fill:var(--heroFace)}
.lost-goat .e{fill:var(--heroEye)}
.lost-goat .k{fill:var(--pink)}
.lost .lede{margin-top:12px}
.lost-go{margin-top:28px;width:100%;max-width:320px}
.lost-go .store{display:flex;width:100%}
@media (min-width:960px){ .lost-in{padding:40px 0} }
@media (max-height:500px) and (orientation:landscape){ .lost-in{padding:8px 0} .lost-goat{width:min(26vw, 180px);margin-bottom:10px} .lost-go{margin-top:16px} }

/* reduced motion: the bar appears at once */
@media (prefers-reduced-motion:reduce){ .dock,.dock.on,.demo,.demo *{transition:none} .store:active{transform:none} }
:root[data-motion=reduce] .dock,:root[data-motion=reduce] .dock.on,:root[data-motion=reduce] .demo,:root[data-motion=reduce] .demo *{transition:none}
:root[data-motion=reduce] .store:active{transform:none}
