/* ===== homepage.css — Consulting homepage specific styles ===== */

/* Background override */
body.page-home {
  background: url("/fantastic-seascape-with-ripples.jpg") center top / cover fixed no-repeat;
}

body.page-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(232,246,255,0.65), rgba(248,252,255,0.85) 46%, rgba(228,244,255,0.7)),
    rgba(255,255,255,0.3);
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.hero-main {
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(7,17,28,0.72);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue-start);
  box-shadow: 0 0 16px rgba(5, 117, 230, 0.72);
}

h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 8px 30px rgba(255,255,255,0.35);
}
.lead {
  width: min(900px, 100%);
  margin: 0;
  color: rgba(7,17,28,0.74);
  font-size: 18px;
  line-height: 1.8;
  font-weight: 600;
}

/* Search */
.search-glass {
  width: min(100%, 980px);
  border-radius: 999px;
  padding: 12px;
  margin-top: 8px;
}

.search-inner {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.28);
  color: rgba(7,17,28,0.68);
  font-weight: 800;
}

.search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent !important;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
}

.search-input::placeholder { color: rgba(7,17,28,0.58); }
.search-input:focus,
.search-input:active,
.search-input:hover {
  background: transparent !important;
  box-shadow: none !important;
}
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration { display: none; }
.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover,
.search-input:-webkit-autofill:focus,
.search-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  transition: background-color 9999s ease-out;
}

.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 15px 26px;
  color: #fff;
  font-weight: 900;
  background: var(--brand);
  box-shadow: 0 16px 34px rgba(5, 117, 230, 0.26);
  white-space: nowrap;
}

/* Upload switch */
.upload-switch {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.upload-choice {
  border: 1px solid var(--line);
  min-width: 188px;
  border-radius: 999px;
  padding: 13px 22px;
  color: rgba(7,17,28,0.7);
  font-weight: 800;
  background: linear-gradient(145deg, rgba(255,255,255,0.52), rgba(255,255,255,0.2));
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.8), var(--shadow);
}

.upload-choice.active {
  color: #fff;
  background: var(--brand);
}

/* Diagnosis Panel */
.panel {
  width: min(980px, 100%);
  border-radius: 32px;
  overflow: hidden;
  text-align: left;
  margin-top: 10px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.34);
}

.panel-title { margin: 0; font-size: 18px; font-weight: 900; }
.status {
  border-radius: 999px;
  padding: 9px 13px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

/* Dropzone */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  margin: 28px;
  border: 1px dashed rgba(255,255,255,0.68);
  border-radius: 28px;
  background: rgba(255,255,255,0.16);
  text-align: center;
  transition: transform .2s ease, background .2s ease;
}

.dropzone.dragging { transform: scale(1.01); background: rgba(5,117,230,0.18); }
.dropzone input { display: none; }
.dropzone strong { display: block; margin-top: 14px; font-size: 18px; }
.dropzone span, .file-meta, .tiny { color: rgba(7,17,28,0.62); font-weight: 600; }
.file-meta { margin-top: 10px; }

/* Privacy note */
.privacy-note {
  margin: -12px 28px 22px;
  padding: 12px 16px;
  border-radius: 18px;
  color: rgba(7,17,28,0.7);
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.44);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.7;
}

/* File toolbar & list */
.file-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 28px 14px;
}
.file-toolbar.show { display: flex; }

.file-count { color: rgba(7,17,28,0.68); font-size: 13px; font-weight: 800; }

.clear-files {
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255,255,255,0.24);
  color: rgba(7,17,28,0.74);
  font-size: 13px;
  font-weight: 900;
}
.file-list {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 0 28px 24px;
}
.file-list.show { display: grid; }

.file-card {
  display: grid;
  grid-template-columns: 46px 1fr 34px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.54);
  border-radius: 20px;
  background: rgba(255,255,255,0.2);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.62);
  min-width: 0;
}

.file-thumb {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 950;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
  color: rgba(7,17,28,0.82);
}

.file-size {
  margin-top: 4px;
  color: rgba(7,17,28,0.58);
  font-size: 12px;
  font-weight: 750;
}

.remove-file {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.3);
  color: rgba(7,17,28,0.72);
  font-weight: 950;
}

/* API message */
.api-message {
  display: none;
  margin: 0 28px 24px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.28);
  color: rgba(7,17,28,0.78);
  line-height: 1.7;
  font-weight: 650;
  white-space: pre-wrap;
}
.api-message.show { display: block; }
/* Progress overlay */
.progress-overlay {
  display: none;
  margin: 0 28px 24px;
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(255,255,255,0.38);
  flex-direction: column;
  gap: 12px;
}
.progress-overlay.show { display: flex; }

.progress-label { font-size: 14px; font-weight: 750; color: rgba(7,17,28,0.7); }

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  transition: width 0.3s ease;
}

.progress-percent {
  font-size: 13px;
  font-weight: 800;
  color: rgba(7,17,28,0.5);
  text-align: right;
}

/* Chat panel */
.chat-panel {
  display: none;
  margin: 0 28px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.6);
  background: linear-gradient(145deg, rgba(255,255,255,0.38), rgba(255,255,255,0.14)), rgba(255,255,255,0.16);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.7), 0 12px 40px rgba(26,102,178,0.08);
  overflow: hidden;
}
.chat-panel.show { display: flex; flex-direction: column; }

.chat-header {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 950;
  color: rgba(7,17,28,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-start); }
.chat-messages {
  flex: 1;
  max-height: 320px;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.7;
  word-break: break-word;
}
.chat-bubble.user {
  align-self: flex-end;
  color: #fff;
  background: var(--brand);
  border-bottom-right-radius: 6px;
}
.chat-bubble.ai {
  align-self: flex-start;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255,255,255,0.58), rgba(255,255,255,0.2));
  border: 1px solid rgba(255,255,255,0.55);
  border-bottom-left-radius: 6px;
}
.chat-sources {
  align-self: flex-start;
  max-width: 88%;
  font-size: 11px;
  color: rgba(7,17,28,0.45);
  font-weight: 750;
  margin-top: -6px;
  padding: 0 4px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.4);
}
.chat-input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.32);
  color: var(--ink);
  outline: none;
  font-weight: 750;
  font-size: 14px;
}
.chat-input::placeholder { color: rgba(7,17,28,0.32); }
.chat-send {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: var(--brand);
  font-weight: 950;
  font-size: 14px;
  white-space: nowrap;
}
/* Report actions */
.report-actions { display: none; justify-content: flex-end; margin: 0 28px 24px; }
.report-actions.show { display: flex; }

.download-report {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 32px rgba(5, 117, 230, 0.22);
  font-weight: 900;
}

/* Insight grid */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 0 28px 28px;
}

.insight {
  border: 1px solid rgba(255,255,255,0.52);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255,255,255,0.18);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.62);
}

.meter {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 14px;
  background: rgba(7,17,28,0.1);
}

.bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #15803d);
}
.bar.warn { background: linear-gradient(90deg, #ef4444, #991b1b); }

/* Next row & workflow */
.next-row, .workflow {
  width: min(980px, 100%);
  margin: 28px auto 0;
  display: grid;
  gap: 18px;
}
.next-row { grid-template-columns: repeat(3, 1fr); }
.workflow { grid-template-columns: repeat(4, 1fr); }

.tile, .step {
  border-radius: 30px;
  padding: 24px;
  min-height: 124px;
}
.tile strong, .step strong { display: block; margin-bottom: 10px; font-size: 18px; }
.tile small { color: rgba(7,17,28,0.62); font-weight: 650; line-height: 1.7; }

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-weight: 900;
  color: #fff;
  background: var(--brand);
}
/* Footer note */
.footer-note {
  width: min(980px, 100%);
  margin: 28px auto 0;
  border-radius: 28px;
  padding: 22px 26px;
  color: rgba(7,17,28,0.68);
  text-align: center;
  font-weight: 700;
  line-height: 1.7;
}

/* Responsive — homepage */
@media (max-width: 1100px) {
  .panel { width: 100%; }
  .next-row, .workflow { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: clamp(28px, 8vw, 42px); white-space: normal; }
  .lead { font-size: 14px; line-height: 1.7; }
  .eyebrow { font-size: 12px; padding: 6px 12px; }
  .hero { gap: 16px; }
  .hero-main { gap: 14px; }

  .search-glass {
    border-radius: 24px;
    padding: 6px;
    margin-top: 4px;
  }
  .search-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .search-inner .icon { display: none; }
  .search-input {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 18px;
  }
  .search-input::placeholder { font-size: 13px; }
  .primary-btn {
    width: 100%;
    margin-top: 8px;
    padding: 14px 20px;
    border-radius: 22px;
    font-size: 15px;
  }

  .upload-switch { gap: 8px; }
  .upload-choice {
    padding: 11px 16px;
    font-size: 13px;
    min-width: 0;
  }

  .panel { border-radius: 22px; margin-top: 8px; }
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 18px;
  }
  .panel-title { font-size: 16px; }
  .dropzone {
    min-height: 120px;
    margin: 16px;
    border-radius: 18px;
  }
  .dropzone strong { font-size: 15px; }
  .privacy-note, .api-message, .file-toolbar, .file-list, .report-actions {
    margin-left: 16px;
    margin-right: 16px;
  }
  .insight-grid {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }
  .next-row, .workflow { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(24px, 7vw, 32px); }
  .lead { font-size: 13px; }
  .upload-switch { flex-direction: column; align-items: stretch; }
  .upload-choice { min-width: 0; text-align: center; }
  .search-glass { border-radius: 20px; }
  .panel { border-radius: 18px; }
  .dropzone { min-height: 100px; margin: 12px; border-radius: 14px; }
  .panel-head { padding: 14px 14px; }
}
