/* ============================================================
   Svarg — Landing page (ChatGPT-style layout)
   Sidebar + centered prompt. Extends global style.css tokens.
   ============================================================ */

.landing2 {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.side {
  width: 252px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.025);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 12px 14px;
}

.side__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 0 8px;
  margin-bottom: 20px;
}
.side__logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.side__toggle {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.side__toggle:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side__toggle--mobile { display: none; }

.side__label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin: 0 0 8px;
  padding: 0 8px;
}

/* Blueprint history list */
.side__bps {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.side__bp {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s, color 0.12s;
}
.side__bp:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.side__bp--generating { color: rgba(92, 197, 167, 0.85); }

.side__bps-empty {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.3);
  padding: 4px 10px;
  margin: 0;
  line-height: 1.5;
}

/* Something went wrong, as opposed to nothing being there. Same slot and
   size as the empty state, but readable rather than receded — an absence
   should not draw the eye, a fault should. */
.side__bps-error {
  font-size: 12.5px;
  color: rgba(240, 160, 130, 0.9);
  padding: 4px 10px;
  margin: 0;
  line-height: 1.5;
}

/* Bottom links — pinned to the bottom of the sidebar.
   div (not <nav>) to stay clear of the global nav styles in style.css. */
.side__nav {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 10px;
}

.side__link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.side__link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side__link svg { flex-shrink: 0; opacity: 0.8; }

.side__link-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5CC5A7;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Main column ────────────────────────────────────────────── */
.main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto; /* never let content become unreachable on short viewports */
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  flex-shrink: 0;
}

.topbar__auth { display: flex; align-items: center; gap: 10px; }

.auth-btn {
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 9px 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.12s, border-color 0.12s, color 0.12s, background 0.12s;
}

.auth-btn--solid {
  background: #fff;
  color: #000;
}
.auth-btn--solid:hover { opacity: 0.85; }

.auth-btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}
.auth-btn--outline:hover { border-color: var(--accent-green); color: #fff; }

.auth-btn--workspace {
  background: linear-gradient(135deg, #5CC5A7, #3DAFD3);
  color: #fff;
}
.auth-btn--workspace:hover { opacity: 0.88; }

/* ── Center content ─────────────────────────────────────────── */
.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 24px;
  max-width: 760px;
  width: 100%;
  /* margin:auto centers vertically in the remaining space but, unlike
     flex justify-content:center, stays scrollable when content is taller
     than the viewport */
  margin: auto;
}

.center__heading {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  margin: 0 0 14px;
}

.center__heading-accent {
  background: linear-gradient(135deg, #5CC5A7, #3DAFD3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.center__desc {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  max-width: 620px;
  margin: 0 0 10px;
}
.center__desc:last-of-type { margin-bottom: 22px; }

/* ── Prompt box (ChatGPT-style) ─────────────────────────────── */
.prompt {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  padding: 12px 12px 12px 22px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.prompt:focus-within {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(92, 197, 167, 0.14);
}

.prompt__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.5;
  font-family: inherit;
  max-height: 180px;
  padding: 4px 0;
}
.prompt__input::placeholder { color: rgba(255, 255, 255, 0.38); }

.prompt__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5CC5A7, #3DAFD3);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.12s, box-shadow 0.12s;
}
.prompt__send:hover { opacity: 0.88; box-shadow: 0 4px 18px rgba(92, 197, 167, 0.4); }

.prompt__error {
  font-size: 13px;
  color: #f87171;
  margin: 10px 0 0;
}

/* Same idea as .gen-error__link on the workspace: the upgrade is part of the
   refusal sentence, not a button somewhere else. */
.prompt__error-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}
.prompt__error-link:hover { opacity: 0.85; }

.prompt__counter {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  margin: 6px 2px 0;
  max-width: 640px;
  width: 100%;
}
.prompt__counter--over { color: #f87171; }

/* ── Confluence connector (optional, before generating) ───────── */
.confluence-connect {
  width: 100%;
  max-width: 640px;
  margin-top: 14px;
}

.confluence-connect__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.confluence-connect__btn:hover {
  border-color: var(--accent-green);
  background: rgba(92, 197, 167, 0.07);
  color: #fff;
}
.confluence-connect__btn:disabled { cursor: not-allowed; opacity: 0.6; }

.confluence-connect__hint {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.confluence-connect__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(92, 197, 167, 0.08);
  border: 1px solid rgba(92, 197, 167, 0.3);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}
.confluence-connect__badge strong { color: #5CC5A7; }

.confluence-connect__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5CC5A7;
  flex-shrink: 0;
}

/* ── Example prompt card ────────────────────────────────────── */
.examples {
  width: 100%;
  max-width: 640px;
  margin-top: 20px;
}

.examples__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.examples__divider::before,
.examples__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.examples__divider span {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.example-card {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.example-card:hover {
  border-color: var(--accent-green);
  background: rgba(92, 197, 167, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

/* ── Bottom note ────────────────────────────────────────────── */
.bottom-note {
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.38);
  padding: 10px 24px 12px;
  margin: 0;
  flex-shrink: 0;
}

/* ── Log in / sign up modal ─────────────────────────────────── */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
}

.auth-modal__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #16181d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  animation: auth-pop 0.18s ease-out both;
}
@keyframes auth-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}
.auth-modal__close:hover { color: #fff; }

.auth-modal__title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 10px;
  color: #fff;
}

.auth-modal__sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 26px;
}

.auth-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.auth-modal__btn:hover {
  border-color: var(--accent-green);
  background: rgba(92, 197, 167, 0.07);
}
.auth-modal__btn svg { flex-shrink: 0; }

.auth-modal__or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}
.auth-modal__or::before,
.auth-modal__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.auth-modal__or span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.4);
}

.auth-modal__email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-modal__email {
  width: 100%;
  padding: 13px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
.auth-modal__email::placeholder { color: rgba(255, 255, 255, 0.35); }
.auth-modal__email:focus { border-color: var(--accent-green); }

.auth-modal__continue {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.12s;
}
.auth-modal__continue:hover { opacity: 0.85; }
.auth-modal__continue:disabled { opacity: 0.5; cursor: default; }

.auth-modal__code {
  text-align: center;
  letter-spacing: 6px;
  font-size: 17px;
  font-weight: 700;
}

.auth-modal__links {
  margin: 18px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-modal__link {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-modal__link:hover { color: var(--accent-green); }
.auth-modal__link:disabled { color: rgba(255, 255, 255, 0.3); cursor: default; text-decoration: none; }

.auth-modal .prompt__error { margin-top: 14px; }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    background: #141414;
    width: 252px;
  }
  .landing2.side-open .side { transform: translateX(0); }

  .side__toggle--mobile { display: flex; margin-right: auto; }

  .center__heading { font-size: 23px; }
  .center__desc { font-size: 13.5px; }
  .prompt { border-radius: 22px; padding-left: 16px; }
}

/* ── Profile dropdown (signed-in topbar) ────────────────────── */
.profile-menu { position: relative; }

.profile-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.profile-btn:hover { border-color: var(--accent-green); background: rgba(92, 197, 167, 0.07); }
.profile-btn svg { opacity: 0.6; }

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5CC5A7, #3DAFD3);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.profile-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #16181d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 300;
}

.profile-dropdown__item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.profile-dropdown__item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.profile-dropdown__item--danger:hover { background: rgba(248, 113, 113, 0.12); color: #f87171; }

/* ── Voice input ───────────────────────────────────────────────────────────────
   A microphone beside the send button on the objective box. Describing a
   business problem into an empty box is the slowest step in the product;
   spoken, the same description takes fifteen seconds and usually comes out
   better, because it is how someone would explain it to a colleague.

   Secondary to Send on purpose. Send is the action; this is a way of filling
   the box, and a second gradient circle would make the form read as two equal
   choices. */

.voice-btn {
  order: -1;                 /* mic, then send — appended last, shown first */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.voice-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.voice-btn:disabled { cursor: default; opacity: 0.75; }

/* Recording. Red because it is the one universally understood signal that a
   microphone is live, and someone must never be unsure whether it is. */
.voice-btn--on,
.voice-btn--on:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.55);
  color: #FCA5A5;
  animation: voice-pulse 1.6s ease-in-out infinite;
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50%      { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
}

.voice-btn--busy { animation: voice-spin 0.9s linear infinite; }

@keyframes voice-spin {
  to { transform: rotate(360deg); }
}

/* A pulsing, spinning control is exactly what motion sensitivity exists to
   avoid. The colour still says what state it is in. */
@media (prefers-reduced-motion: reduce) {
  .voice-btn--on, .voice-btn--busy { animation: none; }
}
