/*
 * mmgs.app — the company page's one stylesheet. No scripts, no web fonts, no
 * third-party requests; the Content-Security-Policy in ../_headers holds the
 * site to that (style-src 'self', so no inline styles either).
 *
 * Same paper, ink and hairlines as scout.mmgs.app, and no accent colour: the
 * only colours on the page come from the company mark, the two product icons
 * and the three product screens. Every text/background pair clears WCAG AA
 * (lowest: secondary text 6.92:1 light and 8.72:1 dark; store-link border
 * 3.42:1 and 3.91:1). Weights are 400 and 700 only: Microsoft JhengHei, which
 * the page's first reader sees, has nothing in between.
 */

:root{
  color-scheme:light dark;
  --bg:#fff8ec; --surface:#f7eedd; --text:#241c16; --text-2:#5d554e; --edge:#8f857b;
  --hairline:rgb(36 28 22 / .12); --frame:rgb(36 28 22 / .12); --ring:rgb(36 28 22 / .2);
  --btn-bg:#241c16; --btn-fg:#fff8ec; --btn-hover:#40342a;
  --shadow:0 1px 2px rgb(36 28 22 / .10), 0 14px 30px rgb(36 28 22 / .16);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang TC","Noto Sans TC","Microsoft JhengHei",sans-serif;
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#14100c; --surface:#1c1611; --text:#f5ede2; --text-2:#b6afa6; --edge:#7a7067;
    --hairline:rgb(255 235 210 / .14); --frame:#7a7067; --ring:rgb(255 235 210 / .22);
    --btn-bg:#f5ede2; --btn-fg:#14100c; --btn-hover:#ffffff;
    --shadow:0 1px 2px rgb(0 0 0 / .4), 0 14px 30px rgb(0 0 0 / .45);
  }
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--text);font:400 17px/1.8 var(--font);-webkit-font-smoothing:antialiased}
:where(p,h1,h2,h3,figure,ul){margin:0;padding:0}
:where(ul){list-style:none}
:where(img){display:block}
:focus-visible{outline:2px solid var(--text);outline-offset:3px;border-radius:6px}
.btn:focus-visible,.skip:focus-visible{border-radius:12px}

.wrap{width:min(100% - 40px,1080px);margin-inline:auto}

/* Hidden until a keyboard reaches it, then the first stop on the page. */
.skip{position:absolute;left:16px;top:-72px;z-index:5;display:inline-flex;align-items:center;min-height:44px;padding:0 16px;
  border-radius:12px;background:var(--btn-bg);color:var(--btn-fg);font:700 16px/1.3 var(--font);text-decoration:none}
.skip:focus{top:12px}

.hd{display:flex;align-items:center;gap:12px;padding-block:16px}
.logo{width:40px;height:40px;flex:none}
.wm{font:700 20px/1 var(--font)}

.op{padding-block:28px 36px}
.h1{font:700 clamp(30px,19px + 2.6vw,44px)/1.2 var(--font);letter-spacing:-.01em;text-wrap:balance;overflow-wrap:break-word}
/* Keeps a short run on one line: the last word of the operator's name with "LLC",
   a product name, a status word. Only for runs a narrow phone can always fit. */
.nw{white-space:nowrap}
/* One line of fact under the operator's name, if the owner ever adds one. */
.fact{margin-top:8px;font-size:16px;line-height:1.6;color:var(--text-2)}
.lede{margin-top:12px;max-width:40em;text-wrap:pretty}

.sec{border-top:1px solid var(--text);padding-block:22px 44px}
.lab{font:700 15px/1.4 var(--font);letter-spacing:.2em;color:var(--text-2)}
.sec-body{margin-top:20px}

.prod + .prod{margin-top:36px;padding-top:32px;border-top:1px solid var(--hairline)}
.prod-hd{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.prod-hd picture{flex:none}
.prod-icon{width:48px;height:48px;flex:none}
/* Dr.MMG's icon is a full-bleed square almost the colour of the paper. */
.prod-icon--sq{border-radius:22%;box-shadow:0 0 0 1px var(--ring)}
.name{font:700 22px/1.3 var(--font)}
/* The word carries the status; the dot only echoes it. */
.st{display:inline-flex;align-items:center;gap:7px;font:700 14px/1 var(--font);letter-spacing:.08em}
.st::before{content:"";width:9px;height:9px;border-radius:50%;background:currentColor}
.st--dev{color:var(--text-2)}
.st--dev::before{background:none;border:2px solid currentColor}
.desc{margin-top:14px;max-width:42em;text-wrap:pretty}
/* A line break that only happens from 768px up, where the sentence has room to
   break after its comma. On a phone the text wraps by itself. */
.brk{display:none}

/* The three product screens. On a phone they are one row that scrolls sideways,
   with the next screen showing at the edge; tabindex="0" in the HTML lets the
   arrow keys scroll it. From 768px up they sit side by side. */
.shots{display:flex;gap:12px;margin:22px -20px 0;padding:4px 20px 30px;overflow-x:auto;
  scroll-snap-type:x proximity;scroll-padding-inline:20px;-webkit-overflow-scrolling:touch}
.shots::after{content:"";flex:0 0 8px}
.shot{flex:0 0 232px;scroll-snap-align:start}
.shot img{width:100%;height:auto;aspect-ratio:720/1178;border-radius:18px;box-shadow:0 0 0 1px var(--frame),var(--shadow)}
.shot figcaption{margin-top:12px;font-size:15px;line-height:1.5;color:var(--text-2)}
.note{font-size:15px;line-height:1.7;color:var(--text-2)}

/* Links under a product: the way out to its own site, then (once the stores
   approve) one .btn--store per store, then the text links. */
.links{display:flex;flex-wrap:wrap;gap:10px 24px;margin-top:22px}
.l-btn{flex:1 0 100%}
.btn{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:0 18px;border-radius:12px;
  font:700 16px/1.3 var(--font);text-decoration:none;transition:background-color .12s ease,border-color .12s ease}
.btn--go{background:var(--btn-bg);color:var(--btn-fg)}
.btn--go:hover{background:var(--btn-hover)}
.btn--store{border:1px solid var(--edge);color:var(--text);font-weight:400}
.btn--store:hover{background:var(--surface);border-color:var(--text)}
.ico{width:16px;height:16px;flex:none}
.tl{display:inline-flex;align-items:center;min-height:44px;font-size:15px;line-height:1.4;color:var(--text-2);
  text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.24em;transition:color .12s ease}
.tl:hover{color:var(--text);text-decoration-thickness:2px}

.mail{display:inline-flex;align-items:center;min-height:44px;font:700 22px/1.3 var(--font);color:var(--text);
  text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.2em;overflow-wrap:anywhere}
.mail:hover{text-decoration-thickness:4px}
.sec--contact .desc{margin-top:6px}

.ft{border-top:1px solid var(--hairline);padding-block:22px 40px;font-size:14px;line-height:1.7;color:var(--text-2)}

/* The page a wrong address gets (404.html). */
.nf{padding-bottom:72px}

@media (min-width:768px){
  .wrap{width:min(100% - 64px,1080px)}
  .shots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:26px 0 0;padding:0;overflow:visible}
  .shots::after{content:none}
  .shot{max-width:360px}
  .note{margin-top:18px}
  .links{gap:4px 12px;margin-top:24px}
  .links::before{content:"";flex-basis:100%;height:0;order:1}
  .l-btn{flex:0 0 auto}
  .l-txt{order:2}
  .l-txt + .l-txt{margin-left:12px}
  .btn{display:inline-flex;justify-content:center}
  .brk{display:inline}
}
@media (min-width:1024px){
  .wrap{width:min(100% - 96px,1080px)}
  .hd{gap:14px;padding-block:24px}
  .logo{width:48px;height:48px}
  .wm{font-size:22px}
  .op{padding-block:40px 56px}
  .fact{font-size:17px}
  .lede{margin-top:16px;font-size:19px;line-height:1.7}
  .sec{display:grid;grid-template-columns:18.5% minmax(0,1fr);padding-block:36px 64px}
  .sec-body{margin-top:0}
  .desc{text-wrap:balance}
  .sec--products .lab{padding-top:18px}
  .sec--contact .lab{padding-top:12px}
  .prod-icon{width:56px;height:56px}
  .name{font-size:24px}
  .prod + .prod{margin-top:44px;padding-top:40px}
  .shots{gap:24px;margin-top:28px}
  .mail{font-size:26px}
  .ft{display:flex;justify-content:space-between;gap:32px;padding-block:24px 48px}
  .nf{padding-bottom:96px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none !important}
}
