/* =========================================================
   Emsoro Studio — software portfolio site
   ========================================================= */

:root {
  --bg: #080910;
  --bg-soft: #0d0f1b;
  --surface: rgba(255, 255, 255, .038);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-solid: #14172a;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eef0ff;
  --muted: #9aa0bd;
  --faint: #6b7190;
  --accent: #7c6cff;
  --accent-2: #22d3ee;
  --accent-3: #ff72a6;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --header-bg: rgba(8, 9, 16, .72);
  --grid-line: rgba(255, 255, 255, .035);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f7f8fd;
  --bg-soft: #eef0fa;
  --surface: rgba(23, 26, 46, .035);
  --surface-2: rgba(23, 26, 46, .06);
  --surface-solid: #ffffff;
  --border: rgba(23, 26, 46, .1);
  --border-strong: rgba(23, 26, 46, .2);
  --text: #171a2e;
  --muted: #5e6585;
  --faint: #8c92aa;
  --accent: #5b4bff;
  --accent-2: #0891a5;
  --accent-3: #e04f7b;
  --shadow: 0 24px 70px rgba(40, 45, 90, .12);
  --header-bg: rgba(247, 248, 253, .78);
  --grid-line: rgba(23, 26, 46, .045);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- background decoration ---------- */
.bg-orbit { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: -2; opacity: .5; }
.bg-orbit--one { width: 620px; height: 620px; top: -220px; right: -160px; background: radial-gradient(circle, rgba(124,108,255,.4), transparent 68%); }
.bg-orbit--two { width: 540px; height: 540px; top: 520px; left: -240px; background: radial-gradient(circle, rgba(34,211,238,.24), transparent 68%); }
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 1100px);
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; height: 70px; z-index: 100;
  background: var(--header-bg); backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .35s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), #4f46e5 60%, var(--accent-2));
  color: #fff; box-shadow: 0 8px 22px rgba(124,108,255,.35);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: 9px; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 14px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s, background .2s; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  height: 38px; min-width: 38px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 12px; font-weight: 700; letter-spacing: .03em; transition: color .2s, border-color .2s, transform .2s;
}
.lang-switch:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.icon-btn, .header-gh {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: color .2s, border-color .2s, transform .2s;
}
.icon-btn:hover, .header-gh:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.icon-btn svg, .header-gh svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
html[data-theme="light"] .icon-sun { display: block; }
html[data-theme="light"] .icon-moon { display: none; }
.menu-toggle { display: none; width: 38px; height: 38px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; }
.menu-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; padding: 140px 0 90px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 12px; letter-spacing: .04em;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.15); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.035em; }
.hero h1 { font-size: clamp(42px, 5.4vw, 74px); font-weight: 800; margin: 24px 0 22px; line-height: 1.12; }
html[lang="en"] .hero h1 { font-size: clamp(40px, 4.6vw, 62px); }
.gradient-text { background: linear-gradient(100deg, #a5a0ff 5%, #6ee7f9 52%, #f9a8d4 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="light"] .gradient-text { background: linear-gradient(100deg, #5b4bff 5%, #0891a5 55%, #d94f7b 95%); -webkit-background-clip: text; background-clip: text; }
.hero-lead { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 24px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: transform .2s, box-shadow .25s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5b4bff); color: #fff; box-shadow: 0 12px 30px rgba(124,108,255,.32); }
.btn-primary:hover { box-shadow: 0 16px 36px rgba(124,108,255,.48); }
.btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-download { background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .4); color: var(--accent-2); }
.btn-download:hover { background: rgba(34, 211, 238, .2); border-color: var(--accent-2); box-shadow: 0 12px 28px rgba(34, 211, 238, .18); }
html[data-theme="light"] .btn-download { background: rgba(8, 145, 165, .1); border-color: rgba(8, 145, 165, .35); color: #0e7490; }
html[data-theme="light"] .btn-download:hover { background: rgba(8, 145, 165, .16); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border); }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.hero-stats span { font-size: 12px; color: var(--faint); }

.hero-visual { position: relative; height: 480px; display: grid; place-items: center; }
.glow-core { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(124,108,255,.3), rgba(34,211,238,.08) 45%, transparent 70%); filter: blur(14px); }
.orbit-ring { position: absolute; border-radius: 50%; border: 1px dashed var(--border-strong); animation: spin 40s linear infinite; }
.orbit-ring--outer { width: 460px; height: 460px; }
.orbit-ring--inner { width: 340px; height: 340px; animation-direction: reverse; animation-duration: 28s; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-window {
  position: relative; width: min(430px, 100%); border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, rgba(28,31,56,.94), rgba(14,16,30,.96));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  transform: perspective(1000px) rotateY(-7deg) rotateX(3deg);
  animation: floaty 7s ease-in-out infinite;
}
html[data-theme="light"] .hero-window { background: linear-gradient(160deg, #fff, #f2f4fd); }
@keyframes floaty { 0%,100% { transform: perspective(1000px) rotateY(-7deg) rotateX(3deg) translateY(0); } 50% { transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) translateY(-14px); } }
.window-bar { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff6b7a; }
.window-bar i:nth-child(2) { background: #ffc857; }
.window-bar i:nth-child(3) { background: #4ade80; }
.window-bar span { margin-left: 12px; font-size: 11px; color: var(--faint); font-family: ui-monospace, Consolas, monospace; }
.window-body { display: grid; grid-template-columns: 56px 1fr; min-height: 236px; }
.window-side { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0; border-right: 1px solid var(--border); background: rgba(255,255,255,.015); }
.window-side img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.window-main { padding: 22px 20px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; display: flex; flex-direction: column; gap: 9px; }
.code-line { color: var(--muted); }
.c-key { color: var(--accent-2); }
.c-val { color: var(--text); }
.c-str { color: #f9a8d4; }
.c-num { color: #fbbf24; }
.c-bool { color: #4ade80; }
.c-com { color: var(--faint); }
.window-pulse { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); color: #4ade80; font-size: 11px; }
.window-pulse span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(74,222,128,.15); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.float-chip {
  position: absolute; padding: 8px 14px; border-radius: 99px; font-size: 11px; font-weight: 600;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: 0 12px 30px rgba(0,0,0,.22);
  display: flex; align-items: center; gap: 8px; animation: floaty 6s ease-in-out infinite;
}
.float-chip--a { top: 48px; left: 0; animation-delay: -.8s; }
.float-chip--b { bottom: 72px; right: -8px; animation-delay: -2.4s; }
.float-chip--c { top: 92px; right: 6px; animation-delay: -3.6s; }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 22px; height: 36px; border: 1px solid var(--border-strong); border-radius: 12px; display: grid; place-items: start center; padding-top: 7px; }
.scroll-hint span { width: 3px; height: 8px; border-radius: 2px; background: var(--muted); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70%,100% { transform: translateY(13px); opacity: 0; } }

/* ---------- sections ---------- */
.section { padding: 110px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, var(--bg-soft) 12%, var(--bg-soft) 88%, transparent); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 38px; flex-wrap: wrap; }
.section-kicker { color: var(--accent-2); font-size: 12px; font-weight: 700; letter-spacing: .16em; font-family: ui-monospace, Consolas, monospace; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; margin: 12px 0 10px; }
.section-head p { color: var(--muted); margin: 0; max-width: 680px; }
.head-tools { display: flex; gap: 12px; }
.search-box {
  display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 11px; color: var(--faint);
  transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 17px; height: 17px; flex-shrink: 0; }
.search-box input { border: 0; outline: 0; background: none; color: var(--text); width: 160px; font-size: 13px; }
.search-box input::placeholder { color: var(--faint); }

/* ---------- app cards ---------- */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 7px 15px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 600; transition: all .2s;
}
.filter-btn span { font-size: 11px; opacity: .6; margin-left: 4px; }
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-hint { margin-left: auto; color: var(--faint); font-size: 12px; }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.app-card, .eco-card, .framework-card, .principle, .shot, .service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform .3s ease, border-color .3s, box-shadow .3s, background .3s;
}
.app-card { padding: 24px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.app-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent); opacity: 0; transition: opacity .3s; }
.app-card:hover { transform: translateY(-7px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.app-card:hover::before { opacity: 1; }
.app-card[hidden], .eco-card[hidden] { display: none; }
.app-card-top { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.app-logo { width: 52px; height: 52px; border-radius: 13px; object-fit: contain; flex-shrink: 0; background: var(--surface-2); }
.app-title { min-width: 0; }
.app-title h3 { font-size: 19px; font-weight: 700; }
.app-title span { font-size: 12px; color: var(--muted); }
.ver { margin-left: auto; align-self: flex-start; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--border); color: var(--faint); font-size: 10px; font-family: ui-monospace, Consolas, monospace; white-space: nowrap; }
.app-card > p, .eco-card > p { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tags span { padding: 3px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.mini-features { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 9px; }
.mini-features li { position: relative; padding-left: 17px; color: var(--text); font-size: 12.5px; opacity: .82; }
.mini-features li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.card-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.download-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .12);
  color: var(--accent-2); font-size: 12px; font-weight: 600;
  transition: background .2s, border-color .2s, transform .2s;
}
.download-btn svg { width: 14px; height: 14px; }
.download-btn:hover { background: rgba(34, 211, 238, .2); border-color: var(--accent-2); transform: translateY(-2px); }
html[data-theme="light"] .download-btn { background: rgba(8, 145, 165, .09); border-color: rgba(8, 145, 165, .3); color: #0e7490; }
html[data-theme="light"] .download-btn:hover { background: rgba(8, 145, 165, .15); }
.compare-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.compare-link:hover { color: var(--accent); gap: 8px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.card-foot-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.consult-link { color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: color .2s; }
.consult-link:hover { color: var(--accent); }
.eco-actions { display: flex; align-items: center; gap: 16px; margin-top: auto; }
.eco-card .eco-actions .text-btn { margin-top: 0; }
.text-btn { border: 0; background: none; padding: 0; color: var(--accent); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.text-btn:hover { gap: 10px; }
html[data-theme="light"] .text-btn { color: var(--accent); }
.fw-badge { font-size: 10px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.fw-native { color: #a5b4fc; background: rgba(165,180,252,.1); }
.fw-tauri { color: #67e8f9; background: rgba(103,232,249,.1); }
.fw-werfs { color: #f9a8d4; background: rgba(249,168,212,.1); }
html[data-theme="light"] .fw-native { color: #4f46e5; }
html[data-theme="light"] .fw-tauri { color: #0e7490; }
html[data-theme="light"] .fw-werfs { color: #be185d; }
.empty-state { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- frameworks ---------- */
.framework-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.framework-card { padding: 30px; position: relative; overflow: hidden; }
.framework-card::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; filter: blur(90px); opacity: .12; pointer-events: none; top: -140px; right: -100px; background: var(--accent); }
.framework-card--werfs::after { background: var(--accent-3); }
.fw-head { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.fw-logo { width: 54px; height: 54px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 27px; font-weight: 800; color: #fff; background: linear-gradient(145deg, #7c6cff, #4338ca); box-shadow: 0 10px 24px rgba(124,108,255,.3); }
.framework-card--werfs .fw-logo { background: linear-gradient(145deg, #ff72a6, #be185d); box-shadow: 0 10px 24px rgba(255,114,166,.3); }
.fw-head h3 { font-size: 24px; }
.fw-head span { font-size: 11px; color: var(--faint); font-family: ui-monospace, Consolas, monospace; }
.fw-link { margin-left: auto; align-self: flex-start; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; transition: color .2s, border-color .2s; }
.fw-link:hover { color: var(--accent); border-color: var(--accent); }
.fw-lead { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.fw-features { display: flex; flex-direction: column; gap: 11px; margin-bottom: 26px; }
.fw-features div { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.fw-features svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--accent-2); margin-top: 3px; }
.framework-card--werfs .fw-features svg { color: var(--accent-3); }
.fw-ecosystem { padding-top: 20px; border-top: 1px solid var(--border); }
.fw-eco-label { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--faint); font-weight: 700; }
.eco-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.eco-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 7px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 11.5px; transition: border-color .2s, transform .2s; }
.eco-chip img { width: 20px; height: 20px; object-fit: contain; }
.eco-chip:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- ecosystem ---------- */
.eco-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.eco-card { padding: 26px; display: flex; flex-direction: column; }
.eco-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.eco-card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.eco-card-head h3 { font-size: 18px; }
.eco-card-head span { font-size: 11.5px; color: var(--muted); }
.eco-card .text-btn { margin-top: auto; }

/* ---------- services ---------- */
.service-card { padding: 30px; display: flex; flex-direction: column; }
.service-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.service-card .fw-head { margin-bottom: 16px; }
.service-card .fw-head img { width: 54px; height: 54px; flex-shrink: 0; border-radius: 14px; object-fit: contain; background: var(--surface-2); }
.service-card .fw-lead { max-width: 900px; }
.service-card .fw-features { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 28px; }
.service-actions { display: flex; align-items: center; gap: 18px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- principles ---------- */
.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.principle { padding: 26px 22px; }
.principle:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.principle-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; color: var(--accent-2); background: var(--surface-2); margin-bottom: 16px; }
.principle h3 { font-size: 16px; margin-bottom: 8px; }
.principle p { color: var(--muted); font-size: 12.5px; margin: 0; }
.cta-band {
  margin-top: 34px; padding: 34px 36px; border-radius: 20px; display: flex; align-items: center; justify-content: space-between; gap: 34px;
  background: linear-gradient(120deg, rgba(124,108,255,.16), rgba(34,211,238,.08) 55%, rgba(255,114,166,.1));
  border: 1px solid var(--border-strong); flex-wrap: wrap;
}
.cta-band h3 { font-size: 21px; margin-bottom: 8px; }
.cta-band p { color: var(--muted); margin: 0; font-size: 13px; max-width: 480px; }
.cta-code { width: min(100%, 440px); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: rgba(0,0,0,.25); }
.cta-code-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.copy-btn { border: 0; background: var(--surface-2); color: var(--text); border-radius: 6px; padding: 3px 9px; font-size: 10.5px; }
.copy-btn:hover { background: var(--accent); color: #fff; }
.cta-code pre { margin: 0; padding: 16px; font-size: 12px; line-height: 1.8; overflow-x: auto; color: var(--text); font-family: ui-monospace, Consolas, monospace; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shot { position: relative; padding: 0; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); text-align: left; }
.shot:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.shot:hover img { transform: scale(1.06); }
.shot span { position: absolute; inset: auto 0 0; padding: 26px 14px 12px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(6,7,16,.88)); }
.shot span strong { font-size: 13px; margin-right: 6px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.contact-card {
  display: flex; align-items: center; gap: 26px; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.contact-qr-link { flex-shrink: 0; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.contact-qr-link:hover { border-color: var(--accent-2); }
.contact-qr { display: block; width: 190px; height: 190px; object-fit: cover; object-position: center; }
.contact-icon {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--accent-2); background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .3);
}
.contact-icon svg { width: 30px; height: 30px; }
html[data-theme="light"] .contact-icon { background: rgba(8, 145, 165, .09); border-color: rgba(8, 145, 165, .28); }
.contact-body h3 { font-size: 18px; margin-bottom: 8px; }
.contact-body p { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.contact-note { display: inline-block; font-size: 11.5px; color: var(--faint); padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); }
.contact-mail {
  display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--accent-2);
  border-bottom: 1px dashed currentColor; padding-bottom: 2px; transition: color .2s;
}
.contact-mail:hover { color: var(--accent); }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .contact-card { flex-direction: column; align-items: flex-start; gap: 18px; }
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: var(--surface); padding: 16px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: .22em; color: var(--faint); padding-right: 28px; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- footer ---------- */
.site-footer { padding: 70px 0 26px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-brand p { color: var(--muted); font-size: 12.5px; margin: 18px 0 0; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }
.footer-col a { color: var(--muted); font-size: 12.5px; transition: color .2s, transform .2s; }
.footer-col a:hover { color: var(--accent); transform: translateX(3px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11px; }

/* ---------- floating controls ---------- */
.to-top { position: fixed; right: 26px; bottom: 26px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s; z-index: 80; }
.to-top.visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }
.to-top svg { width: 19px; height: 19px; }

/* ---------- modal ---------- */
.modal, .lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.lightbox { z-index: 210; }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal-backdrop, .lightbox-backdrop { position: absolute; inset: 0; background: rgba(5,6,14,.78); backdrop-filter: blur(8px); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-panel { position: relative; width: min(760px, 100%); max-height: 86vh; overflow-y: auto; padding: 34px; border-radius: 22px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: popIn .3s cubic-bezier(.2,.8,.2,1); }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.modal-close, .lightbox-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); display: grid; place-items: center; font-size: 14px; }
.modal-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; padding-right: 30px; }
.modal-head img { width: 68px; height: 68px; border-radius: 16px; object-fit: contain; background: var(--surface-2); }
.modal-kicker { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.modal-head h2 { font-size: 26px; margin: 3px 0 4px; }
.modal-meta { display: flex; gap: 8px; font-size: 11px; color: var(--faint); flex-wrap: wrap; }
.modal-desc { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.modal-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; padding-top: 8px; }
.modal-cols h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 12px; }
.modal-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.modal-features li { position: relative; padding-left: 22px; font-size: 13px; }
.modal-features li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.modal-info { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 12.5px; }
.modal-info dt { color: var(--faint); }
.modal-info dd { margin: 0; color: var(--text); }
.modal-shots-block { margin: 2px 0 22px; }
.modal-shots-block[hidden] { display: none; }
.modal-shots-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 10px; }
.modal-shots { display: flex; flex-wrap: wrap; gap: 10px; }
.modal-shot { padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); width: 150px; aspect-ratio: 16 / 10; cursor: zoom-in; transition: border-color .2s; }
.modal-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .3s; }
.modal-shot:hover { border-color: var(--accent); }
.modal-shot:hover img { transform: scale(1.05); }
.modal-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.modal-links[hidden] { display: none; }
.modal-links a, .modal-links button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 600; }
.modal-links a:hover, .modal-links button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- lightbox ---------- */
.lightbox figure { position: relative; margin: 0; max-width: min(1000px, 90vw); }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow); background: var(--surface-solid); }
.lightbox figcaption { text-align: center; color: #e8eaff; font-size: 13px; padding-top: 14px; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.08); color: #fff; font-size: 28px; line-height: 1; display: grid; place-items: center; }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
.lightbox-nav:hover { background: var(--accent); border-color: var(--accent); }
.lightbox-close { top: 20px; right: 20px; color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.24); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); padding: 10px 20px; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 13px; opacity: 0; visibility: hidden; transition: all .25s; z-index: 300; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { height: 420px; order: -1; }
  .hero { padding-top: 110px; }
  .app-grid, .eco-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .container { width: min(100% - 32px, 1180px); }
  .section { padding: 76px 0; }
  .nav { position: fixed; top: 70px; left: 0; right: 0; flex-direction: column; gap: 2px; padding: 14px 16px 20px; background: var(--surface-solid); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all .25s; }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 11px 14px; }
  .menu-toggle { display: flex; }
  .header-gh { display: none; }
  .hero { min-height: auto; padding: 100px 0 70px; }
  .hero h1 { font-size: clamp(38px, 9vw, 56px); }
  .hero-lead { font-size: 15px; }
  .hero-stats { gap: 22px; }
  .hero-stats strong { font-size: 20px; }
  .hero-visual { height: 340px; }
  .hero-window { transform: none; animation: none; width: min(340px, 100%); }
  .orbit-ring--outer { width: 330px; height: 330px; }
  .orbit-ring--inner { width: 250px; height: 250px; }
  .glow-core { width: 300px; height: 300px; }
  .float-chip { display: none; }
  .desktop-only { display: none; }
  .app-grid, .eco-grid, .framework-grid, .principle-grid, .gallery-grid { grid-template-columns: 1fr; }
  .service-card .fw-features { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; }
  .filter-hint { display: none; }
  .modal-panel { padding: 24px; }
  .modal-cols { grid-template-columns: 1fr; gap: 20px; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 22px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .cta-band { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
