/* ============================================================
   LingJot 落地页 —— 单屏版
   结构：顶栏 / 主体（左文 + 右 3D 词卡）/ 底栏，整屏不滚动
   配色：深靛蓝文字 + 紫色主色（取自 AppIcon），紫罗兰 / 薰衣草辅色
   右侧为词卡，呼应 AppIcon 的卡片形象与产品本身的词卡定位
   ============================================================ */

/* 艺术字体：Playfair Display Italic（自托管到 fonts/，不依赖 Google Fonts） */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-display-italic.ttf') format('truetype');
}

:root {
  --ink: #241C5C;        /* 深靛蓝：标题 */
  --ink-2: #4C4380;
  --muted: #8a93a8;      /* 次要文字 */
  --line: #e9edf6;

  --rose: #6C4CE8;       /* 紫色主色（取自 AppIcon） */
  --rose-d: #5A3AD0;
  --blue: #8B7BF0;
  --violet: #A78BFA;
  --pink: #EDE8FF;

  --wrap: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

/* 单屏：禁止页面滚动 */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}
.row { display: flex; align-items: center; }

/* ============ 整屏框架 ============ */

.page {
  height: 100vh;
  height: 100dvh;          /* 移动端地址栏兼容 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- 顶栏 ---- */
.topbar { flex: 0 0 auto; height: 78px; }
.topbar .row { height: 100%; gap: 32px; }

.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--ink);
  text-decoration: none;
}
.brand .dot { color: var(--rose); }
.brand.mini { font-size: 16px; }

.topnav { display: flex; gap: 30px; margin-right: auto; }
.topnav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.topnav a:hover { color: var(--ink); }

.actions { display: flex; align-items: center; gap: 10px; }

.btn-login {
  border: 0; background: none;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.btn-login:hover { color: var(--rose); background: #F5F1FF; }

/* ---- 按钮 ---- */
.btn-primary {
  border: 0;
  font-family: inherit;
  font-size: 15px; font-weight: 600;
  color: #fff;
  background: var(--rose);
  padding: 15px 34px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 14px 28px -12px rgba(108, 76, 232, .75);
  transition: transform .18s, background .18s, box-shadow .18s;
}
.btn-primary:hover {
  background: var(--rose-d);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -12px rgba(108, 76, 232, .8);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary.sm { padding: 10px 20px; font-size: 14px; }
.btn-primary.wide { width: 100%; padding: 14px; border-radius: 14px; }

.btn-text {
  border: 0; background: none;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  padding: 10px 6px;
  border-bottom: 1px solid transparent;
}
.btn-text:hover { color: var(--rose); border-bottom-color: var(--rose); }

.btn-ghost {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: var(--rose);
  background: #fff;
  border: 1px solid var(--rose);
  padding: 0 16px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: .2s;
}
.btn-ghost:hover:not(:disabled) { background: var(--rose); color: #fff; }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost.wide { width: 100%; padding: 12px; flex: none; }

.burger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 6px; cursor: pointer;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---- 主体 ---- */
.main {
  flex: 1 1 auto;
  min-height: 0;                /* 允许在整屏内收缩 */
  display: flex;
  align-items: center;
}

.main-row {
  display: grid;
  grid-template-columns: 46% 54%;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* ===== 左侧文字 ===== */
.col-left { padding-right: 12px; }

.tag {
  display: inline-block;
  font-size: 12.5px; font-weight: 600;
  color: var(--rose);
  background: #F3EFFF;
  border: 1px solid #E4DBFF;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.title {
  margin: 0 0 18px;
  font-size: clamp(38px, 4.6vw, 68px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.6px;
  color: var(--ink);
}

/* 理念 slogan：艺术衬线斜体 + 渐变 */
.lead {
  margin: 0 0 34px;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(21px, 2.5vw, 32px);
  line-height: 1.35;
  letter-spacing: .3px;
  background: linear-gradient(96deg, var(--rose), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 左侧：五条核心理念 */
.feats {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feats li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.feats li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 9px; height: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--rose), var(--violet));
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* ===== 右侧：竖卡片叠放 ===== */

/* 渐变 / 滤镜定义用，不占位 */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.col-right {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: min(480px, 100%);
  margin-left: auto;
  perspective: 1300px;            /* 3D 透视：卡片侧立而非正面 */
  perspective-origin: 62% 46%;
  transform-style: preserve-3d;
}

.card3d {
  position: absolute;
  width: 32%;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  /* --mx / --my 由 JS 按鼠标位置写入，实现跟随倾斜 */
  transition: transform .35s ease-out, box-shadow .3s ease;
}

/* ---- 词卡：白卡 + 左上小圆点 + 词义，呼应 AppIcon 与产品本身 ---- */
.wc {
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 40px -20px rgba(36, 28, 92, .38);
}
/* 顶部一条主题渐变，作为卡片的“书脊” */
.wc::after {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--rose), var(--violet));
  opacity: .9;
}
/* 左上角小圆点：来自 AppIcon 的卡片孔位 */
.wc-dot {
  position: absolute;
  left: 8%; top: 9%;
  width: 8.5%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--rose);
}
/* 右上角语音波形：AI 真人语音读例句 */
.wc-wave {
  position: absolute;
  right: 8%; top: 9%;
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}
.wc-wave i {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: var(--rose);
  opacity: .75;
  animation: wv 1.2s ease-in-out infinite;
}
.wc-wave i:nth-child(1) { height: 5px;  animation-delay: 0s; }
.wc-wave i:nth-child(2) { height: 10px; animation-delay: .15s; }
.wc-wave i:nth-child(3) { height: 7px;  animation-delay: .3s; }
.wc-wave i:nth-child(4) { height: 12px; animation-delay: .45s; }
@keyframes wv {
  0%, 100% { transform: scaleY(.45); }
  50%      { transform: scaleY(1); }
}

.wc-body {
  position: absolute;
  left: 8%; right: 8%; top: 32%; bottom: 10%;
  display: flex;
  flex-direction: column;
  gap: 7%;
}
.wc-word {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 21px);
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--ink);
}
.wc-phon {
  margin: 0;
  font-size: 11.5px;
  color: var(--rose);
}
.wc-mean {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* 站位：约 30° 斜对观众（立着），前面的卡片略大
   鼠标移动时按不同幅度跟随倾斜 —— 越靠前幅度越大，形成层次视差 */
.c-a {
  left: 1%;  top: 20%; z-index: 2;
  transform: rotateY(calc(-32deg + var(--mx, 0) * 16deg))
             rotateX(calc(6deg - var(--my, 0) * 12deg))
             rotateZ(-3deg) scale(var(--hov, 1));
}
.c-b {
  left: 21%; top: 9%;  z-index: 3;
  transform: rotateY(calc(-28deg + var(--mx, 0) * 14deg))
             rotateX(calc(6deg - var(--my, 0) * 10deg))
             rotateZ(2deg) scale(var(--hov, 1));
}
.c-c {
  left: 41%; top: 0;  z-index: 4;
  width: 36%;
  transform: rotateY(calc(-24deg + var(--mx, 0) * 12deg))
             rotateX(calc(4deg - var(--my, 0) * 9deg))
             rotateZ(-1deg) scale(var(--hov, 1));
}

/* ---- 悬停：轻微放大 ---- */
.card3d:hover { --hov: 1.045; }

.wc:hover {
  box-shadow: 0 26px 52px -20px rgba(36, 28, 92, .5);
}

/* ---- 氛围光：卡组背后的紫色柔光 ---- */
.aura {
  position: absolute;
  inset: -10% -6%;
  background:
    radial-gradient(46% 42% at 70% 38%, rgba(108, 76, 232, .26), transparent 70%),
    radial-gradient(42% 40% at 36% 70%, rgba(167, 139, 250, .22), transparent 70%),
    radial-gradient(38% 36% at 58% 88%, rgba(237, 232, 255, .34), transparent 72%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
  transform: translate(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -6px));
  transition: transform .5s ease-out;
}



/* ---- 底栏 ---- */
.footbar {
  flex: 0 0 auto;
  height: 58px;
  border-top: 1px solid var(--line);
}
.footbar .row { height: 100%; justify-content: space-between; gap: 16px; }
.foot-note { font-size: 13px; color: var(--muted); }

/* ============ 弹窗 ============ */

.modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  z-index: 60;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(30, 24, 74, .45);
  backdrop-filter: blur(5px);
  animation: fade .22s both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-body {
  position: relative;
  width: min(420px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  padding: 34px 32px 32px;
  box-shadow: 0 36px 80px -28px rgba(30, 24, 74, .5);
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.modal-x {
  position: absolute; right: 16px; top: 12px;
  border: 0; background: none;
  font-size: 26px; line-height: 1;
  color: var(--muted); cursor: pointer;
}
.modal-x:hover { color: var(--ink); }

.modal-brand { text-align: center; margin-bottom: 20px; }
.modal-brand .brand { font-size: 22px; }
.modal-brand p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.tabs {
  display: flex; gap: 6px;
  background: #f5f7fc;
  padding: 5px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.tab {
  flex: 1; border: 0; background: none;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--muted);
  padding: 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: .2s;
}
.tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 10px -4px rgba(30, 24, 74, .3);
}

.pane { display: none; }
.pane.active { display: block; }

.field { display: block; margin-bottom: 15px; }
.field > span {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field em { font-style: normal; font-weight: 400; color: var(--muted); }

.field input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfe;
  outline: none;
  transition: .18s;
}
.field input:focus {
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 76, 232, .13);
}
.field input::placeholder { color: #b3bccd; }

.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }

.msg {
  min-height: 20px;
  margin: 0 0 12px;
  font-size: 13px;
  color: #d1453b;
}
.msg.ok { color: #2f9e6b; }

#paneProfile { text-align: center; padding: 4px 0; }
.avatar {
  width: 66px; height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 25px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--violet));
}
#paneProfile h3 { margin: 0 0 4px; font-size: 18px; }
#paneProfile .muted { margin: 0 0 20px; font-size: 13px; color: var(--muted); }

/* ============ 响应式（小屏允许滚动） ============ */

@media (max-width: 1000px) {
  html, body { overflow: auto; }
  .page { height: auto; min-height: 100dvh; }
  .main { padding: 24px 0; }
  .main-row { grid-template-columns: 1fr; gap: 8px; }
  .col-right { justify-content: center; height: auto; }
  .stack { height: 340px; max-width: 430px; margin: 0 auto; }
  .topnav { display: none; }
  .actions { margin-left: auto; }
  .burger { display: flex; }
  .topnav.open {
    display: flex;
    position: absolute;
    top: 70px; right: 20px;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    padding: 16px 22px;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 36px -16px rgba(30, 24, 74, .3);
  }
}

@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .topbar { height: 66px; }
  .title { font-size: 34px; letter-spacing: -1px; }
  .lead { font-size: 15px; margin-bottom: 26px; }
  .btn-primary { padding: 14px 28px; }
  .footbar { height: 50px; }
}

/* ============================================================
   主题：浅色为默认，深色由 <html data-theme="dark"> 切换
   深色基调：深空紫黑 + 提亮的主色，词卡转为深色卡片
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
}

body {
  background: var(--bg);
  transition: background-color .32s ease, color .32s ease;
}

:root[data-theme="dark"] {
  --ink: #eef1f9;          /* 主文字转浅 */
  --ink-2: #bdc4d9;
  --muted: #8b93ab;
  --line: #272d41;
  --soft: #141828;

  --bg: #0a0d16;           /* 深空背景 */
  --surface: #141827;      /* 弹窗/表面 */

  /* 饱和色在暗底上提亮，保持辨识度 */
  --rose: #9B7CFF;
  --rose-d: #8560F0;
  --blue: #A99CFF;
  --violet: #B9A6FF;
  --pink: #E6DEFF;
}

/* ---- 主题切换按钮 ---- */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: rgba(139, 108, 255, .10);
}

/* ---- 深色下的组件适配 ---- */

/* 词卡：暗色下转为深色卡片 */
:root[data-theme="dark"] .wc {
  background: #171b2e;
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .7);
}

/* 氛围光在深色下更浓 */
:root[data-theme="dark"] .aura { opacity: 1.5; }

/* 顶栏 / 底栏 */
:root[data-theme="dark"] .site-header {
  background: rgba(10, 13, 22, .84);
  border-bottom-color: var(--line);
}
:root[data-theme="dark"] .footbar { border-top-color: var(--line); }

/* 标签 */
:root[data-theme="dark"] .tag {
  background: rgba(139, 108, 255, .16);
  border-color: rgba(139, 108, 255, .38);
  color: #C9B6FF;
}

/* 弹窗与表单 */
:root[data-theme="dark"] .modal-body {
  background: var(--surface);
  box-shadow: 0 36px 80px -28px rgba(0, 0, 0, .8);
}
:root[data-theme="dark"] .modal-backdrop { background: rgba(3, 5, 12, .68); }
:root[data-theme="dark"] .tabs { background: #1b2033; }
:root[data-theme="dark"] .tab.active { background: #272d43; color: var(--ink); }
:root[data-theme="dark"] .field input {
  background: #1b2033;
  border-color: var(--line);
  color: var(--ink);
}
:root[data-theme="dark"] .field input::placeholder { color: #6b7391; }
:root[data-theme="dark"] .field input:focus { background: #1f2438; }
:root[data-theme="dark"] .btn-ghost { background: transparent; }
:root[data-theme="dark"] .btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
:root[data-theme="dark"] .btn-login:hover { background: rgba(139, 108, 255, .12); }

/* 提示文字 */
:root[data-theme="dark"] .msg { color: #ff8fa3; }
:root[data-theme="dark"] .msg.ok { color: #4ade80; }

/* 平滑过渡 */
:root[data-theme="dark"] .wc,
:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .footbar,
:root[data-theme="dark"] .modal-body {
  transition: background .32s ease, box-shadow .32s ease;
}

/* ---- 备案号：常年可见，样式低调但清晰 ---- */
.foot-sep { margin: 0 6px; opacity: .55; }
.beian {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.beian:hover { color: var(--rose); border-bottom-color: var(--rose); }

/* 窄屏：备案号换行，避免和版权挤成一团 */
@media (max-width: 620px) {
  .footbar { height: auto; padding: 10px 0; }
  .footbar .row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .foot-note { font-size: 12px; }
}
