/* kcis.kainnne.com — entry: silk background (three.js), two glass entry cards. Material and light only: no glow. */
:root {
  --ink: #2e0f38;
  --ink-2: #5b3b66;
  --ink-3: #8d7395;
  --plum: #7b3fbf;
  --rose: #d9468a;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: clamp(20px, 4vw, 56px);
  font-family: "Nunito", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box }
html, body { height: 100% }
body { margin: 0; min-width: 320px; min-height: 100svh; overflow-x: clip; background: #f6e3ef; display: flex; flex-direction: column }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none }
:focus-visible { outline: 2px solid rgba(123, 63, 191, .7); outline-offset: 4px; border-radius: 14px }
::selection { background: #f3c4dc }

/* Background layers */
.bg, .bg-fallback, .grain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0 }
.bg-fallback { background:
  radial-gradient(60% 70% at 12% 8%, #ffd3e5 0, transparent 62%),
  radial-gradient(55% 60% at 92% 18%, #dccbff 0, transparent 60%),
  radial-gradient(70% 70% at 70% 100%, #f8c9e0 0, transparent 60%),
  linear-gradient(160deg, #fbe9f3, #efe1fb) }
.bg { opacity: 0; transition: opacity 1.2s ease }
.bg.ready { opacity: 1 }
.grain { z-index: 1; opacity: .07; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .1 0 0 0 0 .35 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") }

/* Top bar */
.top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(18px + env(safe-area-inset-top)) var(--pad) 0 }
.logo { height: 28px; width: auto; display: block }
.top-actions { display: flex; align-items: center; gap: 10px }
.lang { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .42); border: 1px solid rgba(255, 255, 255, .75); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4) }
.lang button { position: relative; z-index: 1; min-width: 52px; min-height: 34px; padding: 0 14px; border: 0; background: none; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--ink-3); transition: color .3s }
.lang button[aria-pressed="true"] { color: var(--ink) }
.lang-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: #fff; box-shadow: 0 2px 8px -2px rgba(80, 30, 90, .25); transition: transform .45s var(--ease-out) }
.lang[data-active="en"] .lang-thumb { transform: translateX(100%) }
.pill { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 999px; font: 700 14px/1 "Comfortaa", "Nunito", sans-serif; letter-spacing: .01em; color: #fff;
  background: linear-gradient(115deg, #3a1450, #7b3fbf 60%, #c4508f); box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 8px 20px -12px rgba(58, 20, 80, .8);
  transition: transform .2s var(--ease), box-shadow .2s }
.pill:hover { transform: translateY(-1px) }
.pill:active, .pill.pressed { transform: translateY(1px) scale(.98) }

/* Stage */
.stage { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1280px; margin-inline: auto; padding: clamp(24px, 6vh, 72px) var(--pad) clamp(24px, 5vh, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: clamp(28px, 5vw, 80px) }
.kicker { margin: 0 0 18px; font: 500 12px/1 "DM Mono", ui-monospace, monospace; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2) }
.kicker span { padding: 4px 8px; margin-right: 6px; border-radius: 6px; background: var(--ink); color: #fff; letter-spacing: .16em }
h1 { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.6; letter-spacing: .02em; color: var(--ink) }
.list { list-style: none; display: grid; gap: 6px; margin: 14px 0 0; padding: 0 }
.list li { position: relative; padding-left: 18px; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink-2) }
.list li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: linear-gradient(135deg, #c4508f, #7b3fbf) }
.stats { display: flex; margin: clamp(28px, 5vh, 48px) 0 0; padding: 0; border-top: 1px solid rgba(46, 15, 56, .12) }
.stat { flex: 1; padding: 18px 0 0; }
.stat + .stat { padding-left: clamp(14px, 2vw, 26px); border-left: 1px solid rgba(46, 15, 56, .12); margin-left: clamp(14px, 2vw, 26px) }
.stats dt { display: flex; align-items: baseline; gap: 4px; font: 700 clamp(44px, 5.2vw, 76px)/1 "Comfortaa", sans-serif; letter-spacing: -.04em }
.stats dt b { font-weight: 700; background: linear-gradient(120deg, #4b1d6b, #c4508f); -webkit-background-clip: text; background-clip: text; color: transparent }
.stats dt i { font-style: normal; font-size: .6em; color: var(--ink-3) }
.stats dd { margin: 8px 0 0; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.8vw, 24px); perspective: 1100px }
.card { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --lift: 0px;
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: clamp(300px, 44vh, 420px); padding: clamp(20px, 2.2vw, 28px); border-radius: 30px; overflow: hidden;
  background: linear-gradient(155deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .34));
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 1px rgba(255, 255, 255, .95), inset 0 -1px rgba(255, 255, 255, .4), 0 30px 60px -36px rgba(70, 20, 90, .55), 0 12px 24px -18px rgba(70, 20, 90, .35);
  transform: translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out) }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: linear-gradient(140deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .2) 40%, rgba(196, 80, 143, .45) 75%, rgba(123, 63, 191, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude }
.card::after { content: ""; position: absolute; z-index: -2; inset: 0; border-radius: inherit; opacity: .9 }
.card-tools::after { background: radial-gradient(120% 80% at 100% 100%, rgba(255, 170, 205, .55), transparent 60%) }
.card-ai::after { background: radial-gradient(120% 80% at 100% 100%, rgba(190, 160, 255, .6), transparent 60%) }
.card:hover .card-top { display: flex; align-items: center; justify-content: space-between }
.card-index { font: 500 12px/1 "DM Mono", monospace; letter-spacing: .12em; color: var(--ink-3) }
.card-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: #fff;
  background: linear-gradient(140deg, #4b1d6b, #a64391); box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 10px 20px -12px rgba(75, 29, 107, .8);
  transition: transform .5s var(--ease-out) }
.card-ai .card-mark { background: linear-gradient(140deg, #3d2a8f, #8a5ad8) }
.card-mark svg { width: 22px; height: 22px }
.card:hover .card-mark { transform: translateZ(30px) rotate(-6deg) }
.card-name { margin-top: auto; font: 700 clamp(34px, 3.6vw, 52px)/1 "Comfortaa", sans-serif; letter-spacing: -.04em; color: var(--ink); transform: translateZ(24px) }
.card-act { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(46, 15, 56, .1); font-size: 13px; font-weight: 800; color: var(--ink-2) }
.card-act svg { width: 34px; height: 34px; padding: 9px; border-radius: 50%; background: var(--ink); color: #fff; stroke-width: 2.2; transition: transform .4s var(--ease-out), background-color .3s }
.card:hover { --lift: -6px; box-shadow: inset 0 1px rgba(255, 255, 255, .95), inset 0 -1px rgba(255, 255, 255, .4), 0 44px 70px -38px rgba(70, 20, 90, .6), 0 16px 30px -20px rgba(70, 20, 90, .4) }
.card:hover .card-act svg { transform: rotate(45deg); background: var(--plum) }
.card:active, .card.pressed { --lift: 2px; transition-duration: .15s }
.card.pressed 
/* Footer */
.foot { position: relative; z-index: 2; padding: 0 var(--pad) calc(18px + env(safe-area-inset-bottom)); text-align: right }
.foot a { font: 500 11px/1 "DM Mono", monospace; letter-spacing: .08em; color: var(--ink-3); background: linear-gradient(currentColor 0 0) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease), color .2s }
.foot a:hover { color: var(--ink); background-size: 100% 1px }

/* Entrance: content rises, cards fly in */
@media (prefers-reduced-motion: no-preference) {
  .top { animation: rise .8s var(--ease-out) both }
  .intro > * { animation: rise .9s var(--ease-out) both }
  .intro > :nth-child(2) { animation-delay: .08s } .intro > :nth-child(3) { animation-delay: .16s } .intro > :nth-child(4) { animation-delay: .24s }
  .list li { animation: rise .7s var(--ease-out) both }
  .list li:nth-child(1) { animation-delay: .2s } .list li:nth-child(2) { animation-delay: .26s } .list li:nth-child(3) { animation-delay: .32s } .list li:nth-child(4) { animation-delay: .38s }
  .card { animation: fly-in 1.1s var(--ease-out) both }
  .card-tools { animation-delay: .28s } .card-ai { animation-delay: .42s }
  .card.landed { animation: none }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) } }
@keyframes fly-in { 0% { opacity: 0; transform: translate3d(0, 120px, -160px) rotateX(28deg) rotateY(-8deg) scale(.9) } 60% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }

/* Tablet */
@media (max-width: 960px) {
  .stage { grid-template-columns: 1fr; align-content: center }
  .card { min-height: 240px }
}
/* Phone */
@media (max-width: 560px) {
  .logo { height: 22px }
  .lang button { min-width: 44px; padding: 0 10px }
  .pill { min-height: 38px; padding: 0 14px; font-size: 13px }
  .cards { grid-template-columns: 1fr; gap: 12px }
  .card { min-height: 0; padding: 18px 20px; border-radius: 24px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "top top" "name act"; row-gap: 18px; align-items: end }
  .card-top { grid-area: top } .card-name { grid-area: name; font-size: 34px } .card-act { grid-area: act; margin: 0; padding: 0; border: 0 }
  .card-act > span { display: none }
  .stats dt { font-size: 40px }
  .foot { text-align: left }
}
@media (max-width: 360px) { .lang { display: none } }
/* Phone landscape */
@media (max-height: 520px) and (orientation: landscape) {
  .stage { grid-template-columns: 1fr 1fr; padding-block: 16px; gap: 24px }
  h1 { font-size: 14px } .kicker { margin-bottom: 10px } .list { margin-top: 12px } .stats { margin-top: 14px } .stat { padding-top: 10px } .stats dt { font-size: 32px }
  .cards { grid-template-columns: 1fr; gap: 10px }
  .card { min-height: 0; padding: 14px 18px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name act"; align-items: center }
  .card-top { display: none } .card-name { grid-area: name; font-size: 28px; margin: 0 } .card-act { grid-area: act; margin: 0; padding: 0; border: 0 } .card-act > span { display: none }
}
@media (hover: none) { .card:hover { --lift: 0px } }
