/* =============================================================================
 *  styles.css — 程引 · 赛博咖啡 · 极简白 / Minimal White
 *  Paper #FAFAF8 · ink #16181D · accent #004098. IBM Plex Mono + Noto Sans SC.
 *  Single 980px column · flat 1px borders · light only · WeChat-safe fallbacks.
 * ===========================================================================*/

:root {
  --bg:#FAFAF8;
  --ink:#16181D;
  --muted:#5A5F69;
  --faint:#6E7178;        /* readable faint — AA (4.6:1) on the paper bg; prototype used #9DA1A8 */
  --hairline-ink:#9DA1A8; /* the lighter gray, decorative use only (non-text) */
  --line:#E6E6E0;
  --rule:#16181D;          /* heavy section rule */
  --accent:#004098;
  --accent-soft:#F4F6FA;
  --chip-border:#D2D2CC;
  --panel:#FFFFFF;

  --maxw:980px;
  --pad:32px;

  --font-mono:'IBM Plex Mono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-sans:'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

/* ── Reset / base ───────────────────────────────────────────────────────── */
* { box-sizing:border-box; margin:0; padding:0; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body {
  background:var(--bg); color:var(--ink);
  font-family:var(--font-sans); font-size:16px; line-height:1.45; font-weight:400;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
h1, h2, h3 { font-weight:700; line-height:1.2; margin:0; }
p { margin:0; }
a { color:var(--accent); text-decoration:none; }
img { max-width:100%; display:block; }
button { font-family:inherit; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
::selection { background:var(--accent); color:#fff; }

.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }
@keyframes popin { 0%{opacity:0; transform:translateY(12px)} 100%{opacity:1; transform:translateY(0)} }

/* ── WeChat banner ──────────────────────────────────────────────────────── */
.wechat-banner {
  display:flex; gap:.5rem; align-items:flex-start;
  max-width:var(--maxw); margin:0 auto;
  padding:12px var(--pad);
  font-size:13px; color:var(--muted);
  background:var(--panel); border-bottom:1px solid var(--line);
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  max-width:var(--maxw); margin:0 auto;
  padding:22px var(--pad);
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  border-bottom:1px solid var(--line);
}
.brand { display:flex; align-items:center; gap:11px; color:inherit; }
.brand-mark {
  display:grid; place-items:center; width:30px; height:30px; flex:none;
  border:1.5px solid var(--ink); font-weight:700; font-size:15px; line-height:1;
}
.brand-mark.small { width:24px; height:24px; font-size:12px; border-width:1.3px; border-color:var(--hairline-ink); color:var(--hairline-ink); }
.brand-tag { font-family:var(--font-mono); font-size:11.5px; letter-spacing:.16em; color:var(--muted); }
.topbar-right { display:flex; align-items:center; gap:14px; }
.status {
  display:flex; align-items:center; gap:7px;
  font-family:var(--font-mono); font-size:11.5px; letter-spacing:.1em; color:var(--muted);
}
.live-dot { width:7px; height:7px; border-radius:50%; background:var(--accent); display:inline-block; animation:blink 2.4s ease-in-out infinite; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { max-width:var(--maxw); margin:0 auto; padding:80px var(--pad) 56px; }
.hero-eyebrow {
  font-family:var(--font-mono); font-size:11.5px; letter-spacing:.2em;
  color:var(--accent); text-transform:uppercase; margin-bottom:40px;
  white-space: pre-line;
}
.hero-name {
  font-weight:700; font-size:clamp(48px,9vw,92px); line-height:1; letter-spacing:-.01em;
  margin-bottom:14px;
}
.hero-name-en { font-weight:300; color:var(--faint); margin-left:.4em; font-size:.42em; letter-spacing:.02em; }
.hero-tagline { font-weight:500; font-size:clamp(20px,3vw,28px); line-height:1.5; max-width:20em; margin-bottom:20px; }
.hero-desc { font-size:16px; color:var(--muted); max-width:34em; margin-bottom:42px; }
.hero-cta { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:inherit; font-size:15px; font-weight:500; cursor:pointer;
  padding:14px 24px; border:1px solid transparent; border-radius:999px; transition:all .2s ease;
  text-align:center;
}
.btn-accent { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn-accent:hover { background:#00306f; border-color:#00306f; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 64, 152, 0.25); }
.btn-outline { background:transparent; color:var(--ink); border-color:var(--ink); }
.btn-outline:hover { background:var(--ink); color:var(--bg); }
.btn-lg { padding:16px 28px; font-size:16px; }
.btn:disabled { opacity:.55; cursor:default; }
.cup-ico { transform: translateY(2px); }

/* ── Section scaffold (numbered, 2-col) ─────────────────────────────────── */
.section {
  width: calc(100% - var(--pad) * 2);
  max-width: calc(var(--maxw) - var(--pad) * 2);
  margin: 0 auto 32px auto;
  padding: 34px 40px 38px;
  background: var(--panel);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}
.section-book { border-top:2px solid var(--rule); padding-top:56px; padding-bottom:56px; }
.contact-body .sec-title { font-size:clamp(22px,3.6vw,30px); margin-bottom:26px; }
.kicker { font-family:var(--font-mono); font-size:12px; letter-spacing:.1em; color:var(--accent); margin-bottom:12px; }
.sec-intro { color:var(--muted); margin-bottom:24px; }

/* ── Booking ────────────────────────────────────────────────────────────── */
.step { margin-bottom: 16px; }
.step:last-of-type { margin-bottom: 16px; }
.step-label { font-family:var(--font-mono); font-size:12.5px; color:var(--ink); margin-bottom:14px; }

/* topic chips marquee */
.chips-marquee {
  overflow: hidden; width: 100%; padding: 8px 0;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.chips.display-only {
  display: flex; width: max-content; flex-wrap: nowrap;
  animation: marquee 20s linear infinite;
  will-change: transform; transform: translateZ(0);
  backface-visibility: hidden;
}
.chips.display-only:hover { animation-play-state: paused; }
.chip {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500;
  padding: 8px 18px; cursor: default; white-space: nowrap;
  background: rgba(22, 24, 29, 0.04); color: var(--muted); 
  border: none; border-radius: 999px;
  flex-shrink: 0; margin-right: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chip:hover {
  background: rgba(22, 24, 29, 0.08); color: var(--ink);
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* cups - Apple-style segmented control container */
.cups { 
  display:grid; 
  background:rgba(22, 24, 29, 0.04); 
  border:none; 
  border-radius:18px; 
  padding: 6px; /* Space for the floating card */
  gap: 4px; /* Slight gap between options */
}
.cup {
  position: relative;
  display:flex; flex-direction:column; gap:4px; text-align:left; cursor:pointer; width:100%;
  background:transparent; border:none; border-radius: 12px;
  padding:16px 18px; 
  transition:all .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cup:hover { background:rgba(22, 24, 29, 0.03); }
.cup.is-on { 
  background:#fff; 
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 1;
}
/* A subtle blue dot for the active state to keep the brand color */
.cup::after {
  content: "";
  position: absolute; right: 18px; top: 22px; width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  transition:all .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cup.is-on::after {
  opacity: 1;
  transform: scale(1);
}
.cup-top { display:flex; align-items:baseline; gap:10px; }
.cup-name { font-weight:500; font-size:16px; }
.cup-time { font-family:var(--font-mono); font-size:12px; color:var(--faint); }
.cup-desc { font-size:13.5px; color:var(--muted); }

.picked-hint { font-family:var(--font-mono); font-size:11.5px; color:var(--faint); margin-top:14px; }

/* ── Hero masthead + booking counter (stacked) ──────────────────────────── */
.hero-book { max-width:var(--maxw); margin:0 auto; padding:72px var(--pad) 60px; }

/* centered masthead — symmetric margins, no lopsided whitespace */
.hb-masthead { text-align:center; max-width:680px; margin:0 auto 50px; }
.hb-masthead .hero-eyebrow { margin-bottom:22px; }
.hero-hello {
  font-weight:700; font-size:clamp(64px,11vw,128px); line-height:.98;
  letter-spacing:-.03em; margin-bottom:40px; color:var(--ink);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.hero-bio {
  font-size:16px; color:var(--muted); line-height:1.45;
  max-width:30em; margin:0 auto 24px; white-space:pre-line;
}
.hb-notes {
  display:inline-flex; align-items:center; gap:6px;
  font-size:15px; color:var(--accent);
}
.hb-notes:hover { text-decoration:underline; }

/* full-width "counter" panel — chips & cups laid out horizontally, stays short */
.hb-counter {
  background: var(--panel); border-radius: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.04); padding: 34px 40px 38px;
}
.counter-head { margin-bottom: 16px; }
.counter-head .kicker { margin-bottom:8px; }
.order-title { font-weight:700; font-size:clamp(22px,2.6vw,28px); }
.hb-counter .step:last-of-type { margin-bottom: 24px; }
.hb-counter .chip { white-space:nowrap; }
.hb-counter .cups { grid-template-columns:repeat(3,1fr); }
.counter-foot { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.counter-foot .picked-hint { margin:0; }

/* ── FAQ (centered, single column for better readability) ─────────────────────── */
.faq-list {
  display: flex; flex-direction: column; gap: 24px;
  max-width: 640px; margin: 0 auto;
}
.faq-item { padding: 0; border: none; }
.faq-q { font-weight: 600; font-size: 16px; margin: 0 0 6px 0; color: var(--ink); }
.faq-a { font-size: 14.5px; color: var(--muted); line-height: 1.45; margin: 0; }

/* ── Social Logos (Footer) ──────────────────────────────────────────────── */
.footer-logos {
  display: flex; gap: 16px; justify-content: center;
}
.c-logo-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(22, 24, 29, 0.04); border: none;
  color: var(--muted); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.c-logo-link:hover {
  background: rgba(22, 24, 29, 0.08); color: var(--ink); transform: translateY(-2px);
}
.contact-ico { width: 22px; height: 22px; flex: none; color: currentColor; }
.zhihu-badge {
  display: grid; place-items: center; width: 22px; height: 22px;
  background: transparent; color: currentColor;
  font-family: var(--font-sans); font-weight: 700; font-size: 15px; line-height: 1;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  padding: 80px var(--pad) 200px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.footer-top {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--faint);
  transition: color 0.2s ease;
}
.footer-top:hover { color: var(--ink); }





/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width:680px) {
  :root { --pad:20px; }
  .brand-tag { display:none; }
  .status { display:none; }
  .topbar { padding-top:16px; padding-bottom:16px; }

  /* hero / masthead — scale the headline down, loosen the long eyebrow quote */
  .hero-book { padding:40px var(--pad) 44px; }
  .hb-masthead { margin-bottom:34px; }
  .hb-masthead .hero-eyebrow { font-size:12px; letter-spacing:.08em; line-height:2; margin-bottom:18px; }
  .hero-hello { font-size:clamp(44px,13vw,64px); margin-bottom:28px; }
  .hero-bio { font-size:15px; line-height:1.6; max-width:26em; }

  /* counter — tighter padding, single-column cups, full-width action */
  .hb-counter { padding:24px 20px 28px; }
  .counter-head { margin-bottom:22px; padding-bottom:18px; }
  .hb-counter .cups { grid-template-columns:1fr; }
  .counter-foot { flex-direction:column; align-items:stretch; gap:14px; }
  .counter-foot .btn { width:100%; }
  .counter-foot .picked-hint { text-align:center; }

  /* sections */
  .section { padding: 24px 20px 28px; }
  .faq-list { gap: 32px; }

  /* section gaps on very narrow screens */
  .footer { padding: 40px var(--pad) 100px; }

}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *:not(.chips), *::before, *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* ── Adaptive Full-Screen Layout for Desktop ────────────────────────────── */
@media (min-width: 900px) and (min-height: 700px) {
  html, body { min-height: 100vh; }
  body { 
    display: flex; flex-direction: column; 
  }
  main { 
    flex: 1; display: flex; flex-direction: column; 
    justify-content: center; /* Center everything vertically */
    padding-top: 2vh;
  }
  
  .hero-book {
    padding: 0 var(--pad) 2vh;
    margin: 0 auto;
  }
  #faq {
    margin: 0 auto;
  }

  /* Compress vertical spaces using viewport height (vh) units */
  .hb-masthead { margin-bottom: 3vh; }
  .hero-eyebrow { margin-bottom: 1.5vh; }
  .hero-hello { margin-bottom: 3.5vh; }
  .hero-bio { margin-bottom: 2vh; line-height: 1.6; }
  
  .hb-counter { padding: 3vh 40px; }
  .counter-head { margin-bottom: 2vh; padding-bottom: 0; }
  .counter-head .kicker { margin-bottom: 0.5vh; }
  
  .step { margin-bottom: 2vh; }
  .hb-counter .step:last-of-type { margin-bottom: 2vh; }
  
  .cup { padding: 1.2vh 1.5vh; }
  
  .section { padding: 2vh 40px; }
  
  /* Make FAQ 2 columns on desktop to halve its vertical height */
  .faq-list { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5vh 40px; 
    align-items: start;
  }
  .faq-q { margin-bottom: 0.5vh; }
  
  .footer {
    padding: 2vh var(--pad) 10vh;
  }
}
