*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #F5F1EC;
    color: #4A2F3B;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Cormorant Garamond', serif; }

/* ── Chat layout ── */
#chat-view {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: row;
    background: #F5F1EC;
    z-index: 50;
    height: var(--chat-h, 100svh);
}
#chat-view.active { display: flex; }

#chat-inner {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

#chat-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#messages-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem;
}

#input-area {
    flex-shrink: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(74,47,59,0.07);
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

/* ── Animations ── */
@keyframes wave {
    0%, 100% { height: 6px; }
    50%       { height: 22px; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes zoomOut {
    from { transform: scale(1.1); }
    to   { transform: scale(1.0); }
}

.anim-fade-up   { animation: fadeUp  0.7s ease-out forwards; }
.anim-fade-in   { animation: fadeIn  0.5s ease-out forwards; }
.anim-scale-in  { animation: scaleIn 0.4s cubic-bezier(0.175,0.885,0.32,1.275) forwards; }

#hero-image { animation: zoomOut 2s ease-out forwards; }

.waveform-bar {
    width: 3px;
    border-radius: 9999px;
    background: rgba(207,166,160,0.7);
    animation: wave 1.2s ease-in-out infinite;
}

/* Hide scrollbars */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Mic listening state */
@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(207,166,160,0.5); }
    50%       { box-shadow: 0 0 0 6px rgba(207,166,160,0); }
}
#mic-btn.listening {
    color: #CFA6A0;
    animation: micPulse 1s ease-in-out infinite;
}

/* ── Hamburger / Info overlay ── */
.info-wrap:before {
    display: block;
    position: fixed;
    top: 0; left: 0;
    content: '';
    width: 100vw; height: 100vh;
    background: rgba(74,47,59,0.97);
    transition: clip-path 500ms ease-in-out, visibility 500ms;
    clip-path: circle(30px at calc(100% - 55px) 55px);
    visibility: hidden;
    z-index: 200;
}
.info-wrap.active:before {
    visibility: visible;
    clip-path: circle(150% at calc(100% - 55px) 55px);
}

/* panel content */
.info-panel {
    position: fixed;
    inset: 0;
    z-index: 201;
    overflow-y: auto;
    padding: 100px 40px 60px;
    color: #F5F1EC;
    opacity: 0;
    visibility: hidden;
    /* fade in after circle finishes (500ms), fade out faster */
    transition: opacity 300ms ease, visibility 0ms linear 300ms;
}
.info-wrap.active .info-panel {
    opacity: 1;
    visibility: visible;
    /* delay appearance until circle animation completes */
    transition: opacity 300ms ease 500ms, visibility 0ms linear 500ms;
}

/* hamburger button */
.nav-tgl {
    display: inline-block;
    cursor: pointer;
    position: fixed;
    z-index: 300;
    right: 24px;
    top: 24px;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    padding: 0;
    background: #4A2F3B;
    box-shadow: 0 4px 20px rgba(74,47,59,0.4), 0 0 0 1px rgba(180,140,80,0.25);
    line-height: 0.6;
    text-align: center;
    transition: box-shadow 200ms;
}
.nav-tgl:hover {
    box-shadow: 0 4px 20px rgba(74,47,59,0.5), 0 0 0 2px rgba(180,140,80,0.55), 0 0 18px 4px rgba(180,140,80,0.2);
}
.nav-tgl:focus { outline: none; }
.nav-tgl > span {
    display: inline-block;
    position: relative;
    height: 2px;
    width: 28px;
    border-radius: 1px;
    background: #F5F1EC;
    vertical-align: middle;
    transition: height 200ms;
}
.nav-tgl > span:before,
.nav-tgl > span:after {
    display: inline-block;
    position: absolute;
    content: "";
    height: 2px;
    border-radius: 1px;
    background: #F5F1EC;
    transition: all 200ms;
}
.nav-tgl > span:before { top: -9px; left: 3px; width: 22px; }
.nav-tgl > span:after  { top:  9px; left: 6px; width: 16px; }
.nav-tgl:hover > span:before,
.nav-tgl:hover > span:after { width: 28px; left: 0; }

/* X state */
.info-wrap.active .nav-tgl > span { height: 0; }
.info-wrap.active .nav-tgl > span:before,
.info-wrap.active .nav-tgl > span:after { top: 0; left: 0; width: 28px; }
.info-wrap.active .nav-tgl > span:after  { transform: rotate(-45deg); }
.info-wrap.active .nav-tgl > span:before { transform: rotate(45deg); }

.info-divider {
    width: 40px; height: 1px;
    background: rgba(180,140,80,0.5);
    margin: 32px 0;
}
