/* Allnet Air advisor: additions on top of the TTI design (tti.css). Uses its tokens. */


/* ---------- AI Avatar ---------- */
.av-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; margin-top: 40px; align-items: stretch; }
.av-video { margin: 0; border: 1px solid var(--line-d2); border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.av-video video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--navy-2); }
.av-video figcaption { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; font-size: .85rem; color: var(--muted-d); }
.av-video.is-missing video { object-fit: cover; }

.av-chat { display: flex; flex-direction: column; border: 1px solid var(--line-d2); border-radius: var(--radius); background: linear-gradient(180deg, #0f2140 0%, #0a1629 100%); height: 620px; overflow: hidden; }
/* height:0 + min-height:100% lets the video set the row height; the chat log scrolls inside it */
.av-chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-d); }
.av-chat__head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand); }
.av-chat__head div { display: flex; flex-direction: column; line-height: 1.3; }
.av-chat__head strong { color: var(--on-dark); }
.av-chat__head span { color: var(--muted-d); font-size: .82rem; }
.av-badge { margin-left: auto; font-size: .72rem; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-3); border: 1px solid rgba(0, 173, 239, .35); white-space: nowrap; }

/* expand button and the expanded (overlay) chat */
.av-expand { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 10px; border: 1px solid var(--line-d2); background: #ffffff0d; color: var(--on-dark); cursor: pointer; }
.av-expand:hover { border-color: var(--brand); color: var(--brand-3); }
.av-expand__close, .av-chat.is-expanded .av-expand__open { display: none; }
.av-chat.is-expanded .av-expand__close { display: block; }
.av-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(4, 10, 20, .72); }
.av-chat.is-expanded { position: fixed; z-index: 1000; top: 4vh; left: 50%; transform: translateX(-50%); width: min(960px, 94vw); height: 92vh; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
.av-chat.is-expanded .av-log { max-height: none; padding: 24px 28px; }
.av-chat.is-expanded .msg { max-width: 78%; font-size: 1rem; }
.av-chat.is-expanded .ex-card { max-width: 360px; }
body.chat-expanded { overflow: hidden; }
body.chat-expanded .ask-fab { display: none; }

.av-log { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 14px; font-size: .95rem; line-height: 1.55; }
.msg p + p, .msg ul { margin-top: 8px; }
.msg ul { padding-left: 18px; margin-bottom: 0; }
.msg--ai { background: #ffffff0d; border: 1px solid var(--line-d); color: var(--on-dark); border-top-left-radius: 4px; }
.msg--me { align-self: flex-end; background: var(--brand); color: #04121a; border-top-right-radius: 4px; }
.msg__src { font-size: .78rem; color: var(--muted-d); margin-top: 10px; }
.msg__book { margin-top: 10px; }
.typing { display: flex; gap: 5px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); animation: avdot 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes avdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.av-starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 18px 12px; }
.av-starters button { font: inherit; font-size: .85rem; text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-d2); background: #ffffff08; color: var(--on-dark); cursor: pointer; }
.av-starters button:hover { border-color: var(--brand); background: #00adef1a; }
.av-form { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-d); }
.av-form input { flex: 1; min-width: 0; font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-d2); background: var(--ink); color: var(--on-dark); }
.av-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.av-note { padding: 0 18px 16px; font-size: .74rem; color: var(--muted-d); line-height: 1.5; }
.av-note a { color: var(--brand-3); }

/* ---------- savings slider ---------- */
.sv-calc { margin-top: 36px; }
.sv-calc__input { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); max-width: 640px; }
.sv-calc__input label { display: block; font-size: .8rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sv-calc__input output { display: block; font-size: 2.4rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 6px 0 12px; }
.sv-calc__input input[type=range] { --fill: 26%; width: 100%; appearance: none; -webkit-appearance: none; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) var(--fill), #dde3ec var(--fill)); cursor: pointer; }
.sv-calc__input input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 4px solid var(--brand); box-shadow: 0 2px 8px rgba(0, 119, 176, .35); }
.sv-calc__input input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 4px solid var(--brand); }
.sv-calc__scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.sv-calc .brief-econ { margin-top: 24px; }
.sv-calc .brief-econ__v { font-variant-numeric: tabular-nums; }
.sv-calc select { font: inherit; font-weight: 650; color: var(--ink); background: var(--brand-3); border: 0; border-radius: 6px; padding: 1px 4px; }
.sv-calc__fine { margin-top: 18px; font-size: .85rem; color: var(--muted); }
.sv-calc__fine a { color: var(--brand-d); font-weight: 600; }

/* ---------- HyperFrames slot ---------- */

/* ---------- booking ---------- */

.phase__note { margin-top: 12px; font-size: .78rem; color: var(--muted); }

.sw-clip { margin: 12px 0 8px; border-radius: var(--radius); overflow: hidden; background: #0D1B2A; border: 1px solid var(--line); }
.sw-clip video { width: 100%; aspect-ratio: 16 / 9; display: block; }

#intro-video::cue { font-family: Inter, system-ui, sans-serif; font-size: 1rem; line-height: 1.35; background: rgba(7, 15, 28, .78); color: #fff; }


/* intro video, standalone (Nov 15) */
.section#intro { padding-bottom: clamp(48px, 6vw, 80px); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 56px; align-items: center; }
.intro-copy h2 { max-width: 20ch; }
/* Ask + Book (Nov 15) */
.ab-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; margin-top: 40px; align-items: start; }
.ab-book { display: flex; flex-direction: column; gap: 14px; }
.ab-book .next-steps { grid-template-columns: 1fr; margin: 0; gap: 10px; }
.ab-book .next-steps li { padding: 14px 16px; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; align-items: start; }
.ab-book .next-steps__n { grid-row: span 2; margin-bottom: 0; }
.ab-book .next-steps__promise { margin-top: 4px; }
.ab-book .contact-card { margin-top: 6px; }
.ab-book__note { font-size: .8rem; color: var(--muted-d); text-align: center; margin-top: -4px; }
/* floating ask button */
.ask-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: var(--brand); color: #04121a; font-weight: 600; font-size: .92rem; text-decoration: none; box-shadow: 0 10px 28px -10px rgba(0,0,0,.55); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.ask-fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ask-fab:hover { background: #43c8f5; }
@media (max-width: 960px) {
  .intro-grid, .ab-grid, .consult-grid, .sv-calc, .sw-card { grid-template-columns: 1fr; gap: 24px; }
  #consult .av-chat { height: auto; }
  .consult-side .av-video { max-width: 420px; }
  .book-band__inner { flex-direction: column; align-items: flex-start; }
  .intro-grid .av-video { max-width: 420px; }
  .av-chat { height: auto; }
  .av-log { min-height: 240px; max-height: 380px; }
  .av-chat.is-expanded { top: 0; left: 0; transform: none; width: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .av-chat.is-expanded .msg { max-width: 92%; }
  .av-chat.is-expanded .av-badge { display: none; }
}

/* illustrative example card inside a chat answer: the 1080x1350 card scaled to fit */
.ex-card { margin: 12px 0 4px; max-width: 288px; }
.ex-card__frame { position: relative; width: 100%; aspect-ratio: 1080 / 1350; overflow: hidden; border-radius: 10px; border: 1px solid var(--line-d2); background: #0D1B2A; }
.ex-card__frame iframe { position: absolute; top: 0; left: 0; width: 1080px; height: 1350px; border: 0; transform: scale(var(--ex-scale, .2667)); transform-origin: 0 0; pointer-events: none; }
.ex-card figcaption { font-size: .75rem; line-height: 1.45; color: var(--muted-d); margin-top: 8px; }
.ex-card__acts { display: flex; gap: 14px; margin-top: 6px; }
.ex-card__acts button, .ex-card__acts a { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; color: var(--brand); cursor: pointer; text-decoration: underline; }

/* ---------- slim page (Nov 15): consult, compact calculator, switching card, booking band ---------- */
.consult-grid { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 28px; margin-top: 32px; align-items: start; }
.consult-side { display: flex; flex-direction: column; gap: 14px; }
.consult-side .av-video { margin: 0; }
#consult .av-chat { height: 680px; }
.sv-calc { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 24px; align-items: center; margin-top: 28px; }
.sv-calc .brief-econ { margin-top: 0; }
.sv-calc__fine { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#savings h2 { margin-bottom: 0; }
#smartbill .cycle-card { margin-top: 28px; }
.sw-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.sw-card .checks { margin: 18px 0 22px; }
.sw-card .sw-clip { margin: 0; }
#support .section-sub + .btn { margin-top: 18px; }
.book-band { background: #0a1629; border-top: 1px solid var(--line-d); padding: 28px 0; }
.book-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.book-band__inner div { display: flex; flex-direction: column; gap: 4px; color: var(--on-dark); }
.book-band__inner span { color: var(--muted-d); font-size: .92rem; }

/* ---------- small screens ---------- */
@media (max-width: 920px) {
  .av-grid { grid-template-columns: 1fr; }
  .av-video { max-width: 420px; }
}
@media (max-width: 640px) {
  .av-starters { grid-template-columns: 1fr; }
  .av-badge { display: none; }
  .av-chat { min-height: 0; }
  .sv-calc__input output { font-size: 2rem; }
}

/* fixes */
[hidden] { display: none !important; }
.legal { max-width: 760px; }
.legal h1 { font-size: 2.2rem; margin: 40px 0 16px; }
.legal h2 { font-size: 1.2rem; margin: 28px 0 8px; max-width: none; }
.legal p, .legal li { color: var(--muted); margin-bottom: 10px; }
.legal a { color: var(--brand-d); }
.section--paper .checks li { color: var(--text); }
@media (max-width: 960px) {
  .consult-grid, .sv-calc, .sw-card { grid-template-columns: 1fr; gap: 22px; }
  #consult .av-chat { order: -1; height: 560px; } /* on phones the chat comes first, then the video and booking */
  .consult-side .av-video { max-width: 360px; }
  .book-band__inner { flex-direction: column; align-items: flex-start; }
}
