/* Easy Class Manager 首頁。色調與系統（public/index.html 的 :root）相同；tests/site.test.js 會核對數值。 */
:root{
  --bg:#FDFBF3; --side:#F5F0E1; --surface:#FFFFFF; --surface2:#FAF7EC;
  --ink:#1E2A3A; --muted:#666A73; --line:#E7E0CA; --line2:#EFEADB;
  --navy:#1F3A68; --navy-ink:#FFFFFF; --navy-hover:#18305A;
  --sky:#E3EEFA; --sky-ink:#1F4E86; --link:#2F6FB3;
  --orange:#E8791B; --orange-bg:#FFE3C7; --orange-ink:#8A4308;
  --ok:#2F7D4F; --ok-bg:#E3F2E6;
  --shadow:0 1px 2px rgba(40,34,10,.06),0 4px 14px rgba(40,34,10,.06);
  --radius:10px;
  --c-green-b:#E7F2DC; --c-green-l:#86B862;
  --c-blue-b:#DDEBF8;  --c-blue-l:#6C9ED3;
  --c-lilac-b:#EDE4F7; --c-lilac-l:#A088CE;
  --c-peach-b:#FCE8D7; --c-peach-l:#DE9A66;
  --c-teal-b:#D9F0EC;  --c-teal-l:#58AE9F;
  --c-pink-b:#F8E1E7;  --c-pink-l:#D38499;
  --c-yellow-b:#FAF1CD;--c-yellow-l:#C9A93F;
  --top:56px;
  color-scheme: light;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--top) + 12px);-webkit-text-size-adjust:100%}
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto} *{transition:none !important} }
body{margin:0;background:var(--bg);color:var(--ink);font:400 16px/1.7 "Noto Sans TC","PingFang HK","Microsoft JhengHei",system-ui,sans-serif;padding-top:var(--top)}
img{max-width:100%;height:auto;display:block}
a{color:var(--link)}
h1,h2,h3,p,ul,ol,figure{margin:0}
ul,ol{padding:0;list-style:none}
.wrap{max-width:1120px;margin:0 auto;padding:0 20px}
.narrow{max-width:760px}
.center{text-align:center}
.muted{color:var(--muted)}
.nb{white-space:nowrap}
.skip{position:absolute;left:-999px;top:0;background:var(--navy);color:#fff;padding:8px 14px;z-index:30;border-radius:0 0 8px 0}
.skip:focus{left:0}
:focus-visible{outline:3px solid var(--orange);outline-offset:2px;border-radius:6px}

/* ---- buttons ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 22px;border-radius:999px;border:1.5px solid var(--navy);color:var(--navy);background:transparent;font-weight:500;font-size:16px;text-decoration:none;transition:background .15s,color .15s}
.btn:hover{background:var(--sky)}
.btn.primary{background:var(--navy);color:var(--navy-ink)}
.btn.primary:hover{background:var(--navy-hover)}
.btn.sm{min-height:38px;padding:0 18px;font-size:15px}

/* ---- top bar (fixed, so it stays on screen on a phone) ---- */
.top{position:fixed;inset:0 0 auto 0;height:var(--top);z-index:20;background:rgba(253,251,243,.94);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.top-in{height:100%;display:flex;align-items:center;gap:16px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:700;font-size:17px;letter-spacing:.01em;margin-right:auto;white-space:nowrap}
.mark{width:30px;height:30px;flex:none}
.top-nav{display:none;gap:22px}
.top-nav a{color:var(--ink);text-decoration:none;font-size:15px}
.top-nav a:hover{color:var(--link)}
@media (min-width:900px){ .top-nav{display:flex} .brand{margin-right:28px} .top-nav{margin-right:auto} }

/* ---- hero ---- */
.hero{padding:36px 0 28px;overflow:hidden}
.hero-in{display:grid;gap:36px}
.eyebrow{color:var(--orange-ink);background:var(--orange-bg);display:inline-block;padding:2px 12px;border-radius:999px;font-size:14px;font-weight:500;margin-bottom:14px}
/* two fixed lines: the size follows the width so that neither line ever wraps (11 characters in the longer one) */
h1{font-size:clamp(20px,calc((100vw - 40px) / 11.5),42px);line-height:1.3;font-weight:700;letter-spacing:.01em}
h1 span{display:block;white-space:nowrap;word-break:keep-all}
.lead{font-size:clamp(17px,4.4vw,20px);color:var(--muted);margin-top:14px;max-width:30em}
.cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.note{color:var(--muted);font-size:14.5px;margin-top:16px}
@media (min-width:900px){ .hero{padding:64px 0 48px} .hero-in{grid-template-columns:minmax(0,5fr) minmax(0,6fr);align-items:center;gap:48px}
  h1{font-size:clamp(28px,calc((min(100vw, 1120px) - 88px) * .0395),42px)} }

/* devices drawn in CSS: a laptop with a phone overlapping its corner */
.devices{position:relative;padding:0 0 26px 0;margin-right:8px}
.laptop .screen{border:10px solid #232A36;border-bottom-width:12px;border-radius:14px 14px 4px 4px;background:#232A36;box-shadow:var(--shadow);overflow:hidden}
.laptop .screen img{border-radius:4px;aspect-ratio:1440/900;object-fit:cover;object-position:top left;width:100%;background:var(--surface2)}
.laptop .base{height:12px;margin:0 -5%;background:linear-gradient(#D9D4C5,#BDB7A6);border-radius:2px 2px 12px 12px;position:relative}
.laptop .base::after{content:"";position:absolute;left:50%;top:0;width:16%;height:5px;transform:translateX(-50%);background:#A9A392;border-radius:0 0 6px 6px}
.phone{position:absolute;right:-6px;bottom:0;width:25%;min-width:86px;padding:5px;background:#232A36;border-radius:16px;box-shadow:0 8px 24px rgba(30,42,58,.28)}
.phone .screen{border-radius:12px;overflow:hidden;background:var(--surface2)}
.phone .screen img{aspect-ratio:390/844;object-fit:cover;object-position:top;width:100%}
@media (min-width:600px){ .phone{padding:7px;border-radius:22px} .phone .screen{border-radius:16px} }

/* ---- sections ---- */
.sec{padding:64px 0}
/* light sections alternate 米白 (the page) and a lighter 米白 (half-way to white); a 1px line between two light sections */
.white{background:color-mix(in srgb,var(--surface) 50%,var(--bg))}
.sec:not(.dark){border-top:1px solid var(--line)}
.dark + .sec{border-top:0}
.h{font-size:clamp(24px,6vw,32px);line-height:1.3;font-weight:700;text-align:center}
.sub{color:var(--muted);text-align:center;margin-top:8px}
@media (min-width:900px){ .sec{padding:96px 0} }

/* ---- three points ---- */
.points{padding:16px 0 56px}
.grid3{display:grid;gap:16px}
@media (min-width:800px){ .grid3{grid-template-columns:repeat(3,1fr);gap:20px} }
.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow)}
.card h2{font-size:19px;line-height:1.4;margin:14px 0 6px}
.card p{color:var(--muted);font-size:15.5px}
.ico{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--b);color:var(--ink)}
.ico svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.c-green{--b:var(--c-green-b);--l:var(--c-green-l)} .c-blue{--b:var(--c-blue-b);--l:var(--c-blue-l)} .c-lilac{--b:var(--c-lilac-b);--l:var(--c-lilac-l)}
.c-peach{--b:var(--c-peach-b);--l:var(--c-peach-l)} .c-teal{--b:var(--c-teal-b);--l:var(--c-teal-l)} .c-pink{--b:var(--c-pink-b);--l:var(--c-pink-l)} .c-yellow{--b:var(--c-yellow-b);--l:var(--c-yellow-l)}

/* ==== from 示範 to 常見問題 ====
   Only the app's :root colours; the single accent colour is orange (--orange for lines and marks, --orange-ink for text). */

/* ---- section labels ---- */
.sec .eyebrow{display:table;margin:0 auto 12px}

/* ---- fade-in: only when JS runs and the visitor has not asked for less motion; otherwise always visible ---- */
.js .reveal{opacity:0;transform:translateY(12px);transition:opacity .4s ease,transform .4s ease}
.js .reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion: reduce){ .js .reveal{opacity:1;transform:none;transition:none} }

/* ---- tick lists ---- */
.ticks{margin-top:14px}
.ticks li{position:relative;padding-left:26px;font-size:15.5px}
.ticks li + li{margin-top:6px}
.ticks li::before{content:"";position:absolute;left:3px;top:.42em;width:12px;height:7px;border-left:2.5px solid var(--orange);border-bottom:2.5px solid var(--orange);transform:rotate(-45deg)}

/* ---- demo: a white band; the text and tabs on it, the screenshot on a navy "stage" ---- */
.band .wrap{max-width:1360px}
/* stage: a 160deg navy gradient with faint white dots; the screenshot overhangs its bottom edge and has a soft white glow */
.stage{position:relative;border-radius:24px;padding:40px 40px 0;margin-bottom:24px;background:radial-gradient(color-mix(in srgb,var(--surface) 6%,transparent) 1.2px,transparent 1.6px) 0 0/16px 16px,linear-gradient(160deg,var(--navy),color-mix(in srgb,var(--navy) 90%,var(--surface)))}
.stage .frame{margin-bottom:-24px;box-shadow:0 0 0 1px color-mix(in srgb,var(--surface) 22%,transparent),0 0 70px 6px color-mix(in srgb,var(--surface) 20%,transparent),0 24px 50px color-mix(in srgb,var(--ink) 40%,transparent)}
.tall .stage{justify-self:center;width:100%;max-width:340px;display:grid}
@media (max-width:640px){
  .stage{border-radius:16px;padding:16px 16px 0;margin-bottom:16px}
  .stage .frame{margin-bottom:-16px}
}

.tabs{display:none;gap:8px;overflow-x:auto;padding:4px 20px 14px;margin:0 -20px;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.js .tabs{display:flex}
@media (min-width:900px){ .tabs{justify-content:center;flex-wrap:wrap;overflow:visible} }
.tabs button{flex:none;font:inherit;font-size:15px;font-weight:500;min-height:42px;padding:0 16px;border-radius:999px;border:1.5px solid color-mix(in srgb,var(--navy) 22%,transparent);background:var(--surface);color:var(--navy);cursor:pointer}
.tabs button:hover{border-color:var(--navy)}
.tabs button[aria-selected="true"]{background:var(--navy);border-color:var(--navy);color:var(--navy-ink)}

.shot{margin-top:28px;display:grid;gap:22px;align-items:center}
.js .shot{display:none;margin-top:14px}
.js .shot.on{display:grid;animation:shot-in .4s ease both}
@keyframes shot-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){ .js .shot.on{animation:none} }
.shot-copy{max-width:860px}
@media (min-width:900px){
  .shot-copy{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:4px 48px;align-items:start;max-width:none}
  .shot-copy .shot-no,.shot-copy h3{grid-column:1}
  .shot-copy figcaption{grid-column:1}
  .shot-copy .ticks{grid-column:2;grid-row:1 / span 3;align-self:end;margin-top:0}
  .shot.tall{grid-template-columns:minmax(0,1fr) auto;gap:56px}
  .shot.tall .shot-copy{display:block}
}
.shot-copy h3{font-size:clamp(21px,5vw,26px);line-height:1.35;margin-top:4px}
.shot-no{font-weight:700;font-size:14px;letter-spacing:.1em;color:var(--orange-ink)}
.shot figcaption{margin-top:8px;color:var(--ink);font-size:16.5px}

.frame{position:relative;border-radius:12px;overflow:hidden;background:var(--surface);box-shadow:0 2px 6px color-mix(in srgb,var(--navy) 18%,transparent),0 28px 60px color-mix(in srgb,var(--navy) 28%,transparent)}
.chrome{display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;background:var(--surface2);border-bottom:1px solid var(--line)}
.chrome i{width:10px;height:10px;border-radius:50%;background:var(--line);flex:none}
.chrome i:nth-child(1){background:var(--c-pink-l)} .chrome i:nth-child(2){background:var(--c-yellow-l)} .chrome i:nth-child(3){background:var(--c-green-l)}
.chrome span{margin-left:10px;flex:1;max-width:280px;height:20px;border-radius:6px;background:var(--surface);border:1px solid var(--line2);font-size:11.5px;line-height:18px;color:var(--muted);padding:0 10px;overflow:hidden;white-space:nowrap}
.frame img,.frame video{display:block;width:100%;height:auto;aspect-ratio:1440/900;object-fit:cover;object-position:top left;background:var(--surface2)}
.tall .frame{max-width:260px;width:100%;justify-self:center;border-radius:28px;border:8px solid var(--ink)}
.tall .frame img,.tall .frame video{aspect-ratio:390/844}
/* 全螢幕：each clip can be opened full screen (main.js adds the button) */
.zoom{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;gap:6px;min-height:38px;padding:0 14px;border:0;border-radius:999px;background:color-mix(in srgb,var(--ink) 78%,transparent);color:var(--surface);font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.zoom:hover{background:var(--ink)}
.zoom svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.frame:fullscreen{display:grid;place-items:center;background:var(--ink);border-radius:0;border:0}
.frame:fullscreen .chrome{display:none}
.frame:fullscreen img,.frame:fullscreen video{width:100%;height:100%;object-fit:contain;aspect-ratio:auto;background:var(--ink)}

/* ---- features: three highlights side by side with a cropped screenshot, then small icon tiles ---- */
.spot{display:grid;gap:22px;align-items:center;margin-top:44px}
@media (min-width:900px){ .spot{grid-template-columns:minmax(0,6fr) minmax(0,5fr);gap:56px;margin-top:64px} .spot.flip .spot-pic{order:2} }
.spot-pic{border-radius:20px;padding:22px;background:var(--b)}
/* a window onto one part of a 1440×900 screenshot: the picture is enlarged and shifted inside a 4:3 frame
   (same 16:10 shape as the screenshot, so left = −x/1440 × zoom and top = −y/900 × zoom) */
.crop{position:relative;aspect-ratio:16/10;overflow:hidden;border-radius:10px;background:var(--surface);box-shadow:var(--shadow)}
.crop img{position:absolute;max-width:none;height:auto}
.crop-renew img{width:257%;left:-53.5%;top:-64.3%}
.crop-sales img{width:173%;left:-27.6%;top:-11.5%}
.crop-pay img{width:144%;left:-22%;top:0}
.spot-tag{color:var(--orange-ink);font-weight:700;font-size:14px;letter-spacing:.06em}
.spot-copy h3{font-size:clamp(23px,5.4vw,30px);line-height:1.3;margin-top:4px}
.spot-copy > p:not(.spot-tag){color:var(--muted);margin-top:10px;font-size:16.5px}

/* 其他功能: set apart from the three highlights above by a line, more space and its own heading */
.more{margin-top:72px;padding-top:64px;border-top:1px solid var(--line)}
.more .eyebrow{display:table;margin:0 auto 10px}
.minis-h{font-size:clamp(20px,5vw,24px);line-height:1.35;text-align:center;font-weight:700}
.more .sub{margin-top:6px}
@media (min-width:900px){ .more{margin-top:96px;padding-top:80px} }
.minis{display:grid;gap:12px;margin-top:28px}
.minis{grid-template-columns:repeat(2,1fr)}
@media (min-width:1000px){ .minis{grid-template-columns:repeat(4,1fr)} }
.minis li{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px 18px}
.minis b{display:block;margin-top:10px;font-size:16px}
.minis li > span:last-child{display:block;color:var(--muted);font-size:14.5px;margin-top:2px}
.mi{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--b);color:var(--ink)}
.mi svg,.si svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---- security: dark section ---- */
.dark{background:var(--ink);color:var(--surface)}
.dark .h{color:var(--surface)}
.dark .sub{color:var(--line)}
.secure{display:grid;gap:14px;margin-top:32px}
@media (min-width:700px){ .secure{grid-template-columns:repeat(2,1fr);gap:16px} }
@media (min-width:1000px){ .secure{grid-template-columns:repeat(3,1fr)} }
.secure li{background:color-mix(in srgb,var(--surface) 7%,transparent);border:1px solid color-mix(in srgb,var(--surface) 14%,transparent);border-radius:14px;padding:18px 20px}
.si{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:color-mix(in srgb,var(--orange) 22%,transparent);color:var(--orange-bg);margin-bottom:12px}
.secure b{display:block;font-weight:700;color:var(--surface)}
.secure li > span:last-child{display:block;color:var(--line);font-size:15px;margin-top:2px}
.sec-more{text-align:center;margin-top:26px;color:var(--line)}
.dark a{color:var(--orange-bg)}

/* ---- pricing ---- */
.price{display:grid;gap:16px;margin:28px auto 0;max-width:920px;align-items:stretch}
@media (min-width:760px){ .price{grid-template-columns:repeat(3,1fr);align-items:center} }
.plan{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:24px 22px;text-align:center;position:relative}
/* phone: 正式方案 comes first; from 760px the three sit side by side in page order (新開業、正式方案、額外分校) */
.plan.best{border:2px solid var(--navy);order:-1}
@media (min-width:760px){ .plan.best{order:0} }
.plan h3{font-size:16px;font-weight:500;color:var(--muted)}
.amt{font-size:32px;font-weight:700;line-height:1.4;margin-top:4px;font-variant-numeric:tabular-nums}
.amt small{font-size:15px;font-weight:400;color:var(--muted)}
.alt-amt{color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums}
.avg{color:var(--muted);font-size:14.5px;font-variant-numeric:tabular-nums}
.plan .terms{color:var(--muted);font-size:14px;line-height:1.6;margin-top:10px;text-align:left}
.badge{display:inline-block;margin:0 auto 10px;padding:3px 14px;border-radius:999px;background:var(--orange);color:var(--navy-ink);font-size:14px;font-weight:700}
.trial{margin-top:24px;font-size:17px;color:var(--ok)}
.sub + .price{margin-top:26px}
/* 正式方案: filled navy and a little larger */
.plan.best{background:var(--navy);color:var(--navy-ink);padding:30px 24px;box-shadow:0 18px 40px color-mix(in srgb,var(--navy) 35%,transparent)}
.plan.best h3,.plan.best .amt small,.plan.best .avg{color:var(--sky)}
.plan.best .alt-amt{color:var(--navy-ink)}
.plan.best .amt{font-size:40px}

/* ---- steps ---- */
.steps{counter-reset:s;display:grid;gap:14px;margin:28px 0}
@media (min-width:800px){ .steps{grid-template-columns:repeat(3,1fr);gap:20px} }
.steps li{counter-increment:s;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px 20px 18px 66px;position:relative}
.steps li::before{content:counter(s);position:absolute;left:18px;top:18px;width:34px;height:34px;border-radius:50%;background:var(--orange);color:var(--navy-ink);display:grid;place-items:center;font-weight:700}
.steps b{display:block}
.steps span{color:var(--muted);font-size:15px}

/* ---- FAQ ---- */
details{background:var(--surface);border:1px solid var(--line);border-radius:12px;margin-top:10px}
#faq .h{margin-bottom:22px}
summary{cursor:pointer;padding:15px 44px 15px 18px;font-weight:500;list-style:none;position:relative}
summary::-webkit-details-marker{display:none}
summary::after{content:"";position:absolute;right:20px;top:50%;width:9px;height:9px;border-right:2px solid var(--orange);border-bottom:2px solid var(--orange);transform:translateY(-70%) rotate(45deg);transition:transform .15s}
details[open] summary::after{transform:translateY(-30%) rotate(-135deg)}
details p{padding:0 18px 16px;color:var(--muted)}

/* ---- footer ---- */
.foot{border-top:1px solid var(--line);padding:26px 0 calc(26px + env(safe-area-inset-bottom));font-size:15px;color:var(--muted)}
.foot-in{display:flex;flex-direction:column;gap:10px;align-items:center;text-align:center}
.foot nav{display:flex;gap:20px}
@media (min-width:760px){ .foot-in{flex-direction:row;justify-content:space-between} }

/* ---- 私隱政策／服務條款 ---- */
.doc{padding:40px 0 64px}
.doc h1{font-size:30px;margin-bottom:6px}
.doc h2{font-size:19px;margin:28px 0 6px}
.doc p{margin-top:6px}
.doc h3{font-size:16.5px;margin:20px 0 4px}
.doc .meta{color:var(--muted);margin-top:2px}
.doc ul,.doc ol{margin:8px 0 0;padding-left:1.4em}
.doc ul{list-style:disc}
.doc ol{list-style:decimal}
.doc li + li{margin-top:4px}
.doc code{font-size:.92em;background:var(--surface2);border:1px solid var(--line2);border-radius:4px;padding:0 4px}
.doc .table-wrap{overflow-x:auto;margin-top:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.doc table{border-collapse:collapse;width:100%;font-size:15px;min-width:480px}
.doc th,.doc td{text-align:left;vertical-align:top;padding:9px 12px;border-bottom:1px solid var(--line2)}
.doc th{background:var(--surface2);font-weight:500}
.doc tr:last-child td{border-bottom:0}
