/* Robowok — rice and noodle studio. Design per BRAND.md「Robowok 学喜茶的用法」(2026-10-22).
   Colours: cream ground, near-black ink, two greys. Orange only on the order button. */
:root{
  --cream:#FEF9F0; --white:#FFFFFF; --ink:#171717; --grey:#6C6C6C; --mute:#8C8C8C; --line:#D9D9D9; --orange:#FE7613;
  --hand:'Patrick Hand',cursive;
  --body:'Inter',system-ui,-apple-system,sans-serif;
  --s1:12px; --s2:25px; --s3:48px; --s4:64px; --s5:80px; --s6:100px;
  --fast:.15s; --in:.36s; --flip:.8s;
  --max:1280px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}   /* no blue flash on phone taps (Di 2026-10-27); keyboard focus outlines stay */
body{background:var(--cream);color:var(--ink);font-family:var(--body);font-weight:300;font-size:15px;line-height:1.5;letter-spacing:.08em}
@media (max-width:767px){body{font-size:14px}}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none;transition:opacity var(--fast) ease}
a:hover{opacity:.6}
button{font:inherit;letter-spacing:inherit;background:none;border:0;color:inherit;cursor:pointer}
.wrap{max-width:var(--max);margin:0 auto;padding:0 var(--s2)}
.hand{font-family:var(--hand);font-weight:400;letter-spacing:.06em;line-height:1.15}
.lead{color:var(--grey);font-size:14px}
.sm{font-size:13px;color:var(--grey)}
.ink{color:var(--ink)}
.draw{mix-blend-mode:multiply}

/* buttons: pill only, one orange on screen */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 28px;border-radius:9999px;font-size:15px;font-weight:400;letter-spacing:.12em;transition:opacity var(--fast) ease,transform var(--fast) ease}
.btn:active{transform:scale(.98)}
.btn-order{background:var(--orange);color:var(--white)}
.btn-order:hover{opacity:.9}
.btn-ghost{border:1px solid var(--ink);color:var(--ink)}
.btn-ghost:hover{opacity:.6}

/* header */
.top{position:sticky;top:0;z-index:20;background:var(--cream)}
.top .wrap{display:flex;align-items:center;justify-content:space-between;height:72px}
.brand{display:inline-flex;flex-direction:column;align-items:center;gap:4px}
.brand img{height:24px;width:auto}
.tag{font-family:var(--body);font-weight:300;font-size:8px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink);line-height:1;white-space:nowrap}
.nav{display:flex;align-items:center;gap:var(--s2)}
.nav a{font-size:14px;letter-spacing:.14em}
.nav a.link{border-bottom:1.5px solid transparent;padding-bottom:2px;transition:border-color var(--fast) ease,opacity var(--fast) ease}
.nav a.link.on,.nav a.link:hover{border-bottom-color:var(--orange);opacity:1}
.nav .btn{min-height:40px;padding:0 22px}
@media (max-width:767px){
  .top .wrap{height:60px}
  .brand img{height:20px}
  .tag{font-size:7px}
  .nav{gap:14px}
  .nav a.link{font-size:12px;letter-spacing:.1em;white-space:nowrap}
  .nav .btn{min-height:34px;padding:0 14px;font-size:12px}
}
/* narrow phones: a little less air between the links; narrower still, the nav drops under the logo instead of running into it */
@media (max-width:374px){
  .nav{gap:10px}
  .nav a.link{letter-spacing:.04em}
}
@media (max-width:350px){
  .top .wrap{flex-wrap:wrap;height:auto;padding-top:10px;padding-bottom:10px;row-gap:8px}
}

/* sections */
section{padding:var(--s5) 0}
.title{font-size:clamp(36px,4.6vw,58px);margin-bottom:var(--s1)}
.title.center{text-align:center}
.sub{color:var(--grey);max-width:560px}
.center .sub{margin:0 auto;text-align:center}

/* entrance: one animation for the whole site — fade in + 14px up, .36s */
.rise{opacity:0;transform:translateY(14px);transition:opacity var(--in) ease,transform var(--in) ease}
.rise.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.rise{opacity:1;transform:none;transition:none}}

/* hero */
.hero{padding:var(--s4) 0 var(--s3)}
.hero .wrap{display:grid;grid-template-columns:1.1fr .9fr;align-items:center;gap:var(--s3)}
@media (min-width:768px){.hero .wrap{max-width:1060px}}   /* words + order now and the chef pulled in from the window edges, so the button is not stuck to the left (Di 2026-10-27, picked 1) */
.hero h1{font-size:clamp(46px,7.2vw,94px);line-height:1.05;margin-bottom:var(--s2)}
.hero p{max-width:420px;margin-bottom:var(--s3);text-wrap:balance}
/* hero order: hand-written like the headline, orange squiggle under it and an arrow that nudges on hover (Di 2026-10-27 picked this over a bigger pill) */
.hero-go{position:relative;display:inline-flex;align-items:center;gap:14px;font-size:40px;letter-spacing:.03em;color:var(--ink);padding-bottom:6px}
.hero-go svg{fill:none;stroke:var(--orange);stroke-linecap:round;stroke-linejoin:round;overflow:visible}
.hero-go .arr{width:54px;height:24px;stroke-width:2.2;transition:transform var(--fast) ease}
.hero-go:hover .arr{transform:translateX(6px)}
.hero-go .sq{position:absolute;left:0;bottom:-8px;width:150px;height:14px;stroke-width:2.5}
.hero .art{justify-self:center;width:auto;max-width:min(100%,460px);max-height:min(62vh,560px);object-fit:contain}
@media (max-width:767px){
  .hero{padding:var(--s2) 0 var(--s3)}
  .hero .wrap{grid-template-columns:1fr;gap:var(--s2);text-align:center}
  .hero .art{max-width:48%;max-height:34vh;margin-top:var(--s1)}
  .hero p{margin:0 auto var(--s2)}
  .hero-go{font-size:34px}
  .hero-go .sq{width:128px}
  .hero-go .arr{position:absolute;left:100%;margin-left:12px}   /* centred hero: centre the words, the arrow hangs off to the right (Di 2026-10-27) */
}


/* hand-drawn arrow next to a category label */
.label{display:flex;align-items:flex-end;gap:14px;margin-bottom:var(--s2)}
.label .hand{font-size:clamp(30px,3.6vw,46px)}
.label .arrow{width:72px;height:40px;flex:none;margin-bottom:8px}

/* dish card — front: the bowl only. back: name / intro / price / order. hover fades .8s */
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:1%}
.card{position:relative;aspect-ratio:4/5;background:transparent;overflow:hidden}
.card .front,.card .back{position:absolute;inset:0;padding:var(--s2)}
.card .front{display:flex;align-items:flex-start;justify-content:center;transition:opacity var(--flip) ease}
.card .front img{width:70%;height:auto}
.card .front img.photo{width:100%;height:100%;object-fit:cover;border-radius:18px}
.card .back{display:flex;flex-direction:column;background:var(--cream);opacity:0;transition:opacity var(--flip) ease}
.card:hover .front,.card:focus-within .front,.card.flip .front{opacity:0}
.card:hover .back,.card:focus-within .back,.card.flip .back{opacity:1}
.card .name{font-size:clamp(26px,2.4vw,34px);line-height:1.05}
.card .name span{display:block}
.card .intro{margin-top:auto;font-size:14px;color:var(--ink);hyphens:auto;max-width:92%}
.card .alg{font-size:12px;color:var(--mute);margin-top:6px}
.card .front img{width:88%;height:auto}
.card .row{display:flex;align-items:center;justify-content:space-between;margin-top:12px;font-size:14px}
.card .row .price{letter-spacing:.12em}
.card .row a{display:inline-flex;align-items:center;gap:6px;border-bottom:1px solid var(--ink);padding-bottom:1px}
.card .row a:hover{opacity:.6}
.card.spicy .name::after{content:"";display:inline-block;width:12px;height:12px;margin-left:8px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1c-1 2-3 3-3 6a3 3 0 006 0c0-3-2-4-3-6z' fill='none' stroke='%23171717' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center/contain}
@media (max-width:1023px){.cards{grid-template-columns:repeat(3,1fr)}}
@media (max-width:767px){
  /* no mouse on a phone: show the back */
  .cards{grid-template-columns:1fr 1fr;gap:12px}
  .card{aspect-ratio:auto;min-height:250px}
  .card .front{display:none}
  .card .back{position:static;opacity:1;padding:16px}
  .card .name{font-size:26px}
    .card .intro{font-size:13px;margin-top:14px}
}
@media (max-width:420px){.cards{grid-template-columns:1fr}.card{min-height:0}}

/* signature carousel on the home page: 4 across on desktop with arrows, one per screen on a phone */
.sig .wrap{position:relative}
.rail{display:grid;grid-auto-flow:column;grid-auto-columns:calc(25% - .75%);gap:1%;align-items:start;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding-bottom:4px;margin:0 var(--s3)}
.sig .label,.sig .sm{margin-left:var(--s3)}
.rail::-webkit-scrollbar{display:none}
.rail .card{scroll-snap-align:start}
.arrows{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;margin:0;padding:0 2px}
.arrows button{pointer-events:auto}
.arrows button{width:48px;height:36px;display:inline-flex;align-items:center;justify-content:center;transition:opacity var(--fast) ease}
.arrows button:hover{opacity:.6}
.arrows svg{width:44px;height:28px;stroke:var(--ink);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* instax square print (72×86, picture 62×62) with a second print tucked behind, torn tape on top, outlined by hand.
   Used by the order page tiles and the home signature cards; assets/ink.js draws --ln --lw --lb --tp per print. Di 2026-10-27 */
.snap{position:relative;display:block}
.snap .pic{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;aspect-ratio:72/86;padding:6.9% 6.9% 26.4%;background:#FBFAF6;border-radius:8px;box-shadow:4px 5px 0 rgba(43,37,34,.1);transform:rotate(var(--r,0deg))}
.snap .pic img.photo{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:3px}
/* the picture window is square: say so on the photo itself. height:100% inside a box sized only by aspect-ratio works in Chrome but not
   in Safari, where a tall photo kept its own shape, stretched the print and left the pen outline behind (Di 2026-10-27, Mac) */
.snap .pic::before{content:"";position:absolute;top:-11px;left:50%;z-index:2;width:var(--tw,36%);height:24px;transform:translateX(-50%) rotate(var(--t,0deg));background:var(--tp) center/100% 100% no-repeat}
.snap .pic::after{content:"";position:absolute;top:4.3%;bottom:20.6%;left:5.1%;right:5.1%;pointer-events:none;background:var(--lw) center/100% 100% no-repeat}
.snap::after{content:"";position:absolute;left:-4.17%;top:0;width:108.33%;aspect-ratio:78/92;z-index:1;pointer-events:none;background:var(--ln) center/100% 100% no-repeat;transform:translateY(-3.26%) rotate(var(--r,0deg))}
.snap::before{content:"";position:absolute;left:0;top:0;width:100%;aspect-ratio:72/86;z-index:-1;background:var(--lb) center/100% 100% no-repeat,#EFEAE0;border-radius:8px;box-shadow:4px 5px 0 rgba(43,37,34,.08);transform:rotate(calc(var(--r,0deg) * -2.4)) translate(4px,3px)}
.snap .pic .nm{position:absolute;left:0;right:0;bottom:0;height:calc(100% * 19 / 86);margin:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:0 8%;color:#2B2522;font-size:clamp(18px,1.7vw,24px);line-height:1;transform:rotate(-1.5deg)}
/* home signature cards: the print sits on the card front */
.rail{isolation:isolate}
.rail .card .front .snap{width:100%}
.rail .card:nth-child(4n+1) .snap{--r:-1.8deg;--t:-4deg;--tw:38%}.rail .card:nth-child(4n+2) .snap{--r:1.4deg;--t:3deg;--tw:31%}.rail .card:nth-child(4n+3) .snap{--r:-.9deg;--t:-2deg;--tw:42%}.rail .card:nth-child(4n) .snap{--r:2deg;--t:5deg;--tw:34%}
@media (max-width:1023px){.rail{grid-auto-columns:calc(33.33% - .67%)}}
@media (max-width:767px){
  .rail{grid-auto-columns:72%;gap:12px;padding-top:14px}
  .rail .card{aspect-ratio:auto;overflow:visible}
  .arrows{display:none}
  /* phones see the print too (Di 2026-10-27): print, then price + order under it; the next card peeks in */
  .rail .card .front{display:block;position:static;opacity:1;padding:4px 6px 0}
  .rail .card .back{position:static;opacity:1;padding:14px 6px 0;background:none}
  .rail .card .back .name,.rail .card .back .intro,.rail .card .back .alg{display:none}
  .rail .card .back .row{margin-top:0}
}

/* how it works — the flow is drawn, one word a step */
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--s2);align-items:start;text-align:center}
.step svg{width:72px;height:72px;margin:0 auto var(--s1);display:block;stroke:var(--ink);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.step .hand{font-size:clamp(24px,2.6vw,32px)}
.step .sm{display:block;margin-top:4px}
/* how it works (Di 2026-10-27): the old "wok-fired" line is the subtitle; each icon draws itself stroke by stroke when the steps
   come into view (delays are inline on each path), last stroke orange; hand-drawn arrows between the steps */
.how-sub{display:block;text-align:center;margin:-6px 0 var(--s3)}
.step{position:relative}
.step:not(:last-child)::after{content:"";position:absolute;top:24px;right:-14%;width:54px;height:22px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24'%3E%3Cpath d='M3 15c12-8 28-10 48-4M43 4c3 3 6 5 8 7-4 1-7 3-10 6' fill='none' stroke='rgba(43,37,34,.45)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.step svg path{stroke-dasharray:1;stroke-dashoffset:1}
.steps.in .step svg path{animation:stepdraw .7s ease forwards}
.step svg path:last-child{stroke:var(--orange)}
@keyframes stepdraw{to{stroke-dashoffset:0}}
@media (prefers-reduced-motion:reduce){.step svg path{stroke-dashoffset:0}.steps.in .step svg path{animation:none}}
@media (max-width:767px){.step:not(:last-child)::after{display:none}.steps{grid-template-columns:1fr 1fr;gap:var(--s2) 12px}.step svg{width:56px;height:56px}}



/* footer */
footer{padding:var(--s3) 0 var(--s3)}
footer .wrap{display:flex;align-items:center;gap:var(--s2)}
footer .foot-chef{width:96px;height:auto;flex:none}
footer .foot-txt{display:grid;gap:10px}
footer nav{display:flex;flex-wrap:wrap;gap:6px var(--s2);font-size:13px;letter-spacing:.14em}
footer nav a,footer .sm a{border-bottom:1px solid var(--orange);padding-bottom:1px}
@media (max-width:520px){footer .wrap{align-items:flex-start}footer .foot-chef{width:72px}}
/* phone: rewards / our story / order / 404 footer is just address, hours, phone · instagram · tell us under a small chef (Di 2026-10-27: 放的东西太多了) */
footer .ft-m{display:none}
@media (max-width:767px){
  footer.slim{padding:var(--s2) 0 var(--s4)}
  footer.slim > .wrap{display:none}
  footer .ft-m{display:block;text-align:center;padding:0 16px}
  footer .ft-m .sm{color:var(--grey);line-height:1.6}
  footer .ft-m .sm + .sm{margin-top:6px}
  footer .ft-m a{white-space:nowrap}
  footer .ft-m .ft-chef{display:block;width:56px;height:auto;margin:0 auto 10px}
}
/* home page: the footer is also "find us" — info left, chef middle, links right */
footer.big{border-top:1px solid var(--line);padding:var(--s4) 0 var(--s3);margin-top:var(--s3)}
footer.big .wrap{display:grid;grid-template-columns:1.3fr auto 1fr;gap:var(--s3);align-items:end}
footer.big .find .hand{font-size:clamp(36px,4vw,52px);margin-bottom:var(--s1)}
footer.big dl{display:grid;grid-template-columns:auto 1fr;gap:6px var(--s2);font-size:14px;margin:var(--s2) 0}
footer.big dt{color:var(--grey)}
footer.big .foot-chef{width:140px}
@media (max-width:767px){footer.big .wrap{grid-template-columns:1fr;align-items:start}footer.big .foot-chef{width:96px}}

/* menu page */
.menuhead{padding:var(--s4) 0 var(--s2)}
.cats{position:sticky;top:72px;z-index:10;background:var(--cream)}
.cats .wrap{display:flex;gap:var(--s2);overflow-x:auto;scrollbar-width:none;height:56px;align-items:center}
.cats .wrap::-webkit-scrollbar{display:none}
.cats a{font-size:13px;letter-spacing:.14em;color:var(--mute);white-space:nowrap;transition:color var(--fast) ease}
.cats a{border-bottom:1.5px solid transparent;padding-bottom:3px}
.cats a.on,.cats a:hover{color:var(--ink);opacity:1}
.cats a.on{border-bottom-color:var(--orange)}
.group{padding:var(--s4) 0 var(--s2);scroll-margin-top:130px}
@media (max-width:767px){.cats{top:60px}.cats .wrap{gap:4px 18px;height:auto;flex-wrap:wrap;padding:12px var(--s2)}.group{scroll-margin-top:130px}}

/* story page — sticky chapter list on the left, polaroids on the right */
.story{padding:var(--s4) 0 var(--s6)}
.story .wrap{max-width:760px}   /* one column, read straight down — no chapter list (Di 2026-10-27: 去掉) */
.story .chapter:first-child{padding-top:0}   /* the page's own top space is enough (Di 2026-10-27: 空间有点大) */
.chapter{padding:var(--s3) 0 var(--s4);scroll-margin-top:100px}
.chapter .hand{font-size:clamp(36px,4.4vw,54px);margin-bottom:var(--s2)}
.chapter p{max-width:520px;margin-bottom:var(--s2)}
.chapter p+p{margin-top:calc(var(--s1) * -1)}
.polaroid{display:inline-block;background:var(--white);padding:14px 14px 40px;transform:rotate(-2.5deg);margin-top:var(--s1)}
.polaroid.r{transform:rotate(2deg)}
.polaroid img{width:260px;max-width:100%;height:auto}
.polaroid figcaption{font-family:var(--hand);font-size:19px;color:var(--mute);margin-top:12px;letter-spacing:.04em}
.evolve{display:flex;align-items:flex-end;gap:var(--s2);flex-wrap:wrap}
.evolve .polaroid img{width:170px;height:170px;object-fit:contain;filter:grayscale(1)}
/* the polaroids become the same prints as the dish photos once ink.js has run (Di 2026-10-27) */
.story .snap{display:block;width:300px;max-width:100%;margin-top:var(--s2);--r:-2deg;--t:-4deg;--tw:38%}
.story .snap.r{--r:1.8deg;--t:3deg;--tw:32%}
.story .snap .pic img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:3px}
.evolve .snap{width:200px;margin-top:0}
.evolve .snap .pic img{object-fit:contain;filter:grayscale(1)}
@media (max-width:480px){.evolve{gap:10px;flex-wrap:nowrap}.evolve .snap{width:132px}.evolve .arrow{width:40px}}
.evolve .arrow{width:60px;height:36px;align-self:center}
@media (max-width:767px){
  /* phone: less empty space before the footer */
  .story{padding:var(--s3) 0 var(--s3)}
}

/* loading: full-screen cream, the little chef tossing the wok, gone in half a second. never covers the order button for long */
#loading{position:fixed;inset:0;z-index:50;background:var(--cream);display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity var(--fast) ease}
#loading.show{opacity:1;pointer-events:auto}
#loading img{width:min(44vw,220px);height:auto}

/* 404 */
.oops{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:var(--s2);padding:var(--s4) 0}
.oops img{width:min(60%,260px);height:auto}   /* height:auto — the 900×900 attributes were stretching the chef tall (fixed 2026-10-27) */
.oops .hero-go{font-size:34px}.oops .hero-go .sq{width:140px}.oops .hero-go .arr{position:absolute;left:100%;margin-left:12px}
.oops .hand{font-size:clamp(36px,5vw,58px)}

/* home page on a phone: tighter gaps between the sections (Di 2026-10-27: 间距是不是有点太大了) */
@media (max-width:767px){
  .hero{padding-bottom:var(--s1)}
  .sig,.how{padding:var(--s3) 0}
  footer.big{margin-top:0;padding-top:var(--s3)}
}
