/* home.css — Orion home page redesign */

/* ── Bimio mascot blink animation ───────────────────────────────────────── */
@keyframes bimioBlink {
  0%, 90%, 100% { transform: scaleY(1); }
  95%            { transform: scaleY(0.08); }
}

/* ── Page layout ─────────────────────────────────────────────────────────── */
body {
  background: #0a0c10;
  overflow-x: hidden;
}

/* Subtle radial glow behind content */
body::before {
  content: '';
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 80vh;
  background: radial-gradient(ellipse at center, rgba(34,211,238,0.055) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.home-main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem 3rem;
  gap: 1.75rem;
}

/* ── Top bar (lang switcher + user btn) ──────────────────────────────────── */
.home-topbar {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ── User button ─────────────────────────────────────────────────────────── */
.user-btn {
  position: static; /* now sits inside .home-topbar */
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(18,21,28,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  backdrop-filter: blur(8px);
}
.user-btn:hover {
  border-color: rgba(34,211,238,0.5);
  color: #22d3ee;
}
.user-btn svg { width: 18px; height: 18px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-mascot {
  width: 72px;
  height: 72px;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 0 18px rgba(34,211,238,0.3));
}
.hero-mascot svg { width: 100%; height: 100%; }

.hero-title {
  text-align: center;
  line-height: 1.1;
}

.hero-title-orion {
  display: block;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 800;
  color: #22d3ee;
  letter-spacing: -0.03em;
}

.hero-title-sub {
  display: block;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.01em;
  min-height: 1.5em;
  margin-top: 0.3rem;
}

/* Typewriter cursor */
.hero-title-sub::after {
  content: '|';
  color: #22d3ee;
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  line-height: 1.7;
  max-width: 340px;
}

/* ── Input box ───────────────────────────────────────────────────────────── */
.home-input-wrap {
  width: 100%;
  max-width: 580px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.home-input-box {
  display: flex;
  align-items: flex-end;
  gap: 0;
  background: rgba(18,21,28,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 0; /* no padding here — textarea carries it all */
  transition: border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(12px);
  overflow: hidden; /* keep children inside the border-radius */
}

.home-input-box:focus-within {
  border-color: rgba(34,211,238,0.5);
  box-shadow: 0 0 0 1px rgba(34,211,238,0.15), 0 8px 32px rgba(0,0,0,0.4);
}

#home-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #f0f2f5;
  resize: none;
  line-height: 1.6;
  max-height: 160px;
  overflow-y: auto;
  font-family: inherit;
  cursor: text;
  /* padding lives here — entire visible area is the textarea */
  padding: 1.1rem 0 0.9rem 1.2rem;
  margin: 0;
  display: block;
  align-self: stretch;
}

#home-input::placeholder { color: rgba(255,255,255,0.28); }

.home-send-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: #22d3ee;
  color: #0a0c10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
  opacity: 0.4;
  /* own margin since form has no padding */
  margin: 0.65rem 0.65rem 0.65rem 0.5rem;
}
.home-send-btn.ready {
  opacity: 1;
}
.home-send-btn:hover { background: #67e8f9; transform: scale(1.05); }
.home-send-btn svg { width: 17px; height: 17px; }

/* ── Mode toggle row ─────────────────────────────────────────────────────── */
.home-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.5rem 0;
}

.home-mode-toggle {
  display: flex;
  gap: 0.25rem;
}

.home-mode-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 500;
  background: transparent;
  color: rgba(255,255,255,0.35);
  transition: all 0.15s;
  cursor: pointer;
  font-family: inherit;
}
.home-mode-btn svg { width: 13px; height: 13px; }
.home-mode-btn:hover { color: rgba(255,255,255,0.65); }
.home-mode-btn.active {
  background: rgba(34,211,238,0.12);
  border-color: rgba(34,211,238,0.25);
  color: #22d3ee;
}

.home-privacy-note {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
}

/* ── Suggestion chips ────────────────────────────────────────────────────── */
.home-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 580px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.home-chip {
  padding: 0.45rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.home-chip:hover {
  background: rgba(34,211,238,0.08);
  border-color: rgba(34,211,238,0.2);
  color: rgba(255,255,255,0.85);
}

/* ── Recent conversations (logged in) ───────────────────────────────────── */
.home-history-section {
  width: 100%;
  max-width: 580px;
  animation: fadeUp 0.5s ease both;
}

.home-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.home-history-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
}

.home-history-view-all {
  font-size: 0.72rem;
  color: rgba(34,211,238,0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.home-history-view-all:hover { color: #22d3ee; }

.home-history-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.home-history-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;
}
.home-history-card:hover {
  background: rgba(34,211,238,0.05);
  border-color: rgba(34,211,238,0.18);
}
.home-history-card-title {
  font-size: 0.78rem;
  color: rgba(232,234,240,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-history-card-time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.22);
}

/* ── Trust bar ───────────────────────────────────────────────────────────── */
.home-trust {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s 0.3s ease both;
}
.home-trust-dot { opacity: 0.4; }
.home-trust-link {
  color: rgba(34,211,238,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
.home-trust-link:hover { color: #22d3ee; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .home-main { padding: 4rem 1rem 2.5rem; gap: 1.4rem; }
  .hero-mascot { width: 56px; height: 56px; }
  .home-chips { gap: 0.4rem; }
  .home-chip { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
  .home-history-grid { grid-template-columns: 1fr; }
  .home-privacy-note { display: none; }
  .home-trust { gap: 0.4rem; font-size: 0.68rem; }
}
