@font-face {
  font-family: 'PP Neue Montreal';
  src: url('fonts/PPNeueMontreal-Book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('fonts/PPNeueMontreal-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Hatton';
  src: url('fonts/PPHatton-Ultralight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Hatton';
  src: url('fonts/PPHatton-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background: rgba(172, 168, 230, 0.35);
  color: var(--text-primary);
}

:root {
  --bg: #ffffff;
  --text-primary: #1a1a18;
  --text-secondary: rgba(26, 26, 24, 0.4);
  --toggle-bg: rgba(26, 26, 24, 0.07);
  --toggle-pill: #ffffff;
  --footer-height: 56px;
  --transition: 300ms ease;
}

html {
  height: 100%;
  background: #EBE9F7;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'PP Neue Montreal', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Toggle ─────────────────────────────────────── */

.toggle-wrap {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.toggle {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--toggle-bg);
  border-radius: 100px;
  padding: 3px;
  gap: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toggle-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  background: var(--toggle-pill);
  border-radius: 100px;
  pointer-events: none;
  transition: transform var(--transition), width var(--transition);
  will-change: transform, width;
}

.toggle-btn {
  position: relative;
  z-index: 1;
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  transition: color var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.toggle-btn.active {
  color: var(--text-primary);
}

.toggle-btn:not(.active):hover {
  color: rgba(26, 26, 24, 0.65);
}

/* ── Hero ────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#canvas3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: filter var(--transition);
}

.hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px var(--footer-height);
  pointer-events: none;
}

.hero-text p {
  font-family: 'PP Hatton', serif;
  font-weight: 200;
  font-size: clamp(22px, 3.5vw, 46px);
  line-height: 1.25;
  text-align: center;
  color: var(--text-primary);
  max-width: 820px;
  opacity: 0;
  transition: opacity var(--transition);
}

#canvas3d.loaded {
  opacity: 1;
}

/* ── Chat bubble ─────────────────────────────────── */

.chat-bubble {
  position: absolute;
  background: rgba(84, 84, 91, 0.88);
  font-size: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 100px;
  padding: 7px 14px;
  font-family: 'PP Neue Montreal', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #faf9f7;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transform: scale(0.95);
  transform-origin: top left;
  transition: opacity 300ms ease, transform 300ms ease;
}

.chat-bubble.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1) 900ms, transform 800ms cubic-bezier(0.16, 1, 0.3, 1) 900ms;
}

/* ── Hero blur overlay (progressive, scroll-driven) ─ */

.hero-blur-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 70%);
  mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 70%);
  opacity: 0;
  will-change: backdrop-filter, opacity;
}

/* ── Page gradient bridge ────────────────────────── */

.page-gradient {
  position: relative;
  margin-top: -40vh;
  height: 40vh;
  background: linear-gradient(to bottom, transparent 0%, transparent 20%, #eceaf7 100%);
  pointer-events: none;
  z-index: 5;
}

/* ── Scroll section ──────────────────────────────── */

.scroll-section {
  position: relative;
  background: #eceaf7;
  padding: 140px 24px 160px;
  overflow: hidden;
}

.scroll-text {
  max-width: 750px;
  margin: 0 auto;
  font-family: 'PP Neue Montreal', sans-serif;
  font-size: clamp(22px, 2.1vw, 36px);
  line-height: clamp(32px, 3.2vw, 56px);
  color: #6f6f6f;
  letter-spacing: 0.5px;
  text-align: center;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.scroll-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-text p + p {
  margin-top: 1em;
}

.scroll-text-ghost-wrap {
  position: relative;
  margin-top: 1em;
}

.scroll-text-ghost-text {
  position: relative;
}

.scroll-text-ghost-text::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, #eceaf7 35%);
  pointer-events: none;
}

.scroll-text-placeholder-base {
  user-select: none;
  pointer-events: none;
}

.scroll-ghost-label {
  margin-top: 20px;
  font-size: 30px;
  line-height: 1.2em;
  color: #A3A3A3;
}

/* ── Scroll badges ───────────────────────────────── */

.scroll-badges {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: -110px;
}

.scroll-badge {
  filter:
    drop-shadow(0 2px 4px rgba(80, 70, 120, 0.08))
    drop-shadow(0 8px 20px rgba(80, 70, 120, 0.12))
    drop-shadow(0 24px 48px rgba(80, 70, 120, 0.08));
}

@keyframes badge-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.badge-ring {
  transform-origin: 87px 87px;
  animation: badge-spin 14s linear infinite;
}

.badge-ring--no-spin {
  animation: none;
}

.scroll-badges--returning {
  margin-top: 200px;
}

.badge-text {
  font-family: 'PP Hatton', serif;
  font-weight: 500;
  font-size: 36px;
  fill: #45454a;
  letter-spacing: -2px;
  word-spacing: 14px;
}

#badgeSquare .badge-text {
  word-spacing: 6px;
}

.badge-center-icon {
  font-family: 'PP Hatton', serif;
  font-size: 24px;
  fill: #45454a;
}

.scroll-link {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: opacity var(--transition);
}

.scroll-link:hover {
  color: #3d3d3b;
}

@media (max-width: 1150px) {
  .margin-img--cursor {
    transform: translateX(40px);
  }

  .margin-img--letters {
    transform: translateX(-40px);
  }

  .margin-img--content {
    transform: translateX(40px);
  }

  .margin-img--book {
    transform: translateX(-40px);
  }
}

@media (max-width: 600px) {
  .scroll-section {
    padding: 48px 48px 100px;
  }

  .scroll-text {
    font-size: 22px;
    line-height: 32px;
  }

  .scroll-text p + p {
    margin-top: 0.4em;
  }

  .margin-img--cursor {
    transform: translateX(80px);
  }

  .margin-img--letters {
    transform: translateX(-80px);
  }

  .margin-img--content {
    transform: translateX(80px);
  }

  .margin-img--book {
    transform: translateX(-80px);
  }
}

/* ── Margin images ───────────────────────────────── */

.margin-img {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease;
}

.margin-img.visible {
  opacity: 1;
}

.margin-img--cursor {
  width: 96px;
  right: 8%;
  top: 10%;
}

.margin-img--letters {
  width: 129px;
  left: 8%;
  top: 28%;
}

.margin-img--content {
  width: 126px;
  right: 6%;
  top: 38%;
}

.margin-img--book {
  width: 60px;
  left: 8%;
  top: 54%;
}

/* ── Card sets ───────────────────────────────────── */

.card-set {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.card {
  position: absolute;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 4px 14px rgba(0, 0, 0, 0.10),
    0 18px 44px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  /* exit: quick fade + snap back, no delay */
  transition: opacity 180ms ease, transform 180ms ease;
}

/* entrance: staggered, slower, toward center */
.card-set.visible .card:nth-child(1) {
  opacity: 1;
  transform: translate(0, 0);
  transition: opacity 560ms cubic-bezier(0.16, 1, 0.3, 1) 440ms,
              transform 560ms cubic-bezier(0.16, 1, 0.3, 1) 440ms;
}
.card-set.visible .card:nth-child(2) {
  opacity: 1;
  transform: translate(0, 0);
  transition: opacity 560ms cubic-bezier(0.16, 1, 0.3, 1) 490ms,
              transform 560ms cubic-bezier(0.16, 1, 0.3, 1) 490ms;
}
.card-set.visible .card:nth-child(3) {
  opacity: 1;
  transform: translate(0, 0);
  transition: opacity 560ms cubic-bezier(0.16, 1, 0.3, 1) 540ms,
              transform 560ms cubic-bezier(0.16, 1, 0.3, 1) 540ms;
}

/* ── About state ─────────────────────────────────── */

.hero-about-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 400ms ease;
  background:
    radial-gradient(ellipse 72% 58% at 52% 54%,
      rgba(172, 168, 230, 0.5) 0%,
      rgba(190, 186, 242, 0.25) 42%,
      transparent 70%);
}

.hero.state-about #canvas3d {
  filter: blur(32px);
  opacity: 0.55;
}

.hero.state-about .hero-about-glow {
  opacity: 1;
}

.hero.state-about .hero-text p {
  opacity: 1;
}

/* ── Footer ──────────────────────────────────────── */

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}

.footer-name {
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-link {
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
}

.footer-link img {
  height: 16px;
  width: auto;
  opacity: 0.4;
  transition: opacity var(--transition);
}

.footer-link:hover img {
  opacity: 1;
}

/* ── Chat Modal ──────────────────────────────────── */

.chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  background: rgba(234, 235, 243, 0.5);
  transition: opacity 200ms ease;
}

.chat-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.chat-backdrop.closing {
  transition-duration: 120ms;
}


.chat-modal {
  position: absolute;
  width: 500px;
  max-width: calc(100vw - 40px);
  height: auto;
  background: rgba(38, 37, 44, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: clip;
  transform: scale(0.96) translateY(6px);
  transform-origin: top left;
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease;
}

.chat-backdrop.open .chat-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.chat-backdrop.closing .chat-modal {
  transform: scale(0.97) translateY(4px);
  opacity: 0;
  transition-duration: 120ms;
  transition-timing-function: ease;
}


/* Body: holds empty state + thread in same space */
.chat-body {
  position: relative;
  overflow: clip;
}

/* Empty state */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.chat-empty-state.exit {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

/* Large typographic intro */
.chat-intro-text {
  font-family: 'PP Hatton', serif;
  font-weight: 200;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  width: 100%;
}

/* Inline clickable phrases */
.chat-inline-chip {
  font-family: 'PP Neue Montreal', sans-serif;
  font-weight: 400;
  font-size: 1.08em;
  background: transparent;
  border: none;
  padding: 2px 5px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.15);
  transition: background 180ms ease, text-decoration-color 180ms ease, color 180ms ease;
  vertical-align: middle;
  position: relative;
  top: -3px;
  line-height: inherit;
}

.chat-inline-chip--think {
  text-decoration-color: rgba(172, 168, 230, 0.45);
}

.chat-inline-chip--think:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(172, 168, 230, 0.18);
  text-decoration-color: rgba(172, 168, 230, 0.8);
}

.chat-inline-chip--work {
  text-decoration-color: rgba(100, 150, 210, 0.4);
  margin-left: -5px;
}

.chat-inline-chip--work:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(100, 150, 210, 0.18);
  text-decoration-color: rgba(100, 150, 210, 0.8);
}

.chat-input-line {
  display: inline-block;
  vertical-align: top;
}

.chat-input-line.spaced {
  display: block;
}

/* Inline input wrapper — flows inline with text */
.chat-inline-input-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  min-width: 205px;
  max-width: 100%;
  margin-left: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0px 6px 0px 10px;
  gap: 8px;
  vertical-align: middle;
  position: relative;
  top: 0px;
  transition: background 180ms ease;
}

.chat-inline-input-wrap.expanded {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  gap: 8px;
  padding-bottom: 6px;
}

.chat-inline-input-wrap.expanded .chat-inline-input {
  width: 100%;
  max-height: calc(1.65em * 3);
  overflow-y: auto;
  scrollbar-width: none;
}

.chat-inline-input-wrap:focus-within {
  background: rgba(255, 255, 255, 0.12);
}

.chat-inline-input {
  font-family: 'PP Neue Montreal', sans-serif;
  font-weight: 400;
  font-size: 1.08em;
  color: rgba(255, 255, 255, 0.85);
  outline: none;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  min-width: 100px;
  position: relative;
}

.chat-inline-input:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.28);
  pointer-events: none;
  position: absolute;
  white-space: nowrap;
}

/* Send button nested inside the input bg */
.chat-inline-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 180ms ease, color 180ms ease;
}

.chat-inline-send:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  color: #26252c;
}

.chat-inline-send:not(:disabled):hover {
  background: #ffffff;
}

/* Thread */
.chat-thread {
  display: none;
  overflow: clip auto;
  position: relative;
  padding: 20px 28px;
  flex-direction: column;
  gap: 24px;
  max-height: none;
  opacity: 0;
  transition: opacity 250ms ease;
}

.chat-modal.engaged {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease, top 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-thread.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
  max-height: min(520px, 70vh);
}

/* Messages */
.chat-message {
  display: flex;
  flex-direction: column;
  animation: msgIn 250ms ease forwards;
  opacity: 0;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-message--user {
  align-items: flex-end;
}

.chat-bubble-msg {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 18px 18px 4px 18px;
  padding: 11px 16px;
  font-size: 20px;
  line-height: 1.5;
  max-width: 75%;
  white-space: pre-wrap;
}

.chat-message--ai {
  align-items: flex-start;
}

.chat-ai-text {
  font-size: 20px;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.82);
  width: 100%;
}

.chat-ai-text > p,
.chat-ai-text > ul,
.chat-ai-text > ol {
  max-width: 92%;
}

.chat-ai-text p + p { margin-top: 0.8em; }
.chat-ai-text strong { font-weight: 700; }
.chat-ai-text ul { margin: 0.5em 0 0.5em 1.4em; }
.chat-ai-text li { margin-bottom: 0.3em; }

/* Card placeholder */
.chat-card-placeholder {
  flex-shrink: 0;
  width: 100%;
  background: #fefefe;
  border-radius: 12px;
  padding: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26, 26, 24, 0.2);
  cursor: pointer;
}

.chat-card-media {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 6px;
  display: block;
  box-shadow: 0 4px 20px 0 rgba(18, 18, 18, 0.15);
}

.chat-card-carousel {
  display: flex;
  gap: 10px;
  overflow-x: scroll;
  scrollbar-width: none;
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 28px;
  padding-right: 28px;
  padding-top: 12px;
  margin-top: -12px;
  padding-bottom: 16px;
  margin-bottom: -16px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 28px;
}

.chat-card-carousel .chat-card-placeholder {
  width: 78%;
  margin: 0;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.chat-card-placeholder[data-card="bny"] {
  background: #ffffff;
}

.chat-card-placeholder[data-card="bny"] .chat-card-media {
  box-shadow: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transition: opacity 220ms ease;
  cursor: zoom-out;
}

.lightbox.open {
  opacity: 1;
}

.lightbox-media {
  max-width: 66vw;
  max-height: 66vh;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  transition: background 150ms ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Copy button */
.chat-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 2px;
}

.chat-contact-link:hover {
  color: rgba(255, 255, 255, 0.95);
}

.chat-copy-btn {
  margin-top: 7px;
  border: none;
  background: rgba(255, 255, 255, 0);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, opacity 150ms ease;
  opacity: 0.4;
}

.chat-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.chat-copy-btn img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

.chat-copy-btn:hover {
  color: rgba(255, 255, 255, 0.5);
}

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 4px 0;
  animation: msgIn 200ms ease forwards;
  opacity: 0;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 150ms; }
.typing-dot:nth-child(3) { animation-delay: 300ms; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-5px); }
}

/* Input — hidden until conversation starts */
.chat-input-wrap {
  display: none;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.chat-input-wrap.active {
  display: flex;
}

#chatTextarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 20px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  resize: none;
  min-height: calc(1.5em * 1);
  max-height: calc(1.5em * 3);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0 4px;
}

#chatTextarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.chat-send-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #26252c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 200ms ease;
}

.chat-send-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.chat-send-btn:not(:disabled):hover {
  background: #ffffff;
  opacity: 1;
}


/* ── Summary bar ─────────────────────────────────── */

.chat-summary-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 28px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-summary-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.01em;
  margin-left: -4px;
}

.chat-summary-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'PP Neue Montreal', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  margin-left: -8px;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
  letter-spacing: 0.01em;
}

.chat-summary-btn:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.chat-summary-btn:disabled {
  cursor: default;
  color: rgba(255, 255, 255, 0.2);
}

.chat-summary-error {
  font-size: 12px;
  color: rgba(255, 160, 130, 0.8);
}

.chat-share-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-share-card-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
  line-height: 1.4;
  flex: 1;
}

.chat-share-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.chat-share-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-family: 'PP Neue Montreal', sans-serif;
  font-size: 13px;
  font-weight: 400;
  border-radius: 20px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 150ms ease;
}

.chat-share-open-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ── Mobile ──────────────────────────────────────── */

@media (max-width: 600px) {
  .toggle-wrap {
    top: 16px;
  }

  .toggle-btn {
    padding: 7px 14px;
    font-size: 12px;
  }

  .hero-text p {
    font-size: clamp(20px, 6vw, 28px);
    line-height: 1.35;
  }

  .footer {
    padding: 0 20px;
  }

  .chat-modal {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .chat-backdrop.open {
    align-items: flex-end;
  }
}
