/* 無盡科技 ENDLESS TECH — dark theme
   Warm charcoal + the logo's silver and bronze (brand/*-dark.webp are the logo with lightness inverted). */
:root {
  --bg: #0f0e0d;
  --bg-2: #171513;
  --bg-3: #1f1c19;
  --line: rgba(236, 228, 214, 0.10);
  --line-2: rgba(236, 228, 214, 0.18);
  --text: #ece6dc;
  --muted: #9d968b;
  --bronze: #c9a26b;
  --bronze-deep: #8a6a43;
  --live: #5fd08e;

  --display: "Cinzel", "Noto Serif TC", serif;
  --zh: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--zh); font-size: 16.5px; line-height: 1.8; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, canvas { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
::selection { background: var(--bronze); color: var(--bg); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bronze); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.en { font-family: var(--display); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(15, 14, 13, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { width: 62px; height: auto; }
.logo-text { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .18em; line-height: 1.2; }
.logo-text small { display: block; font-family: var(--zh); font-weight: 500; font-size: 11.5px; letter-spacing: .3em; color: var(--muted); }
.nav-links { display: flex; gap: 34px; font-size: 14.5px; letter-spacing: .12em; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .15s; white-space: nowrap; }
@media (max-width: 560px) {
  .nav-links { gap: 18px; letter-spacing: .06em; }
  .logo { gap: 9px; }
  .logo img { width: 46px; }
  .logo-text { font-size: 13px; letter-spacing: .12em; white-space: nowrap; }
  .logo-text small { letter-spacing: .2em; }
}
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; padding: 110px 0 120px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(50% 42% at 50% 44%, rgba(201, 162, 107, .16), rgba(201, 162, 107, 0) 70%), radial-gradient(120% 80% at 50% 120%, #1b1713, var(--bg) 60%); }
.hero-mark { width: min(520px, 84vw); height: auto; margin: 0 auto; animation: rise 1.6s cubic-bezier(.2,.7,.2,1) both; }
.hero-name { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 5.4vw, 64px); letter-spacing: .32em; margin: clamp(8px, 2vw, 20px) 0 0 .32em; line-height: 1.1; animation: rise 1.6s .15s cubic-bezier(.2,.7,.2,1) both; }
.hero-zh { font-size: clamp(14px, 1.4vw, 17px); letter-spacing: .6em; color: var(--muted); margin: 18px 0 0 .6em; animation: rise 1.6s .25s cubic-bezier(.2,.7,.2,1) both; }
.hero-tag { display: inline-flex; align-items: center; gap: 18px; font-family: var(--display); color: var(--bronze); font-size: clamp(12px, 1.2vw, 14px); letter-spacing: .3em; margin-top: 30px; animation: rise 1.6s .35s cubic-bezier(.2,.7,.2,1) both; }
.hero-tag::before, .hero-tag::after { content: ""; width: 40px; height: 1px; background: var(--bronze-deep); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.scroll { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px; }
.scroll::after { content: ""; position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; border-radius: 2px; background: var(--bronze); animation: wheel 2s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 80% { opacity: 0; transform: translateY(10px); } 100% { opacity: 0; } }
@media (max-width: 560px) { .hero-tag::before, .hero-tag::after { width: 18px; } .hero-tag { gap: 10px; letter-spacing: .18em; } }

/* ---------- Statement ---------- */
.section { padding: clamp(88px, 12vw, 150px) 0; }
.statement { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: end; }
.statement h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.22; letter-spacing: .02em; }
.statement p { color: var(--muted); max-width: 30em; }
@media (max-width: 860px) { .statement { grid-template-columns: 1fr; } }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 48px); margin-top: clamp(56px, 8vw, 96px); }
.pillar { border-top: 1px solid var(--line-2); padding-top: 24px; }
.pillar h3 { font-size: 18px; display: flex; align-items: baseline; gap: 14px; }
.pillar h3 .en { font-size: 12px; color: var(--bronze); letter-spacing: .2em; font-weight: 600; }
.pillar p { color: var(--muted); font-size: 15px; margin-top: 10px; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Works ---------- */
.works-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: clamp(32px, 5vw, 52px); }
.label { font-family: var(--display); color: var(--bronze); font-size: 13px; letter-spacing: .3em; margin-bottom: 14px; }
.works-head h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: .04em; }
.works-head p { color: var(--muted); }

.title-card { position: relative; display: block; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); text-decoration: none; aspect-ratio: 21 / 9; background: var(--bg-2); isolation: isolate; }
.title-card .art { position: absolute; inset: 0; z-index: -2; }
.title-card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.2,.7,.2,1), filter .6s; filter: saturate(.95) brightness(.9); }
.title-card:hover .art img { transform: scale(1.035); filter: saturate(1.05) brightness(1); }
.title-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 11, 10, .94) 0%, rgba(12, 11, 10, .78) 34%, rgba(12, 11, 10, .1) 68%), linear-gradient(0deg, rgba(12, 11, 10, .6), rgba(12, 11, 10, 0) 40%); }
.tc-body { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(28px, 5vw, 64px); max-width: 520px; }
.tc-logo { width: min(300px, 70%); height: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.6)); }
.tc-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12.5px; letter-spacing: .08em; padding: 4px 11px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text); background: rgba(15, 14, 13, .5); }
.chip.live { color: var(--live); border-color: rgba(95, 208, 142, .35); display: inline-flex; align-items: center; gap: 7px; }
.chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.tc-body p { color: #c8c1b6; font-size: 15.5px; }
.tc-link { font-family: var(--display); font-size: 13px; letter-spacing: .2em; color: var(--bronze); display: inline-flex; align-items: center; gap: 10px; }
.tc-link::after { content: ""; width: 28px; height: 1px; background: currentColor; transition: width .3s; }
.title-card:hover .tc-link::after { width: 48px; }
@media (max-width: 1100px) and (min-width: 761px) { .title-card { aspect-ratio: auto; min-height: 420px; } }
@media (max-width: 760px) {
  .title-card { aspect-ratio: auto; }
  .title-card .art { position: relative; aspect-ratio: 16 / 9; }
  .title-card::after { background: linear-gradient(180deg, rgba(12,11,10,0) 0%, rgba(12,11,10,0) 30%, rgba(12,11,10,.95) 52%); }
  .tc-body { margin-top: -40px; padding: 0 22px 28px; max-width: none; position: relative; }
  .tc-logo { width: min(220px, 62%); }
}

/* ---------- About ---------- */
.about { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-logo { width: min(400px, 80%); height: auto; }
@media (max-width: 860px) { .about-logo { width: min(300px, 70%); } }
.about-body { display: grid; gap: 18px; color: var(--muted); }
.about-body h2 { font-size: clamp(28px, 3.4vw, 40px); color: var(--text); margin-bottom: 6px; }
.about-body strong { color: var(--text); font-weight: 500; }
.company { margin: 10px 0 0; border-top: 1px solid var(--line-2); }
.company div { display: grid; grid-template-columns: 7em 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.company dt { color: var(--muted); }
.company dd { margin: 0; color: var(--text); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-logo { margin: 0 auto; } }

/* ---------- Contact ---------- */
.contact-head { max-width: 560px; margin-bottom: clamp(32px, 5vw, 52px); }
.contact-head h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: .04em; }
.contact-head > p:last-child { color: var(--muted); margin-top: 12px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card { display: flex; flex-direction: column; gap: 10px; padding: clamp(26px, 3.4vw, 40px); border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-2); text-decoration: none; transition: border-color .2s, background .2s; }
.contact-card:hover { border-color: var(--bronze-deep); background: var(--bg-3); }
.contact-card h3 { font-size: 22px; }
.contact-card p { color: var(--muted); font-size: 15.5px; }
.contact-cta { margin-top: auto; padding-top: 14px; font-size: 14px; letter-spacing: .12em; color: var(--bronze); display: inline-flex; align-items: center; gap: 10px; }
.contact-cta::after { content: ""; width: 24px; height: 1px; background: currentColor; transition: width .3s; }
.contact-card:hover .contact-cta::after { width: 40px; }
.contact-mail { margin-top: 28px; color: var(--muted); font-size: 15px; }
.contact-mail a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--bronze-deep); padding-bottom: 2px; margin-left: 6px; }
.contact-mail a:hover { color: var(--bronze); }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.lost img { width: min(280px, 70vw); margin: 0 auto 28px; }
.lost h1 { font-size: clamp(28px, 4vw, 40px); }
.lost p { color: var(--muted); margin: 12px 0 30px; }
.lost a.home { display: inline-flex; align-items: center; height: 46px; padding: 0 24px; border-radius: 10px; border: 1px solid var(--bronze-deep); color: var(--text); text-decoration: none; letter-spacing: .08em; }
.lost a.home:hover { background: var(--bronze-deep); }

/* ---------- Footer ---------- */
.footer { padding: 36px 0; font-size: 13.5px; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
