/* =========================================================
   Factory Flow — landing page
   黑白極簡、Editorial × Brutalist 風格
   圖片素材取自 http://localhost:3001/
   ========================================================= */

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --line: #e5e5e5;
  --line-soft: #f1f1f1;
  --mute: #6b6b6b;
  --dark: #0a0a0a;
  --dark-ink: #ffffff;
  --radius-pill: 9999px;
  --radius-card: 18px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
  --shadow-lg: 0 1px 0 rgba(0,0,0,.06), 0 24px 60px rgba(0,0,0,.10);
  --maxw: 1180px;
  --gap-section: 120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "PingFang TC",
               "Noto Sans TC", "Helvetica Neue", "Microsoft JhengHei",
               Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.sr-only { position: absolute; left: -10000px; }

.page-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- 排版 ---------- */
.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 18px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-block;
}
.kicker.light { color: rgba(255,255,255,.7); }

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  margin-top: 18px;
}
h2 {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
p.subcopy {
  font-size: 18px;
  color: var(--mute);
  max-width: 60ch;
  margin-top: 18px;
}
p.subcopy.light { color: rgba(255,255,255,.78); }

.hero-underline {
  display: inline-block;
  margin-top: 8px;
  letter-spacing: -0.05em;
  color: var(--ink);
  width: 280px;
  max-width: 60%;
  border-bottom: 4px solid var(--ink);
}
.hl { background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.85) 60%); padding: 0 4px; }
.hl-orange { background: linear-gradient(180deg, transparent 60%, #ff6a1a 60%); padding: 0 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
}
.brand-img { height: 32px; width: auto; display: block; }
.brand-text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.brand-zh {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-en {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.site-header nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
  flex: 1;
  justify-content: center;
}
.site-header nav a {
  position: relative;
  padding: 6px 0;
  transition: color .15s ease;
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.site-header nav a:hover::after { transform: scaleX(1); }
.header-cta {
  flex-shrink: 0;
  padding: 8px 18px 8px 20px !important;
  font-size: 13px !important;
}
.header-cta .arrow { font-size: 14px; }

/* ---------- Pill button ---------- */
.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.pill-button:hover { transform: translateY(-1px); background: #000; }
.pill-button .arrow { font-size: 16px; }
.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
}
.pill-link.light { color: #fff; }

/* ---------- Waitlist form ---------- */
.waitlist-form { margin-top: 36px; }
.waitlist-fields {
  display: flex;
  gap: 10px;
  max-width: 520px;
}
.waitlist-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
}
.waitlist-input:focus { border-color: var(--ink); }
.waitlist-status { margin-top: 10px; font-size: 13px; color: var(--mute); min-height: 1em; }
.waitlist-status.ok { color: #0a8a3a; }
.waitlist-status.err { color: #b3261e; }
.btn-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--ink);
}
.pill-button .btn-dot {
  background: #fff;
  border-color: #fff;
  box-shadow: inset 0 0 0 6px var(--ink);
}

/* ---------- Hero trust chips ---------- */
.trust-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.trust-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13px;
  background: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 48px 0 32px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 600px at 90% 0%, rgba(0,0,0,.04), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(0,0,0,.03), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 24px;
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(42px, 5.5vw, 70px);
  line-height: 1.02;
  letter-spacing: -.04em;
}
.hero-copy .subcopy {
  max-width: 46ch;
  line-height: 1.7;
}
.hero-cta {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: gap .18s ease, opacity .18s ease;
}
.hero-text-link:hover {
  gap: 11px;
  opacity: .68;
}
.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(2%, -4%);
}
.hero-art img {
  width: 112%;
  max-width: 620px;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,.10));
}
.hero-trust {
  position: relative;
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding: 18px 0 0;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* ---------- Problem ---------- */
.section-light { padding: var(--gap-section) 0; }
.section-dark { padding: var(--gap-section) 0; }

.problem-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.problem-card {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 1 / 1;
  box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 6px 18px rgba(0,0,0,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 14px 32px rgba(0,0,0,.08);
}
.problem-card img {
  width: 100%;
  height: 100%;
  display: block;
  background: #fff;
  object-fit: cover;
}
.problem h3 {
  margin-top: 64px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- UI shot (Real UI 截圖) ---------- */
.ui-shot {
  margin-top: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}
.ui-shot img {
  width: 100%;
  display: block;
}
.example-tabs {
  margin-top: 40px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.ex-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--mute);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.ex-tab:hover { color: var(--ink); }
.ex-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.ex-panel {
  padding: 28px 0 0;
  max-width: 60ch;
}
.ex-panel h3 { font-size: 22px; margin-bottom: 10px; }
.ex-panel p { color: var(--mute); font-size: 16px; line-height: 1.6; margin: 0; }

/* ---------- Feature cards (Capabilities) ---------- */
.feature-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feature-card {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 6px 18px rgba(0,0,0,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 14px 32px rgba(0,0,0,.08);
}
.feature-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.feature-text {
  padding: 24px 28px 28px;
}
.feature-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--ink);
}
.feature-card p {
  color: var(--mute);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Control section ---------- */
.control {
  text-align: left;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.control h2 { max-width: 18ch; }

/* ---------- CTA + Terminal ---------- */
.cta {
  background: var(--dark);
  color: var(--dark-ink);
  position: relative;
  overflow: hidden;
}
.cta-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.cta h2 { color: #fff; font-size: clamp(36px, 4.6vw, 56px); }
.terminal {
  margin-top: 12px;
  background: #161616;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  overflow: hidden;
  max-width: 640px;
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.terminal-head .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-head .dot.red { background: #ff5f56; }
.terminal-head .dot.yellow { background: #ffbd2e; }
.terminal-head .dot.green { background: #27c93f; }
.terminal-head .term-title {
  margin-left: 8px;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-family: var(--font-mono);
}
.terminal-body {
  margin: 0;
  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
  white-space: pre-wrap;
  word-break: break-all;
}
.terminal-body code { color: #fff; }
.copy-btn {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  flex-shrink: 0;
  transition: background .15s ease;
}
.copy-btn:hover { background: rgba(255,255,255,.18); }
.copy-btn.copied { background: #2ea043; border-color: #2ea043; }

/* ---------- Footer ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 40px;
}
.footer-brand h2 {
  font-size: 22px;
  margin: 0 0 8px;
}
.footer-brand > p {
  font-size: 14px;
  color: var(--mute);
  margin: 0 0 16px;
  max-width: 50ch;
}
.footer-socials {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 12px;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.footer-socials a .social-logo {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}
.footer-socials a .patreon-logo { filter: invert(1); }
.footer-socials a:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.footer-socials a:hover .patreon-logo { filter: none; }
.footer-copy {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
}
.footer-marquee {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 24px;
  border-top: 1px solid var(--line-soft);
}
.bottom-brand {
  font-size: clamp(56px, 12vw, 160px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(0,0,0,.06);
  line-height: 1;
  text-align: center;
}

/* ---------- Subtle reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RWD ---------- */
@media (max-width: 960px) {
  .feature-grid,
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-copy h1 { max-width: 13ch; }
  .hero-art {
    transform: none;
    justify-content: flex-start;
  }
  .hero-art img {
    width: min(100%, 620px);
  }
  .hero-bottom { display: none; }
  .site-header nav { display: none; }
  .footer-marquee { padding: 32px 20px 16px; }
}
@media (max-width: 600px) {
  .feature-grid,
  .problem-grid { grid-template-columns: 1fr; }
  .site-header.home-header { padding: 12px 20px; }
  .page-shell { padding: 0 20px; }
  .hero { padding: 34px 0 24px; }
  .hero-copy h1 {
    font-size: clamp(40px, 14vw, 58px);
    line-height: 1.04;
  }
  .hero-copy .subcopy {
    font-size: 16px;
    line-height: 1.65;
  }
  .hero-trust {
    margin-top: 30px;
    gap: 14px;
  }
  .trust-label { width: 100%; }
  .terminal-body { font-size: 12px; }
}
