/* ==========================================================================
   Real photos (digital camera) + chatbot
   ========================================================================== */

/* ---------- hero: real photo replaces the drawn skyline ---------- */
.hero .city, .hero .ground, .hero .sunball, .hero .stars, .hero .shooting { display: none; }
.hero-photo { position: absolute; inset: 0; z-index: -3; background: var(--city-near); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .9s var(--ease); }
/* day: widened and anchored left so the sun slides to the right edge, away from the title */
.hero-photo .day { width: 132%; max-width: none; right: auto; object-position: 0 22%; }
.hero-photo .night { object-position: 50% 70%; opacity: 0; }
/* night: the image is widened and anchored left so the palm sits at the right edge, clear of the title */
.hero-photo { overflow: hidden; }
.hero-photo .night { width: 150%; max-width: none; right: auto; object-position: 0 22%; }
:root[data-theme="dark"] .hero-photo .night { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-photo .night { opacity: 1; } }
/* flat scrim for title legibility + film grain so it reads like a camera shot */
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background-color: rgba(28, 16, 40, .26);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light; opacity: 1;
}
html.intro .hero-photo img.day { animation: photoIn 1.6s var(--ease) both; }
@keyframes photoIn { from { opacity: 0; transform: scale(1.06); } }

/* ---------- journey: real LA dusk behind the glass cards ---------- */
.sea-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; z-index: -2; }
.journey-sea::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(18, 12, 38, .42); }
.sea-palms { display: none; }

/* ---------- nav avatar ---------- */
.nav .brand img.me { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: block; }

/* ---------- postcards / snapshots ---------- */
.snaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.snap { margin: 0; padding: 12px 12px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; transition: transform .5s var(--ease); }
.snap:nth-child(odd) { rotate: -2deg; } .snap:nth-child(even) { rotate: 1.6deg; margin-top: 28px; }
.snap:hover { transform: translateY(-8px) rotate(1deg); }
.snap img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; filter: saturate(1.05) contrast(1.02); }
.snap figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 14px 2px 16px; }
@media (max-width: 900px) { .snaps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .snaps { gap: 16px; } .snap { padding: 8px 8px 0; } .snap:nth-child(even) { margin-top: 16px; } }

/* ---------- chatbot ---------- */
.chat-btn {
  position: fixed; right: 28px; bottom: 28px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer; display: grid; place-items: center; background: var(--ink); color: var(--bg);
  transition: transform .3s var(--ease), background .3s;
}
.chat-btn svg { width: 24px; height: 24px; }
.chat-btn:hover, .chat-btn.active { transform: scale(1.08); background: var(--coral); color: #fff; }
.chat-window {
  position: fixed; right: 28px; bottom: 96px; z-index: 60; width: 360px; max-height: min(520px, 100svh - 130px);
  display: none; flex-direction: column; overflow: hidden; border-radius: var(--radius);
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); font-family: var(--sans);
}
.chat-window.open { display: flex; animation: chatIn .35s var(--ease); }
@keyframes chatIn { from { opacity: 0; transform: translateY(12px); } }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-name { font-size: 14px; font-weight: 700; }
.chat-status { font-family: var(--mono); font-size: 11px; color: #2f9e5b; display: flex; align-items: center; gap: 6px; }
.chat-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chat-close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px; }
.chat-messages { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 160px; }
.chat-msg { max-width: 85%; padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.chat-msg.bot { align-self: flex-start; background: color-mix(in srgb, var(--ink) 7%, var(--paper)); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--coral); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg em { color: var(--muted); }
.chat-msg a { color: inherit; }
.chat-input-area { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); margin: 0; }
.chat-input-area input { flex: 1; min-width: 0; background: color-mix(in srgb, var(--ink) 6%, var(--paper)); color: var(--ink); border: 0; border-radius: 12px; padding: 11px 14px; font: inherit; font-size: 14px; outline: none; }
.chat-input-area input:focus { box-shadow: inset 0 0 0 1.5px var(--coral); }
.chat-input-area input::placeholder { color: var(--muted); }
.chat-input-area button { background: var(--ink); color: var(--bg); border: 0; border-radius: 12px; padding: 0 16px; font-size: 16px; cursor: pointer; }
.chat-input-area button:hover { background: var(--coral); color: #fff; }
@media (max-width: 600px) {
  .chat-btn { right: 18px; bottom: 18px; }
  .chat-window { width: calc(100vw - 32px); right: 16px; bottom: 86px; }
}

/* ---------- shooting stars back in the night photo ---------- */
.hero .shooting { display: block; z-index: 0; }
.shooting.s3 { top: 8%; left: 50%; animation-delay: 3.6s !important; animation-duration: 8s !important; }
.shooting.s4 { top: 30%; left: 85%; animation-delay: 1.2s !important; animation-duration: 11s !important; }
@media (max-width: 760px) { .hero-photo .day { width: 100%; height: 140%; object-position: 30% 0; } }
