/* 首屏＋八個功能段＋All in Tephra。
   跟後面的 Own your files 同一套：英文鏤空大字一行一行錯開出現 → 中文標題＋說明 → App 畫面。
   一般捲動閱讀的節奏，不釘住、不 scrub；App 畫面裡的小示範只播一次。 */

/* ── 鏤空大字的排法變化（同一家：字、描邊、三行錯位不變） ───────────── */
.big-title--left .bt-line,
.big-title--left .bt-line:nth-child(n) {
  justify-self: start;
  margin-right: 0;
  margin-left: 4%;
}

.big-title--col-right .bt-line,
.big-title--col-right .bt-line:nth-child(n) {
  justify-self: end;
  margin-right: 4%;
  margin-left: 0;
}

.big-title--center .bt-line:nth-child(n) {
  justify-self: center;
  margin-right: 0;
  margin-left: 0;
}

.big-title--stairs .bt-line:nth-child(1) {
  justify-self: start;
  margin-left: 6%;
}

.big-title--stairs .bt-line:nth-child(2) {
  justify-self: center;
  margin-right: 0;
}

.big-title--stairs .bt-line:nth-child(3) {
  justify-self: end;
  margin-right: 6%;
}

/* 字比較長的那一行縮一點（THOUGHTS），很短的放大（AI） */
.big-title--long .bt-line:nth-child(3) {
  font-size: min(196px, 14.6vw);
}

.big-title--short .bt-line:nth-child(3) {
  font-size: min(300px, 25vw);
}

/* 擦出：外層當遮罩、字從下面升上來（只動 transform） */
.big-title[data-enter="wipe"] .bt-line {
  overflow: hidden;
  overflow: clip;
  padding: 0.05em 0.04em;
  margin-top: -0.05em;
  margin-bottom: -0.05em;
}

/* ── 首屏 ──────────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + clamp(28px, 4vw, 64px)) var(--gutter) clamp(72px, 9vw, 128px);
}

.hero__grid {
  display: grid;
  gap: clamp(40px, 5vw, 72px);
  max-width: 1240px;
  margin: 0 auto;
  align-items: center;
}

@media (min-width: 980px) {
  .hero__grid {
    grid-template-columns: 1.02fr 1fr;
  }
}

.big-title--hero {
  max-width: none;
  margin: 0 0 clamp(22px, 3vw, 40px);
}

.big-title--hero .bt-line:nth-child(n) {
  margin-left: 0;
  font-size: min(122px, 11.4vw);
}

.big-title--hero .bt-line:nth-child(3) {
  font-size: min(188px, 17vw);
}

.hero__eyebrow {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.18em;
}

.hero__title {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 46px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.28;
  text-wrap: balance;
}

.hero__sub {
  max-width: 30em;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 28px;
}

.hero__note {
  color: var(--ink-2);
  font-size: 14px;
}

.hero__media,
.feature__media {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
}

/* ── 功能段：比資訊段收一點（八段連著讀），App 畫面往上疊到大字下緣（原片的遮擋語言） ── */
.feature {
  padding-top: clamp(72px, 9vw, 132px);
  padding-bottom: clamp(80px, 10vw, 148px);
}

.feature .big-title {
  margin-bottom: clamp(28px, 4vw, 52px);
}

.feature .bt-line {
  font-size: min(128px, 11vw);
}

.feature .bt-line:nth-child(3) {
  font-size: min(204px, 15.5vw);
}

.feature .big-title--long .bt-line:nth-child(3) {
  font-size: min(178px, 13.6vw);
}

.feature .big-title--short .bt-line:nth-child(3) {
  font-size: min(260px, 22vw);
}

@media (min-width: 900px) {
  .feature .info__grid .feature__media {
    margin-top: calc(-1 * clamp(40px, 6.5vw, 104px));
  }
}

/* ── 功能段的版面變化 ──────────────────────────────────────────── */
@media (min-width: 900px) {
  .info__grid--flip .feature__media {
    order: -1;
  }

  .info__grid--wide {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .info__grid--flip.info__grid--wide {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.info__text--center {
  max-width: 760px;
  margin: 0 auto clamp(32px, 4vw, 56px);
  text-align: center;
}

.info__text--center .info__title {
  text-wrap: balance;
}

.feature__media--wide {
  max-width: 1000px;
  margin: 0 auto;
}

/* 說明文字裡的小鍵帽 */
.info__lead kbd {
  display: inline-grid;
  min-width: 1.9em;
  height: 1.7em;
  place-items: center;
  margin: 0 0.1em;
  padding: 0 0.42em;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 0.32em;
  background: #151517;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 1px 2px rgb(0 0 0 / 0.3);
  color: #f7f7f8;
  font-size: 0.82em;
  font-weight: 560;
  line-height: 1;
  vertical-align: 0.08em;
  white-space: nowrap;
}

.hud-keys {
  display: flex;
  gap: 10px;
}

/* 鍵帽浮在視窗右下角外側（Capture）：不壓大字、也不蓋標題列 */
.hud-keys--corner {
  position: absolute;
  z-index: 2;
  right: max(8px, calc(50% - 270px + 22px));
  bottom: -24px;
}

/* ── App 視窗（深色主題，照 App.css） ───────────────────────────── */
.app {
  position: relative;
  width: min(100%, 540px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-window);
  background: var(--note);
  color: var(--note-ink);
  font-family: var(--font-ui);
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.06),
    0 2px 6px rgb(0 0 0 / 0.18),
    0 18px 40px rgb(0 0 0 / 0.22),
    0 48px 96px rgb(0 0 0 / 0.24);
}

.app__bar {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.app__title {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  gap: 8px;
  color: var(--note-ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.app__title .icon {
  color: var(--muted);
}

.app__tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon--more {
  width: 16px;
  height: 16px;
}

.app__body {
  min-height: 300px;
  padding: 26px 30px 34px;
}

.note-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.6;
}

.note-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wl {
  color: var(--link-dark);
  text-decoration: underline;
  text-decoration-color: var(--link-dark);
  text-underline-offset: 3px;
}

.doc-h {
  margin: 0 0 6px;
  color: var(--note-ink);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.doc-p {
  margin: 0;
  color: var(--note-ink);
  font-size: 16px;
  font-weight: 430;
  letter-spacing: 0.01em;
  line-height: 1.78;
}

.doc-p--muted {
  color: var(--note-ink-2);
}

.doc-ul {
  margin: 0;
  padding: 0 0 0 1.1em;
  color: var(--note-ink);
  font-size: 16px;
  line-height: 1.85;
}

.doc-ul li::marker {
  color: var(--muted);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  background: var(--primary);
  vertical-align: -0.2em;
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.checkbox__fill {
  position: absolute;
  inset: -1px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--primary);
}

.tick {
  grid-area: 1 / 1;
  visibility: hidden;
}

.tick:last-child {
  visibility: visible;
}

/* Make it clean：選取＋「建立 WikiLink」＋新筆記小卡 */
.sel-wrap {
  position: relative;
  margin-top: 14px;
}

.sel {
  position: absolute;
  inset: -4px -8px;
  border-radius: var(--radius-sm);
  background: var(--selection);
  transform-origin: left center;
}

.sel-wrap > p {
  position: relative;
}

.popover {
  width: fit-content;
  margin: 14px 0 0 auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--note-raised);
  box-shadow: 0 12px 36px rgb(0 0 0 / 0.46), 0 2px 7px rgb(0 0 0 / 0.3);
  transform-origin: right top;
}

.popover__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 8px 0 12px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
}

.popover__btn kbd {
  padding: 2px 5px;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 4px;
  font-size: 11px;
}

.file-card {
  position: absolute;
  right: -4%;
  bottom: -26px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-window);
  background: var(--note-raised);
  color: var(--note-ink);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.3), 0 4px 10px rgb(0 0 0 / 0.2);
}

.file-card .icon {
  width: 22px;
  height: 22px;
  color: var(--link-dark);
}

.file-card span {
  display: grid;
  gap: 2px;
}

.file-card b {
  font-size: 14px;
  font-weight: 650;
}

.file-card small {
  color: var(--muted);
  font-size: 12px;
}

/* Pin your task：上下分割 */
.app__pane--top {
  padding: 20px 30px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--note-soft);
}

.app__pane-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  color: var(--note-ink);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.app__pane-title .icon {
  color: var(--muted);
}

.app__body--pane {
  min-height: 0;
  padding: 14px 30px 30px;
}

/* Control your time：選單＋計時器 */
.tb-swap {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.tb-swap > * {
  grid-area: 1 / 1;
}

.tb-time {
  display: grid;
  color: var(--note-ink-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

[data-split-icon] {
  visibility: hidden;
}

.tb-more {
  display: grid;
  place-items: center;
  width: 26px;
  height: 24px;
  border-radius: var(--radius-md);
}

.menu {
  position: absolute;
  top: 50px;
  right: 10px;
  z-index: 3;
  display: grid;
  width: 236px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--note-raised);
  box-shadow: 0 12px 36px rgb(0 0 0 / 0.46), 0 2px 7px rgb(0 0 0 / 0.3);
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transform-origin: right top;
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  color: var(--note-ink-2);
}

.menu__item kbd {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.menu__item--hot {
  background: var(--note-hover);
  color: var(--note-ink);
}

.menu__sep {
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}

/* App 的 .focus-timer-hud：右下半透明大字＋底邊進度（剩餘時間，從滿格往下縮） */
.time-hud {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 120px;
  overflow: hidden;
  pointer-events: none;
}

.time-hud__digits {
  position: absolute;
  right: 18px;
  bottom: -14px;
  display: grid;
  justify-items: end;
  color: var(--note-ink);
  font-size: 84px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  opacity: 0.1;
}

.time-hud__track,
.time-hud__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
}

.time-hud__track {
  background: rgb(255 122 69 / 0.12);
}

.time-hud__progress {
  background: rgb(255 122 69 / 0.78);
  transform: scaleX(0.985);
  transform-origin: left center;
}

/* Keep your focus：變暗的桌面＋中間一張筆記 */
.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(160deg, #d9d9de, #c9c9cf);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06), 0 30px 60px rgb(0 0 0 / 0.16);
}

.screen__win {
  position: absolute;
  border-radius: 10px;
  background: #f4f4f6;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.14);
}

.screen__win::before {
  position: absolute;
  top: 18%;
  right: 10%;
  left: 10%;
  height: 52%;
  background: repeating-linear-gradient(180deg, #dcdce1 0 9px, transparent 9px 26px);
  content: "";
}

.screen__win--a {
  top: 9%;
  left: 5%;
  width: 40%;
  height: 58%;
}

.screen__win--b {
  right: 6%;
  bottom: 8%;
  width: 34%;
  height: 50%;
}

.screen__dim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.64);
}

.app--focus {
  position: absolute;
  inset: 0;
  width: 46%;
  height: 52%;
  margin: auto;
  background: var(--note-soft);
}

.app__body--focus {
  display: grid;
  height: 100%;
  min-height: 0;
  place-items: center;
  padding: 0 8%;
}

.focus-copy {
  width: 100%;
  margin: 0;
  color: var(--note-ink);
  font-size: clamp(14px, 1.5vw, 19px);
  font-weight: 450;
  line-height: 1.8;
}

.hud-keys--in {
  position: absolute;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
}

/* Record your thoughts：語音膠囊（點點球＋秒數＋取消） */
.capsule {
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 156px;
  height: 42px;
  margin-left: -78px;
  border-radius: 999px;
  box-shadow: 0 26px 40px rgb(0 0 0 / 0.42), 0 8px 16px rgb(0 0 0 / 0.28);
}

.capsule__body {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 999px;
  background: rgb(10 10 12);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
  color: #fff;
}

.orb {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.orb svg {
  width: 20px;
  height: 20px;
}

.capsule__text {
  display: grid;
  justify-items: center;
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.capsule__x {
  display: grid;
  place-items: center;
}

.capsule__x .icon {
  stroke-width: 2.5;
}

/* Work with AI：筆記＋右邊的 Terminal（工作目錄＝筆記資料夾） */
.app--ai {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  width: min(100%, 700px);
}

.app__main {
  min-width: 0;
}

.app__main .app__bar {
  grid-template-columns: auto 1fr auto;
}

.app__layers {
  display: grid;
}

.app__layer {
  grid-area: 1 / 1;
}

.app__layer[data-before] {
  visibility: hidden;
}

.term {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #1a1a1a;
  font-family: var(--font-mono);
}

.term__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--note);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
}

.term__tools {
  display: flex;
  gap: 10px;
}

.term__body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 16px;
  font-size: 12.5px;
  line-height: 1.6;
}

.term__body p {
  margin: 0;
}

.term__cwd {
  color: var(--muted);
}

.term__prompt {
  color: var(--link-dark);
}

.term__dots {
  display: flex;
  gap: 3px;
  letter-spacing: 0.1em;
  visibility: hidden;
}

.term__dots i {
  font-style: normal;
}

.term__ok {
  color: #3fb950;
}

/* Connect your vault：左 Obsidian、右資料夾，虛線接進中間的筆記 */
.connect-row {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) minmax(0, 300px) minmax(24px, 1fr) auto;
  align-items: center;
  width: 100%;
}

.connect-row__icon {
  display: grid;
  width: clamp(64px, 10vw, 120px);
  place-items: center;
  filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.22));
}

.connect-row__icon img {
  width: 100%;
  height: auto;
}

.connect-row__dash {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  transform-origin: left center;
}

.connect-row__dash--rev {
  transform-origin: right center;
}

.connect-row__dash i {
  display: block;
  width: calc(100% + 64px);
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--primary) 0 18px, transparent 18px 32px);
}

.connect-row__dash--rev i {
  margin-left: -64px;
}

.app--mini {
  width: 100%;
}

.app--mini .app__bar {
  grid-template-columns: auto 1fr auto;
  height: 44px;
}

.app--mini .app__body {
  min-height: 0;
  padding: 18px 22px 24px;
}

.app--mini .doc-p {
  font-size: 15px;
}

/* ── All in Tephra ─────────────────────────────────────────────── */
.feature--allin {
  display: grid;
  justify-items: center;
  text-align: center;
}

.allin__logo {
  width: clamp(120px, 14vw, 190px);
  height: auto;
  margin-bottom: clamp(16px, 2vw, 28px);
  filter: drop-shadow(0 22px 44px rgb(0 0 0 / 0.22));
}

.big-title--allin {
  width: 100%;
  margin-bottom: clamp(24px, 3vw, 40px);
}

/* ALL IN 排成一行，TEPHRA 在下面放大 */
.big-title--allin {
  grid-template-columns: 1fr 1fr;
}

.big-title--allin .bt-line:nth-child(-n + 2) {
  font-size: min(112px, 10vw);
}

.big-title--allin .bt-line:nth-child(1) {
  justify-self: end;
  margin-right: 0.12em;
}

.big-title--allin .bt-line:nth-child(2) {
  justify-self: start;
  margin-left: 0.12em;
}

.big-title--allin .bt-line:nth-child(3) {
  grid-column: 1 / -1;
  margin-top: 0.06em;
}

.bt-line--tephra {
  position: relative;
}

.bt-line--tephra .ink {
  color: var(--ink);
}

.js-motion .bt-line--tephra .ink {
  color: transparent;
}

.crystal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.allin__line {
  max-width: 24em;
  margin: 0;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 600;
  line-height: 1.6;
  text-wrap: balance;
}

/* ── 手機 ──────────────────────────────────────────────────────── */
@media (max-width: 899px) {
  .feature__media {
    margin-top: 8px;
  }

  .app__body {
    min-height: 0;
    padding: 22px 22px 28px;
  }

  .file-card {
    right: 6px;
    bottom: -30px;
  }

  .app--ai {
    grid-template-columns: 1fr;
  }

  .term {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .app--focus {
    width: 70%;
    height: 56%;
  }

  .hud-keys--in .key-face {
    min-width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .connect-row {
    grid-template-columns: auto minmax(12px, 1fr) minmax(0, 170px) minmax(12px, 1fr) auto;
  }

  .app--mini .app__body {
    padding: 14px 14px 18px;
  }

  .app--mini .doc-p {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
}
