/* ═══════════════════════════════════════════════════════════
   AI-ASSISTANT.CSS — секция «ИИ-помощник» + мокап Telegram-бота.
   Снимает страх «составить страницу сложно».
   Откат: удалить <link ... ai-assistant.css> из index.html
          и саму <section class="aibio"> .
   ═══════════════════════════════════════════════════════════ */

.aibio{
  position:relative;
  z-index:2;
  padding:40px 32px;
}
.aibio__inner{
  max-width:1050px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:56px;
}
.aibio__text{
  max-width:480px;
  text-align:left;
  flex:1;
}

/* ── Левая колонка: текст ── */
.aibio__eyebrow{
  display:block;
  font-family:var(--font-ui);
  font-size:11px;
  font-weight:300;
  letter-spacing:0.22em;
  text-transform:uppercase;
  color:var(--gold);
  margin-bottom:12px;
}
.aibio__title{
  font-family:var(--font-display, 'Playfair Display', serif);
  font-size:clamp(26px, 4vw, 34px);
  font-weight:400;
  line-height:1.2;
  letter-spacing:-0.01em;
  color:var(--cream);
  margin:0 0 20px;
  text-wrap:balance;
}
.aibio__title em{
  font-style:italic;
  color:var(--gold-light);
}
.aibio__lead{
  font-family:var(--font-body, 'Lora', serif);
  font-size:16px;
  font-weight:300;
  line-height:1.75;
  color:var(--cream-dim);
  margin:0 0 24px;
}
.aibio__lead strong{ color:var(--white); font-weight:600; }

/* ── Шаги-успокоение ── */
.aibio__steps{
  list-style:none;
  margin:0 0 36px;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.aibio__step{
  display:flex;
  align-items:flex-start;
  gap:16px;
}
.aibio__step-ic{
  flex-shrink:0;
  width:40px; height:40px;
  display:grid; place-items:center;
  border-radius:50%;
  font-size:18px;
  color:var(--gold-light);
  background:radial-gradient(circle at 50% 35%, rgba(200,168,75,.16), rgba(200,168,75,.04));
  border:1px solid rgba(200,168,75,.28);
  box-shadow:inset 0 1px 0 rgba(255,247,210,.12);
}
.aibio__step-txt{
  font-family:var(--font-body, 'Lora', serif);
  font-size:15px;
  line-height:1.5;
  color:#b9ad93;
  padding-top:8px;
}
.aibio__step-txt b{ color:#e7dcc2; font-weight:600; }

.aibio__note{
  font-family:var(--font-ui);
  font-size:13px;
  letter-spacing:.04em;
  color:rgba(201,191,168,.5);
  margin:16px 0 0;
}
.aibio__cta {
  margin-top: 4px;
}
.aibio__lead-mobile {
  display: none;
}
.aibio__lead-desktop {
  display: inline;
}
.aibio__cta-wrapper--mobile {
  display: none;
}
.aibio__cta-wrapper--desktop {
  display: block;
}

/* ════════════════════════════════════════════
   PHONE MOCKUP — сайт в режиме правки страницы памяти
   ════════════════════════════════════════════ */
.aibio__visual{
  display:flex;
  justify-content:center;
  perspective:1600px;
}

/* ════════════════════════════════════════════
   3D SMARTPHONE MOCKUP — Premium Visual Integration
   ════════════════════════════════════════════ */
.mockup-viewport {
  --gold-main: #c8a84b;
  --gold-light: #e6cf86;
  --gold-dark: #806524;
  --gold-deep: #4a3a14;
  --bg-black-matte: #141210;
  --bg-black-deep: #0e0d0b;
  --glass-bg: rgba(20, 18, 16, 0.85);
  --glass-border: rgba(200, 168, 75, 0.4);
  --phone-w: 230px;
  --phone-h: 490px;

  width: 100%;
  max-width: 380px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.ai-mockup {
  width: 360px;
  height: 580px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  perspective: 1200px;
}

/* Floor Shadow mimicking 3D tilt */
.floor-shadow {
  position: absolute;
  width: 280px;
  height: 70px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 70%);
  bottom: 25px;
  left: 30px;
  transform: rotateZ(-14deg);
  filter: blur(15px);
  pointer-events: none;
  animation: shadowPulse 7s ease-in-out infinite;
}

/* 3D Phone Wrapper */
.phone-3d-wrap {
  position: absolute;
  width: var(--phone-w);
  height: var(--phone-h);
  transform-style: preserve-3d;
  z-index: 10;
}

/* Modern Smartphone with Premium Gold Rim & Matte Black Body */
.phone-body {
  width: 100%;
  height: 100%;
  background: var(--bg-black-matte);
  border-radius: 36px;
  border: 1.5px solid var(--gold-main);
  padding: 10px; /* Outer Bezel Width */
  position: relative;
  transform-style: preserve-3d;
  /* Precise 3D Rotation matching the diagonal angle of the reference */
  transform: rotateX(23deg) rotateY(15deg) rotateZ(-16deg);
  /* Extruded metallic gold layers for realistic depth + drop shadow */
  box-shadow:
    -1px 1px 0px #9d7f34,
    -2px 2px 0px #8a6e29,
    -3px 3px 0px #70581e,
    -4px 4px 0px #5c4716,
    -5px 5px 0px #40310c,
    -18px 24px 45px rgba(0, 0, 0, 0.85);
  animation: gentleFloat 7s ease-in-out infinite;
}

/* Phone Notch / Camera Pill */
.phone-notch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateZ(2px);
  width: 75px;
  height: 14px;
  background: var(--bg-black-deep);
  border-radius: 10px;
  border: 1px solid rgba(200, 168, 75, 0.15);
  z-index: 200;
  pointer-events: none;
}

/* Screen container clipping content to the rounded screen area */
.phone-screen {
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: 27px;
  overflow: hidden;
  position: relative;
  clip-path: inset(0 0 0 0 round 27px);
  -webkit-clip-path: inset(0 0 0 0 round 27px);
  z-index: 10;
}

/* FLOATING ELEMENT 1: Voice Message Pill */
.voice-pill {
  position: absolute;
  top: 45px;
  right: 5px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--glass-border);
  border-radius: 26px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65);
  z-index: 100;
  transform-style: preserve-3d;
  transform: translateZ(90px) rotateX(10deg) rotateY(-5deg) rotateZ(-3deg);
  animation: pillFloat 7s ease-in-out infinite;
}

/* Voice Pill UI Parts */
.play-btn {
  width: 26px;
  height: 26px;
  background: var(--gold-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(200, 168, 75, 0.3);
}

.play-btn svg {
  width: 12px;
  height: 12px;
  fill: var(--bg-black-deep);
  margin-left: 2px; /* Visual optical alignment */
}

.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.wave-bar {
  width: 2px;
  border-radius: 1px;
  background: rgba(200, 168, 75, 0.3);
}

.wave-bar.active {
  background: var(--gold-light);
}

.duration {
  font-size: 10.5px;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  margin-left: 2px;
}

/* FLOATING ELEMENT 2: Sparkle Star Icon */
.sparkle-wrap {
  position: absolute;
  top: 235px;
  right: 50px;
  z-index: 90;
  width: 24px;
  height: 24px;
  pointer-events: none;
  animation: sparkleAnim 4s ease-in-out infinite;
}

.sparkle-icon {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(230, 207, 134, 0.7));
}

/* FLOATING ELEMENT 3: Dashed Curved Arrow */
.flow-arrow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  pointer-events: none;
}

/* FLOATING ELEMENT 4: Notification Card */
.notif-card {
  position: absolute;
  bottom: 70px;
  left: 12px;
  width: 285px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--glass-border);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  z-index: 110;
  transform-style: preserve-3d;
  transform: translateZ(150px) rotateX(10deg) rotateY(-5deg) rotateZ(-2deg);
  animation: cardFloat 7s ease-in-out infinite;
}

/* Notification Avatar with QR Text inside */
.notif-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-black-deep), var(--bg-black-matte));
  border: 1.5px solid var(--gold-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(200, 168, 75, 0.15);
}

.avatar-text {
  font-size: 11px;
  font-weight: bold;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

/* Notification Text Mechanics */
.notif-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0; /* Ensures truncation works */
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.notif-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.notif-time {
  font-size: 9px;
  color: rgba(230, 207, 134, 0.6);
  font-weight: 400;
}

.notif-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.notif-text {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

/* Notification Unread Circle */
.notif-badge {
  width: 16px;
  height: 16px;
  background: var(--gold-main);
  color: var(--bg-black-deep);
  font-size: 9px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(200, 168, 75, 0.4);
}

/* GENTLE FLOATING KEYFRAMES */
@keyframes gentleFloat {
  0%, 100% {
    transform: rotateX(23deg) rotateY(15deg) rotateZ(-16deg) translateY(0);
  }
  50% {
    transform: rotateX(23deg) rotateY(15deg) rotateZ(-16deg) translateY(-8px);
  }
}

@keyframes shadowPulse {
  0%, 100% {
    transform: scale(1) rotateZ(-14deg);
    opacity: 0.75;
  }
  50% {
    transform: scale(0.92) rotateZ(-14deg);
    opacity: 0.5;
  }
}

@keyframes pillFloat {
  0%, 100% {
    transform: translateZ(90px) rotateX(10deg) rotateY(-5deg) rotateZ(-3deg) translateY(0);
  }
  50% {
    transform: translateZ(90px) rotateX(10deg) rotateY(-5deg) rotateZ(-3deg) translateY(-5px);
  }
}

@keyframes cardFloat {
  0%, 100% {
    transform: translateZ(150px) rotateX(10deg) rotateY(-5deg) rotateZ(-2deg) translateY(0);
  }
  50% {
    transform: translateZ(150px) rotateX(10deg) rotateY(-5deg) rotateZ(-2deg) translateY(4px);
  }
}

@keyframes sparkleAnim {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.18) rotate(15deg);
    opacity: 1;
  }
}


/* ── экран: сайт в правке ── */
.memui{
  position:relative;
  width:100%; height:100%;
  display:flex; flex-direction:column;
  background:
    radial-gradient(circle at 50% 0%, rgba(200,168,75,.06), transparent 45%),
    #0e0d0b;
}

/* верхняя панель */
.memui__bar{
  flex-shrink:0;
  display:flex; align-items:center; justify-content:space-between;
  padding:46px 18px 12px;
  background:linear-gradient(180deg,#1a1813,#141210);
  border-bottom:1px solid rgba(200,168,75,.1);
  position:relative; z-index:2;
}
.memui__back{ color:var(--gold-light); font-size:22px; line-height:1; }
.memui__brand {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 13px;
  color: #e7dcc2;
  display: flex;
  align-items: center;
  gap: 6px;
}
.memui__logo-img {
  height: 18px;
  width: auto;
  display: block;
  filter: brightness(1.1) saturate(1.05) drop-shadow(0 1px 4px rgba(200, 168, 75, 0.28));
}
.memui__editmode{
  font-family:var(--font-ui); font-size:11px; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase;
  color:var(--gold-light);
  padding:4px 10px; border-radius:20px;
  background:rgba(200,168,75,.12); border:1px solid rgba(200,168,75,.3);
}

/* страница памяти */
.memui__page{ flex:1; padding:22px 18px; }
.memui__person{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  text-align:center; margin-bottom:22px;
}
.memui__portrait{
  width:64px; height:64px; border-radius:50%;
  object-fit: cover;
  background:radial-gradient(circle at 50% 35%, #2a2620, #15120d);
  border:1px solid rgba(200,168,75,.3);
  box-shadow:inset 0 1px 0 rgba(255,247,210,.1);
}
.memui__name{ font-family:"Libre Baskerville",Georgia,serif; font-size:18px; color:#f1ead7; }
.memui__dates{ font-family:var(--font-ui); font-size:12px; letter-spacing:.08em; color:var(--gold-light); }

.memui__field-label{
  display:block;
  font-family:var(--font-ui); font-size:11px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase;
  color:rgba(201,191,168,.55); margin-bottom:8px;
}
.memui__textarea{
  position:relative;
  min-height:92px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(200,168,75,.28);
  box-shadow:0 0 0 3px rgba(200,168,75,.06);
  padding:12px 14px;
}
.memui__placeholder{
  font-family:var(--font-body,'Lora',serif);
  font-size:13px; color:rgba(201,191,168,.4); font-style:italic;
}
.memui__ai{
  position:absolute; right:10px; bottom:10px;
  width:34px; height:34px;
  border:none; border-radius:9px;
  font-family:var(--font-ui); font-size:12px; font-weight:700; letter-spacing:.04em;
  color:#1a1712;
  background:linear-gradient(135deg,#e6cf86,#c8a84b);
  box-shadow:0 4px 14px rgba(200,168,75,.4);
  cursor:pointer;
}

/* всплывающий ИИ-помощник (bottom sheet) */
.aiui{
  position:absolute; left:0; right:0; bottom:0;
  height:62%;
  display:flex; flex-direction:column;
  padding:10px 16px 18px;
  background:linear-gradient(180deg,#1b1813,#131110);
  border-top:1px solid rgba(200,168,75,.22);
  border-radius:22px 22px 0 0;
  box-shadow:0 -24px 50px rgba(0,0,0,.5);
  z-index:3;
}
.aiui__grip{
  width:38px; height:4px; border-radius:4px;
  background:rgba(200,168,75,.35);
  margin:0 auto 12px;
}
.aiui__head{
  font-family:var(--font-ui); font-size:14px; font-weight:600;
  color:#f1ead7; text-align:center; margin-bottom:14px;
}
.aiui__chat{
  flex:1; overflow:hidden;
  display:flex; flex-direction:column; gap:9px;
}
.aiui__bubble{
  max-width:88%;
  padding:9px 13px; border-radius:14px;
  font-family:var(--font-ui); font-size:13px; line-height:1.5;
}
.aiui__bubble--bot{
  align-self:flex-start;
  background:#241f17; color:#ddd3bf;
  border-bottom-left-radius:5px;
}
.aiui__bubble--user{
  align-self:flex-end;
  background:linear-gradient(160deg,#caa84b,#a98a35);
  color:#1c1710; border-bottom-right-radius:5px;
}
.aiui__card{
  position:relative;
  background:linear-gradient(165deg,#251f14,#1b1711);
  border:1px solid rgba(200,168,75,.3);
  border-radius:14px;
  padding:28px 14px 13px;
  font-family:var(--font-body,'Lora',serif);
  font-size:13px; line-height:1.6; color:#e3d8bf;
}
.aiui__card-badge{
  position:absolute; top:9px; left:14px;
  font-family:var(--font-ui); font-size:9.5px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase;
  color:var(--gold-light);
}
.aiui__actions{
  flex-shrink:0;
  display:flex; gap:7px; margin-top:10px;
}
.aiui__btn{
  flex:1; text-align:center;
  font-family:var(--font-ui); font-size:11px; font-weight:500;
  padding:8px 6px; border-radius:9px;
  color:#cdbf9f;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(200,168,75,.22);
}
.aiui__btn--primary{
  color:#1a1712; font-weight:600;
  background:linear-gradient(135deg,#e6cf86,#c8a84b);
  border-color:transparent;
  box-shadow:0 6px 18px rgba(200,168,75,.3);
}

/* ── Адаптив ── */
@media (max-width:850px){
  .aibio{ padding:40px 20px; }
  .aibio__inner{
    flex-direction:column;
    text-align:center;
    gap:16px;
  }
  .aibio__text{
    max-width:100%;
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
  }
  .aibio__lead{
    text-align:center;
    margin-bottom:12px;
  }
  .aibio__steps{
    text-align:left;
    gap:11px;
    margin-bottom:24px;
  }
  .aibio__step-ic{ width:34px; height:34px; font-size:15px; }
  .aibio__step-txt{ font-size:14px; padding-top:6px; }
  .aibio__visual {
    margin-top: 0;
  }
  .mockup-viewport {
    height: 440px;
  }
  .aibio__cta-wrapper--desktop {
    display: none;
  }
  .aibio__cta-wrapper--mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 0;
    position: relative;
    z-index: 20;
  }
}
@media (max-width:768px){
  /* на телефоне оставляем заголовок + лид + наклонённый мокап — как на референсе */
  .aibio__steps{ display:none; }
  .aibio__note{ display:none; }
  /* шрифт компактнее, чтобы текст + мокап влезли на один экран */
  .aibio__eyebrow{ font-size:11px; margin-bottom:10px; }
  .aibio__title{ font-size:clamp(20px,5.4vw,25px); line-height:1.16; margin-bottom:10px; }
  .aibio__lead{ font-size:13.5px; line-height:1.5; margin-bottom:8px; max-width:40ch; }
  /* наклонённый и уменьшенный мокап */
  .aibio__visual{ perspective:1500px; }
  .aibio__lead-desktop { display: none; }
  .aibio__lead-mobile { display: inline; }
}
@media (max-width:400px){
  .aibio{ padding:40px 18px; }
  .aibio__title{ font-size:19px; }
  .aibio__lead{ font-size:13px; margin-bottom:8px; }
}

/* Downscale wrapper smoothly to prevent 3D elements cropping on mobile viewports */
@media (max-width: 480px) {
  .ai-mockup {
    transform: scale(0.82);
    transform-origin: center center;
  }
}
@media (max-width: 360px) {
  .ai-mockup {
    transform: scale(0.72);
    transform-origin: center center;
  }
}
