/* ═══════════════════════════════════════════════════════════════════
   MyCity Crystal 2027 — feature styles
   Carousels · palette · aurora · tilt · reveals · ticker · chat mock
   ═══════════════════════════════════════════════════════════════════ */

/* ── Cursor-follow aurora orbs ───────────────────────────────────── */
#cursor-aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#cursor-aurora .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; will-change: transform; }
#cursor-aurora .o1 { width: 420px; height: 420px; left: 50%; top: 40%; margin: -210px 0 0 -210px; background: radial-gradient(circle, rgba(76,66,245,.5), transparent 70%); }
#cursor-aurora .o2 { width: 340px; height: 340px; left: 50%; top: 40%; margin: -170px 0 0 -170px; background: radial-gradient(circle, rgba(37,211,102,.42), transparent 70%); }
#cursor-aurora .o3 { width: 260px; height: 260px; left: 50%; top: 40%; margin: -130px 0 0 -130px; background: radial-gradient(circle, rgba(168,85,247,.4), transparent 70%); }

/* ── Scroll reveals ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.revealed { opacity: 1; transform: none; }

/* ── Tilt cards ──────────────────────────────────────────────────── */
[data-tilt] { transition: transform .25s ease, box-shadow .25s ease; will-change: transform; }

/* ── Generic carousel rail ───────────────────────────────────────── */
.carousel { position: relative; }
.carousel [data-track] {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 2px 12px;
}
.carousel [data-track]::-webkit-scrollbar { display: none; }
.carousel [data-card] { flex: 0 0 auto; scroll-snap-align: start; }
.carrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07); backdrop-filter: blur(14px); color: #fff;
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s; opacity: 0;
}
.carousel:hover .carrow { opacity: 1; }
.carrow:hover { background: rgba(37,211,102,.25); border-color: rgba(37,211,102,.5); }
.carrow.prev { left: -18px; }
.carrow.next { right: -18px; }
.cdots { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.cdots .dot { width: 7px; height: 7px; border-radius: 50%; border: none; background: rgba(255,255,255,.2); cursor: pointer; transition: all .25s; padding: 0; }
.cdots .dot.on { background: #25D366; width: 22px; border-radius: 100px; box-shadow: 0 0 10px rgba(37,211,102,.5); }

/* ── Hero cinematic carousel ─────────────────────────────────────── */
.hero-carousel { position: relative; min-height: 420px; border-radius: 28px; overflow: hidden; border: 1px solid rgba(37,211,102,.14); box-shadow: 0 24px 80px rgba(0,0,0,.5), 0 0 40px -10px rgba(37,211,102,.14), inset 0 1px 0 rgba(255,255,255,.15); margin-top: 1.2rem; }
.h-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; pointer-events: none; }
.h-slide.active { opacity: 1; pointer-events: auto; }
.h-slide .h-bg { position: absolute; inset: -8%; background-size: cover; background-position: center; animation: kenburns 9s ease-out forwards; }
.h-slide.active .h-bg { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.08) translate(1.5%, 1%); } to { transform: scale(1) translate(0,0); } }
.h-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,10,18,.25), rgba(7,10,18,.62) 60%, rgba(7,10,18,.92)); }
.h-content { position: relative; z-index: 2; height: 100%; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; padding: 2.2rem; }
.h-content .h-cat { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #4ade80; margin-bottom: 8px; }
.h-content h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.h-content p { color: rgba(255,255,255,.7); max-width: 480px; font-size: 14px; margin-bottom: 16px; }
.h-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.h-btn { padding: 10px 22px; border-radius: 100px; font-weight: 600; font-size: 14px; text-decoration: none; transition: all .2s; display: inline-flex; align-items: center; gap: 8px; }
.h-btn-primary { background: linear-gradient(135deg, #2bd86c, #1fa855); color: #04150b; box-shadow: 0 6px 24px rgba(37,211,102,.4); }
.h-btn-glass { background: rgba(37,211,102,.1); color: #fff; border: 1px solid rgba(37,211,102,.22); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); }
.h-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hero-nav { position: absolute; z-index: 6; bottom: 18px; right: 20px; display: flex; gap: 8px; }
.hero-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; cursor: pointer; backdrop-filter: blur(10px); transition: all .2s; }
.hero-nav button:hover { background: rgba(37,211,102,.3); }
.hero-dots { position: absolute; z-index: 6; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-dots .hdot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; transition: all .3s; }
.hero-dots .hdot.on { background: #25D366; width: 26px; border-radius: 100px; box-shadow: 0 0 12px rgba(37,211,102,.6); }

/* ── Stats strip ─────────────────────────────────────────────────── */
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 2rem auto; max-width: 1100px; padding: 0 24px; }
.stat-chip { text-align: center; padding: 18px 12px; border-radius: 18px; background: linear-gradient(160deg, rgba(37,211,102,.16), rgba(20,60,40,.10)); border: 1px solid rgba(37,211,102,.22); backdrop-filter: blur(18px) saturate(200%); -webkit-backdrop-filter: blur(18px) saturate(200%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 10px 2px rgba(37,211,102,.05), 0 8px 28px -12px rgba(0,0,0,.5); }
.stat-chip b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(120deg, #fff 30%, #b9f6d0 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-chip span { font-size: 11px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .08em; }
html.light .stat-chip { background: rgba(255,255,255,.7); border-color: rgba(0,0,0,.08); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
html.light .stat-chip b { background: linear-gradient(120deg, #111827 30%, #059669 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html.light .stat-chip span { color: rgba(0,0,0,.55); }

/* ── ⌘K Command palette ──────────────────────────────────────────── */
#cmd-trigger { cursor: pointer; }
.cmd-palette { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 0; }
.cmd-palette.open { display: flex; }
.cmd-palette .cmd-backdrop { position: absolute; inset: 0; background: rgba(4,6,12,.6); backdrop-filter: blur(8px); animation: fadein .2s ease; }
.cmd-box { position: relative; width: 100%; max-width: 560px; border-radius: 20px; overflow: hidden; background: linear-gradient(170deg, rgba(16,28,22,.94), rgba(10,16,13,.88)); border: 1px solid rgba(37,211,102,.18); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); box-shadow: 0 32px 90px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12), 0 0 40px -12px rgba(37,211,102,.2); animation: cmdup .25s cubic-bezier(.22,.61,.36,1); }
@keyframes cmdup { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes fadein { from { opacity: 0; } }
.cmd-search { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.cmd-search svg { width: 18px; height: 18px; color: #25D366; flex-shrink: 0; }
.cmd-search input { flex: 1; background: none; border: none; outline: none; color: #f3f5f9; font-size: 15px; font-family: inherit; }
.cmd-search input::placeholder { color: rgba(255,255,255,.35); }
.cmd-kbd { font-size: 11px; color: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 2px 7px; }
.cmd-results { max-height: 380px; overflow-y: auto; padding: 10px; }
.cmd-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; text-decoration: none; color: #f3f5f9; transition: all .15s; opacity: 0; animation: fadein .25s forwards; }
.cmd-item:hover { background: rgba(37,211,102,.14); }
.cmd-ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.cmd-lb { font-size: 14px; font-weight: 500; flex: 1; }
.cmd-hint { font-size: 11px; color: rgba(255,255,255,.4); }
.cmd-empty { text-align: center; color: rgba(255,255,255,.4); padding: 26px; font-size: 13px; }

/* ── City ticker ─────────────────────────────────────────────────── */
.city-ticker { display: flex; align-items: center; gap: 8px; max-width: 1100px; margin: 0 auto 28px; padding: 10px 18px; border-radius: 100px; background: rgba(37,211,102,.06); border: 1px solid rgba(37,211,102,.14); backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%); font-size: 12.5px; color: rgba(255,255,255,.65); overflow: hidden; white-space: nowrap; }
.tick-dot { width: 7px; height: 7px; border-radius: 50%; background: #25D366; box-shadow: 0 0 10px rgba(37,211,102,.8); flex-shrink: 0; animation: pulse 1.6s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.city-ticker.fade .tick-text { animation: tickfade 1s ease; }
@keyframes tickfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── WhatsApp chat mock ──────────────────────────────────────────── */
.wa-mock { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 0 auto 22px; }
.chat-bubble { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; opacity: 0; transform: translateY(10px) scale(.97); transition: all .45s cubic-bezier(.22,.61,.36,1); }
.chat-bubble.show { opacity: 1; transform: none; }
.chat-in { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.1); color: #e8ecf5; align-self: flex-start; border-bottom-left-radius: 5px; }
.chat-out { background: linear-gradient(135deg, rgba(37,211,102,.25), rgba(37,211,102,.12)); border: 1px solid rgba(37,211,102,.3); color: #d8ffe8; align-self: flex-end; border-bottom-right-radius: 5px; }
.chat-bubble b { color: #4ade80; }
.wa-typing { display: inline-flex; gap: 4px; padding: 12px 16px; align-self: flex-start; }
.wa-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); animation: typing 1.2s ease infinite; }
.wa-typing i:nth-child(2) { animation-delay: .15s; }
.wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ── Bento category grid ─────────────────────────────────────────── */
.bento-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.bento-item { border-radius: 20px; padding: 22px 18px; text-decoration: none; color: inherit; position: relative; overflow: hidden; background: linear-gradient(160deg, rgba(37,211,102,.07), rgba(255,255,255,.02)); border: 1px solid rgba(37,211,102,.13); backdrop-filter: blur(18px) saturate(185%); -webkit-backdrop-filter: blur(18px) saturate(185%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 8px 2px rgba(255,255,255,.04); transition: all .25s; display: flex; flex-direction: column; gap: 8px; }
.bento-item::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(37,211,102,.7) 30%, rgba(255,255,255,.6) 50%, rgba(37,211,102,.7) 70%, transparent); }
.bento-item:hover { transform: translateY(-4px); border-color: rgba(37,211,102,.45); box-shadow: 0 16px 44px rgba(0,0,0,.45), 0 0 34px rgba(37,211,102,.16); }
.bento-item .b-ic { font-size: 26px; }
.bento-item .b-name { font-weight: 700; font-size: 14.5px; }
.bento-item .b-count { font-size: 11px; color: rgba(255,255,255,.5); }
.bento-item .b-arrow { position: absolute; top: 16px; right: 16px; font-size: 13px; opacity: 0; transform: translateX(-6px); transition: all .25s; }
.bento-item:hover .b-arrow { opacity: 1; transform: none; }
.bento-wide { grid-column: span 3; }
.bento-tall { grid-row: span 2; }
.bento-mid { grid-column: span 2; }
@media (max-width: 900px) { .bento-wide, .bento-mid { grid-column: span 3; } }
@media (max-width: 600px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } .bento-wide, .bento-mid { grid-column: span 2; } }

/* ── Section header with arrows ──────────────────────────────────── */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.sec-head h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.sec-head .sec-sub { font-size: 12px; color: rgba(255,255,255,.45); }
.sec-nav { display: flex; gap: 8px; }

/* ── Grain overlay (dedicated layer — must NOT hijack body::before) ── */
.grain-overlay { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .h-slide .h-bg, #cursor-aurora .orb { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chat-bubble { transition: none; }
}
