/* KAIENET Studio — cinematic dark atelier */
:root {
  --bg: #0b0a09;
  --bg-elev: #141210;
  --bg-soft: #1b1815;
  --ink: #f4eee6;
  --muted: #a79d91;
  --faint: #6f675e;
  --line: rgba(244, 238, 230, 0.08);
  --line-strong: rgba(244, 238, 230, 0.16);
  --gold: #d7b07a;
  --gold-2: #f0d7a8;
  --gold-dim: rgba(215, 176, 122, 0.14);
  --sage: #8aa396;
  --rose: #c9a8a3;
  --sky: #9bb4c9;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --radius-sm: 14px;
  --nav-h: 76px;
  --max: 1180px;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Noto Serif TC", "Songti TC", serif;
  --font-display: "Syne", "Noto Sans TC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  cursor: auto;
}

body.is-hovering a,
body.is-hovering button {
  cursor: none;
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(215, 176, 122, 0.35); color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--gold);
  color: #1a140c;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { top: 16px; }

.noise,
.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
}
.noise {
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  background: radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(0,0,0,.45) 100%);
  z-index: 2;
}

.cursor {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border: 1px solid var(--gold-2);
  background: rgba(215, 176, 122, 0.12);
  border-radius: 50%;
  pointer-events: none;
  z-index: 80;
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s;
}
.cursor.is-on { display: block; }
.cursor.is-down {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: var(--gold);
}
.cursor.is-link {
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  background: rgba(215,176,122,.12);
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 40;
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(11, 10, 9, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(11, 10, 9, 0.82);
}
.nav-inner {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.86rem;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.nav-panel {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}
.nav-links a {
  position: relative;
  transition: color .25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--gold);
  color: var(--gold-2);
  border-radius: 999px;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.nav-cta:hover {
  background: var(--gold);
  color: #1a140c;
  transform: translateY(-1px);
}

.menu-btn {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 12px;
  position: relative;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: var(--ink);
  content: "";
  transition: transform .25s var(--ease), opacity .2s;
}
.menu-btn span { top: 50%; }
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }
.nav.is-open .menu-btn span { background: transparent; }
.nav.is-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }
body.menu-lock { overflow: hidden; }

.hero {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 48px) 0 72px;
  display: grid;
  align-items: center;
}
.hero .wrap {
  position: relative;
}
.hero .wrap::before {
  content: "KAI";
  position: absolute;
  right: -6%;
  top: 6%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(8rem, 28vw, 22rem);
  line-height: 0.75;
  color: transparent;
  -webkit-text-stroke: 1px rgba(215, 176, 122, 0.09);
  pointer-events: none;
  z-index: -1;
}
.hero::before {
  content: "";
  position: absolute;
  width: 50vw;
  height: 50vw;
  right: -12vw;
  top: 8vh;
  background: radial-gradient(circle, rgba(215,176,122,.16), transparent 64%);
  filter: blur(10px);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  width: 32vw;
  height: 32vw;
  left: -10vw;
  bottom: 0;
  background: radial-gradient(circle, rgba(138,163,150,.12), transparent 70%);
  z-index: -1;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-2);
  letter-spacing: 0.12em;
}
.pulse i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #9dce8c;
  box-shadow: 0 0 0 0 rgba(157,206,140,.7);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(157,206,140,0); }
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(3rem, 8.4vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-2);
  font-weight: 500;
}
.hero-lead {
  max-width: 640px;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 300;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a140c;
  font-weight: 600;
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255,255,255,.02);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
}
.stack {
  display: grid;
  gap: 12px;
  transform: rotate(3deg);
}
.stack-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.stack-card:nth-child(2) { transform: translateX(18px) rotate(-4deg); }
.stack-card:nth-child(3) { transform: translateX(-8px) rotate(2deg); }
.stack-card small {
  display: block;
  color: var(--gold);
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.stack-card strong {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.stack-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

.marquee {
  position: relative;
  z-index: 3;
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,.015);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee 36s linear infinite;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.marquee-track span { white-space: nowrap; }
.marquee-track b { color: var(--gold); font-weight: 500; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

section {
  position: relative;
  z-index: 3;
  padding: 108px 0;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 16px;
}
.kicker::after {
  content: "";
  width: 64px;
  height: 1px;
  background: var(--gold);
  opacity: .5;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 48px;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.15;
  font-weight: 600;
}
.section-head p {
  max-width: 360px;
  color: var(--muted);
}

.about {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.portrait {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 460px;
  background:
    radial-gradient(circle at 30% 20%, rgba(215,176,122,.35), transparent 36%),
    linear-gradient(160deg, #2a241c, #12100d);
  border: 1px solid var(--line);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(11, 10, 9, 0.72));
  pointer-events: none;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 460px;
  filter: grayscale(0.12) contrast(1.04) saturate(0.88);
  opacity: 0.96;
}
.portrait-meta {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(12,11,10,.72);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.fact {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
}
.fact b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold-2);
}
.fact span { color: var(--muted); font-size: 0.88rem; }
.about-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.2;
  margin-bottom: 18px;
}
.about-copy p { color: var(--muted); margin-bottom: 14px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service {
  position: relative;
  padding: 28px 24px 24px;
  min-height: 250px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .3s, background .3s;
}
.service:hover {
  transform: translateY(-6px);
  border-color: rgba(215,176,122,.4);
  background: linear-gradient(180deg, rgba(215,176,122,.08), rgba(255,255,255,.02));
}
.service.wide { grid-column: span 2; }
.service .num {
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}
.service h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  margin: 14px 0 10px;
  font-weight: 600;
}
.service p { color: var(--muted); font-size: 0.95rem; }
.service ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.service li {
  font-size: 0.78rem;
  color: var(--gold-2);
  border: 1px solid var(--gold-dim);
  background: var(--gold-dim);
  padding: 4px 10px;
  border-radius: 999px;
}
.icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  margin-bottom: 8px;
  color: var(--gold-2);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.work {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  min-height: 100%;
  transition: transform .4s var(--ease), border-color .3s;
}
.work:hover {
  transform: translateY(-6px);
  border-color: rgba(215,176,122,.35);
}
.work-art {
  height: 168px;
  position: relative;
  overflow: hidden;
}
.work-art .tag {
  position: absolute;
  inset: auto 18px 16px 18px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
}
.art-1 { background: radial-gradient(circle at 20% 30%, #d7b07a, transparent 36%), linear-gradient(135deg, #1c1712, #3a2a1d); }
.art-2 { background: radial-gradient(circle at 80% 20%, #c9a8a3, transparent 32%), linear-gradient(135deg, #1a1214, #3a2430); }
.art-3 { background: radial-gradient(circle at 50% 80%, #8aa396, transparent 34%), linear-gradient(135deg, #101614, #1e332c); }
.art-4 { background: radial-gradient(circle at 30% 70%, #9bb4c9, transparent 36%), linear-gradient(135deg, #10141a, #243044); }
.art-5 { background: radial-gradient(circle at 70% 40%, #d7b07a, transparent 30%), linear-gradient(160deg, #16120e, #2b2418); }
.art-6 { background: radial-gradient(circle at 40% 20%, #b7a4d4, transparent 32%), linear-gradient(135deg, #15111c, #2a2040); }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
}
.work-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.work-body h3 {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  margin-bottom: 8px;
}
.work-body p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.work-body a {
  margin-top: 16px;
  color: var(--gold-2);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  padding: 24px;
  border-top: 1px solid var(--gold);
  background: linear-gradient(180deg, rgba(215,176,122,.06), transparent 48%);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 18px;
}
.step h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.step p { color: var(--muted); font-size: 0.92rem; }

.contact-box {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  padding: 48px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 10% 0%, rgba(215,176,122,.12), transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}
.contact-box h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.15;
  margin: 12px 0 16px;
}
.contact-links {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.contact-links > * {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
input, textarea, select {
  width: 100%;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-dim);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note {
  min-height: 1.4em;
  font-size: 0.88rem;
  color: var(--sage);
}

.footer {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--faint);
  font-size: 0.86rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a:hover { color: var(--gold-2); }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  animation: none;
}
.reveal.is-in {
  animation: rise .9s var(--ease) forwards;
}
@keyframes rise {
  to { opacity: 1; transform: none; }

}

@media (max-width: 980px) {
  .hero-grid, .about, .contact-box { grid-template-columns: 1fr; }
  .stack { display: none; }
  .services-grid, .work-grid { grid-template-columns: 1fr 1fr; }
  .service.wide { grid-column: span 2; }
  .process { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .portrait, .portrait img { min-height: 360px; }
}

@media (max-width: 720px) {
  :root { --nav-h: 66px; }
  .wrap, .nav-inner { width: min(var(--max), calc(100% - 28px)); }
  .nav-panel {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 22px 24px 28px;
    background: rgba(11, 10, 9, 0.97);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav-panel { display: flex; }
  .nav-links { flex-direction: column; gap: 16px; font-size: 1.05rem; }
  .menu-btn { display: block; }
  .services-grid, .work-grid, .process, .facts, .form-row {
    grid-template-columns: 1fr;
  }
  .service.wide { grid-column: auto; }
  .contact-box { padding: 28px 20px; }
  section { padding: 80px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track, .pulse i { animation: none; }
  .cursor { display: none !important; }
}
