/* 度量校正的后备字体:Cormorant Garamond 从 Google Fonts 下载完成前,先用它顶着。
   Georgia 在同字号下比 Cormorant 更宽更大,直接当后备会出现「刷新瞬间名字偏大偏粗、
   加载完变小」的闪烁(FOUT)。这里把 Georgia 缩到接近 Cormorant 的度量,换字时几乎不跳。 */
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Times");
  size-adjust: 88%;
  ascent-override: 95%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --ink: #0b0906;
  --cream: #f3ece1;
  --gold: #c9a227;
  --serif: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #000;
}

body {
  font-family: var(--sans);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 只做手机版：桌面上也按一部手机的宽度居中显示 */
#root {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--ink);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}
/**
 * The ready-state invitation and its utility line.
 *
 * These styles are imported by `src/main.tsx`, so they ship in the entry
 * stylesheet. That is the whole point of the file: the button is rendered by
 * `App.tsx` / `Elio.tsx` before the visitor asks for anything, and
 * `VoiceExperience` is a lazy chunk of roughly 230 kB. When these rules lived
 * in `voice.css` they arrived with that chunk, so on a slow link the invitation
 * painted as a browser-default button — 20px tall, no pill, no glass — which is
 * the exact regression recorded in `voice.css` history (a UA-default button was
 * once the only way into the product, 04-ui-spec §7).
 *
 * Nothing here may move back into the chunk. `hero.css` is deliberately
 * independent of `voice.css`: the voice variables are scoped to the dock and
 * its sheets, so they are redeclared here rather than inherited, and
 * `backend/tests/test_landing_bundle.py` asserts `.voice-talk` is present in
 * the entry stylesheet.
 *
 * The sizes are not decoration. `44px` is the minimum target a thumb can hit
 * reliably (04-ui-spec §7); the pill is 52px.
 */

.voice-talk,
.voice-disclosure,
.voice-hint {
  --voice-cream: #f3ece1;
  --voice-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

.voice-talk {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 52px;
  margin-top: 24px;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.09));
  color: var(--voice-cream);
  font: 600 17px/1.2 var(--voice-sans);
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px rgba(255, 255, 255, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px) saturate(1.8) brightness(1.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(1.7);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

/* 按钮同时挂 `.glass .voice-talk`；`.glass` 里 font-weight:400 与 `.voice-talk` 同级、
   且后加载会盖掉 shorthand 里的 600。复合选择器提高优先级,保证 CTA 是 600。 */
.glass.voice-talk {
  font-weight: 600;
}

/* 跟随光标的环形高光：只亮鼠标附近那一段边框（--mx/--my 由 JS 的 onMouseMove 写入）。 */
.voice-talk::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px; /* = 高光环的粗细 */
  background: radial-gradient(
    90px circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0) 60%
  );
  /* 只保留 padding 边缘那一圈（把内容框挖掉）→ 呈现为环形描边 */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.voice-talk:hover:not(:disabled)::after {
  opacity: 1;
}

.voice-talk:hover:not(:disabled) {
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.7),
    inset 0 -1px rgba(255, 255, 255, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.42);
}

.voice-talk:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Call 按钮 + 圆形试听按钮同排；上方 gap 收在这一行上，避免和 .voice-talk 自身 margin 叠加 */
.hero__cta-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
}

.hero__cta-row .voice-talk {
  margin-top: 0;
}

/* 圆形试听按钮：次级操作 —— 不用 CTA 那套厚玻璃/阴影,只做淡淡的描边+底,图标也偏暗,
   明显弱于主 CTA。 */
.hero__sample-btn {
  flex: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(243, 236, 225, 0.28);
  background: rgba(243, 236, 225, 0.06);
  color: rgba(243, 236, 225, 0.72);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.hero__sample-btn:hover {
  background: rgba(243, 236, 225, 0.12);
  border-color: rgba(243, 236, 225, 0.45);
  color: #f3ece1;
}

.hero__sample-btn.is-playing {
  background: rgba(243, 236, 225, 0.16);
  color: #f3ece1;
}

/* 拨号 CTA 左侧的电话图标（voice-talk / hero__phone 都是 inline-flex 居中）。
   听筒本身是 "\" 走向（耳朵在左上、话筒在右下）；顺时针旋转才会把它"立"起来，
   逆时针反而更躺平。这里转 +30° 让它明显竖起一点。 */
.call-icon {
  flex: none;
  /* 间距统一交给父按钮的 gap（voice-talk / endscreen__callagain / hero__phone 都用 flex+gap），
     不再自带 margin，否则会和 gap 叠加、间距显得过大。 */
  transform: rotate(30deg);
}

.voice-disclosure,
.voice-hint {
  margin: 12px 0 0;
  font: 300 12px/1.6 var(--voice-sans);
  letter-spacing: 0.02em;
  color: rgba(243, 236, 225, 0.82);
  text-shadow: 0 1px 2px rgba(11, 9, 6, 0.7);
  max-width: 24em;
}

.voice-hint {
  color: rgba(243, 226, 181, 0.94);
}

/* 内联同意告知里的 Terms / Privacy 链接（取代旧的全屏勾选弹窗，见 CallDisclosure.tsx） */
.call-disclosure__link {
  color: rgba(243, 236, 225, 0.92);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.call-disclosure__link:hover {
  color: #fff;
}

/* ---------------------------------------------------------------------
 * "Things Elio remembers" (MemoryCard, F6 2026-09-30). Here rather than in
 * voice.css for the reason above: the return-visit card is rendered with the
 * invitation, before the conversation chunk is fetched.
 * ------------------------------------------------------------------ */

.voice-remembered {
  --voice-cream: #f3ece1;
  --voice-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --voice-serif: "Cormorant Garamond", Georgia, serif;
  box-sizing: border-box;
  max-width: 420px;
  margin: 18px 0 4px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(243, 236, 225, 0.18);
  border-radius: 14px;
  background: rgba(11, 9, 6, 0.46);
  color: var(--voice-cream);
  font-family: var(--voice-sans);
  text-align: left;
}

.voice-remembered__eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfc1aa;
}

.voice-remembered__title {
  margin: 2px 0 0;
  font-family: var(--voice-serif);
  font-size: 19px;
  font-style: italic;
  color: #fff;
}

.voice-remembered__list {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #efe6d8;
}

.voice-remembered__item + .voice-remembered__item {
  margin-top: 4px;
}

.voice-remembered__fine {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #cfc1aa;
}

.voice-remembered__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.voice-remembered__link,
.voice-remembered__button {
  min-height: 44px;
  padding: 10px 2px;
  border: 0;
  background: none;
  color: #e4dacb;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.voice-remembered__button {
  padding: 10px 16px;
  border: 1px solid rgba(243, 236, 225, 0.35);
  border-radius: 999px;
  text-decoration: none;
}

.voice-remembered__link:focus-visible,
.voice-remembered__button:focus-visible {
  outline: 2px solid #d9bc77;
  outline-offset: 2px;
}

/* 同意行里的「Manage memory」——button 复用 link 外观 */
.call-disclosure__manage {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* 通话前管理记忆的小面板（MemorySettings） */
.memset__backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 5, 3, 0.62);
  backdrop-filter: blur(2px);
}

.memset {
  box-sizing: border-box;
  width: 100%;
  max-width: 380px;
  padding: 22px 22px 18px;
  border: 1px solid rgba(243, 236, 225, 0.18);
  border-radius: 16px;
  background: #17130d;
  color: #f3ece1;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  text-align: left;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.memset__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: #fff;
}

.memset__body {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #cfc1aa;
}

.memset__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  font-size: 14px;
  color: #efe6d8;
}

.memset__toggle {
  width: 18px;
  height: 18px;
  accent-color: #d9bc77;
  cursor: pointer;
}

.memset__note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #b9a98a;
  min-height: 1em;
}

.memset__forget {
  margin-top: 14px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: #d9bc77;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.memset__forget:disabled {
  color: #b9a98a;
  text-decoration: none;
  cursor: default;
}

.memset__forget:focus-visible {
  outline: 2px solid #d9bc77;
  outline-offset: 2px;
}

.memset__done {
  margin-top: 16px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(243, 236, 225, 0.35);
  border-radius: 999px;
  background: none;
  color: #f3ece1;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.memset__done:hover {
  background: rgba(243, 236, 225, 0.08);
}

.memset__done:focus-visible,
.call-disclosure__manage:focus-visible {
  outline: 2px solid #d9bc77;
  outline-offset: 2px;
}
