/* InvisPlan | engineered-tech theme: graphite, hairline grid, one electric-cyan accent. */
:root {
  --bg: #07090c;
  --surface: rgba(255, 255, 255, 0.025);
  --ink: #e8edf2;
  --muted: #8a95a3;
  --line: rgba(190, 210, 235, 0.13);
  --line-strong: rgba(190, 210, 235, 0.28);
  --accent: #35d8ff;
  --red: #ff3b4e;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(20px, 5vw, 64px);
  --max: 1280px;
  --font: "Space Grotesk", "Noto Sans TC", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #04070a; }

/* BACKGROUND: hairline grid + slow scan beam */
.grid-bg {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 85%);
}
.scan {
  position: fixed; left: 0; right: 0; top: 0; height: 120px; z-index: -2; pointer-events: none;
  background: linear-gradient(transparent, rgba(53, 216, 255, 0.025) 80%, rgba(53, 216, 255, 0.16) 99%, transparent);
  animation: scan 9s linear infinite;
}
@keyframes scan { from { transform: translateY(-120px); } to { transform: translateY(100vh); } }

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 40;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  transform-origin: left; transform: scaleX(0);
  animation: grow linear both; animation-timeline: scroll(root);
}
@keyframes grow { to { transform: scaleX(1); } }

.cursor-glow {
  position: fixed; left: 0; top: 0; width: 380px; height: 380px; margin: -190px 0 0 -190px;
  z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 216, 255, 0.08), transparent 65%);
  transform: translate(var(--mx, -999px), var(--my, -999px));
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 68px; padding: 0 var(--pad);
  background: rgba(7, 9, 12, 0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 36px; width: auto; filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-weight: 600; font-size: 13px; letter-spacing: 0.32em; }
.brand-text i { font-style: normal; font-size: 12px; color: var(--muted); letter-spacing: 0.4em; }
.nav-links { display: flex; gap: 36px; font-size: 14px; font-weight: 500; font-family: var(--mono); letter-spacing: 0.04em; }
.nav-links a { position: relative; padding: 4px 0; color: var(--muted); transition: color 0.3s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* BUTTONS */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 26px; background: var(--accent); color: #04070a;
  font-weight: 700; font-size: 16px; white-space: nowrap; border: 1px solid var(--accent);
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.3s, color 0.3s, background 0.3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { box-shadow: 0 0 0 4px rgba(53, 216, 255, 0.18); }
.btn:active { transform: scale(0.97); }
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(6px); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 20px 38px; font-size: 18px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* HERO */
.hero {
  max-width: var(--max); margin: 0 auto; min-height: calc(100dvh - 68px);
  padding: 48px var(--pad) 72px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 5vw, 80px); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 28px;
}
.blink { width: 8px; height: 8px; background: var(--accent); animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
h1 { font-weight: 700; font-size: clamp(36px, 5.2vw, 76px); line-height: 1.14; letter-spacing: -0.01em; }
h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), #ffffff 50%, var(--accent));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.nw { white-space: nowrap; }
.lede { margin-top: 28px; max-width: 30em; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.cta-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* HERO VISUAL: blueprint frame, rotating tick dials, corner brackets */
.hero-visual { position: relative; display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 540px); justify-self: center; }
.hero-visual > * { grid-area: 1 / 1; }
.logo-hero { position: relative; width: 58%; z-index: 2; filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
.br { position: absolute; width: 28px; height: 28px; border: 0 solid var(--accent); }
.br.tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.br.tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.br.bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.br.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
.cross {
  width: 100%; height: 100%;
  background:
    linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}
.dial { border-radius: 50%; aspect-ratio: 1; }
.dial.d1 {
  width: 86%;
  background: repeating-conic-gradient(var(--line-strong) 0 0.6deg, transparent 0.6deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 94%, #000 94.5%);
  mask: radial-gradient(circle, transparent 94%, #000 94.5%);
  animation: spin 80s linear infinite;
}
.dial.d2 {
  width: 68%; border: 1px solid var(--line-strong);
  border-top-color: var(--accent); border-right-color: transparent;
  animation: spin 14s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* MARQUEE */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 20px 0; background: rgba(255, 255, 255, 0.015); }
.marquee-track { display: flex; width: max-content; animation: slide 36s linear infinite; }
.marquee ul { display: flex; flex-shrink: 0; }
.marquee li { font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em; color: var(--muted); padding: 0 30px; white-space: nowrap; position: relative; }
.marquee li + li::before { content: "/"; position: absolute; left: -4px; color: var(--accent); opacity: 0.7; }
@keyframes slide { to { transform: translateX(-50%); } }

/* SECTIONS */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 140px) var(--pad); }
h2 { font-weight: 700; font-size: clamp(30px, 4vw, 52px); line-height: 1.2; letter-spacing: -0.01em; }
.section-sub { margin-top: 16px; color: var(--muted); max-width: 36em; }
h3 { font-weight: 700; font-size: clamp(20px, 2vw, 26px); line-height: 1.35; }
.tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--accent); }

/* BENTO / cards with corner brackets and pointer spotlight */
.bento {
  margin-top: 56px; display: grid; gap: 1px; grid-template-columns: repeat(6, 1fr);
  grid-template-areas: "a a a a b b" "a a a a c c" "d d d e e e";
  background: var(--line); border: 1px solid var(--line);
}
.cell, .work {
  --x: 50%; --y: 50%;
  position: relative; overflow: hidden; background: var(--bg);
  transition: background 0.4s;
}
.cell::before, .work::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(320px circle at var(--x) var(--y), rgba(53, 216, 255, 0.12), transparent 70%);
}
.cell::after, .work::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 14px; height: 14px;
  border: 0 solid var(--accent); border-width: 1px 1px 0 0; opacity: 0.35;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.cell:hover::before, .work:hover::before { opacity: 1; }
.cell:hover::after, .work:hover::after { opacity: 1; transform: translate(-3px, 3px); }
.cell {
  padding: clamp(24px, 3vw, 40px); min-height: 220px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
}
.cell p { color: var(--muted); max-width: 34em; }
.cell-a { grid-area: a; min-height: 460px; }
.cell-a h3 { font-size: clamp(28px, 3.4vw, 44px); }
.cell-b { grid-area: b; }
.cell-c { grid-area: c; }
.cell-d {
  grid-area: d;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; animation: gridmove 24s linear infinite;
}
@keyframes gridmove { to { background-position: 24px 24px, 24px 24px; } }
.cell-e { grid-area: e; }

/* PROCESS: scroll-drawn line */
.process { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.process-head { position: sticky; top: 108px; }
.process-list { position: relative; padding-left: 36px; }
.process-list::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.process-list::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -0.5px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  transform-origin: top; transform: scaleY(0);
  animation: draw linear both; animation-timeline: view(); animation-range: entry 20% cover 70%;
}
@keyframes draw { to { transform: scaleY(1); } }
.process-list li { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 36px 0; }
.process-list li + li { border-top: 1px solid var(--line); }
.process-list li::before {
  content: ""; position: absolute; left: -41px; top: 50px; width: 9px; height: 9px;
  background: var(--bg); border: 1px solid var(--accent);
}
.verb { font-weight: 700; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1; color: var(--accent); }
.process-list p { margin-top: 8px; color: var(--muted); }

/* WORKS */
.works-grid {
  margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.work { padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.work h3 { transition: color 0.3s; }
.work:hover h3 { color: var(--accent); }
.work p { color: var(--muted); max-width: 32em; }

/* CONTACT */
.contact-inner {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(48px, 8vw, 110px) var(--pad);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(ellipse at 50% 100%, rgba(53, 216, 255, 0.16), transparent 65%),
    var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.contact-inner p { color: var(--muted); }
.contact-inner .btn { margin-top: 16px; }

/* FOOTER */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--pad) 56px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 14px; color: var(--muted);
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.footer-brand img { height: 28px; width: auto; filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
.footer-brand b { letter-spacing: 0.24em; font-weight: 600; margin-right: 6px; }

/* REVEAL */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 24px; }
  .hero-visual { order: -1; width: min(70%, 300px); justify-self: start; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d" "e"; }
  .cell-a { min-height: 320px; }
  .process { grid-template-columns: 1fr; }
  .process-head { position: static; }
  .process-list li { grid-template-columns: 84px 1fr; }
  .works-grid { grid-template-columns: 1fr; }
  .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .process-list::after, .progress { transform: none; }
}

/* ── 公司資訊（Google 商家驗證需要法定名稱可見） ── */
.contact-meta {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  text-align: left;
  width: 100%;
  max-width: 980px;
}
.contact-meta > div {
  padding: 18px clamp(16px, 2.4vw, 28px);
  border-right: 1px solid var(--line);
}
.contact-meta > div:last-child { border-right: 0; }
.contact-meta dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact-meta dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}
.contact-meta dd.addr { white-space: normal; line-height: 1.5; }
.contact-meta dd a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.contact-meta dd a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.legal-name { font-weight: 700; letter-spacing: 0.02em; }

.footer-legal { display: flex; flex-direction: column; gap: 6px; }
.footer-legal .legal-name { color: var(--ink); font-size: 15px; }
.footer-legal p { margin: 0; }
.footer-addr { color: var(--muted); }
.footer-contact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-contact a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-contact a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 1040px) {
  .contact-meta { grid-template-columns: repeat(2, 1fr); }
  .contact-meta > div:nth-child(2n) { border-right: 0; }
  .contact-meta > div:nth-child(2n+1) { border-right: 1px solid var(--line); }
  .contact-meta > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .contact-meta { grid-template-columns: 1fr; }
  .contact-meta > div { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .contact-meta > div:last-child { border-bottom: 0; }
  .contact-meta dd { white-space: normal; word-break: break-word; }
}
