﻿/*
  Honest Search visual system
  - Clean, minimal, search-first UI
  - Strong hierarchy, soft depth, and responsive layout
*/

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #fbfcfe;
  --text: #16181d;
  --muted: #5e6674;
  --line: #d8dde6;
  --line-strong: #c4ccd8;
  --accent: #1f2430;
  --accent-strong: #0f1320;
  --danger: #b42318;
  --brand-a: #ff5f1f;
  --brand-b: #f43f5e;
  --brand-c: #0f172a;
  --radius-pill: 999px;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow-soft: 0 6px 30px rgba(16, 24, 40, 0.08);
  --shadow-focus: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(900px 480px at -10% -12%, rgba(255, 95, 31, 0.14), transparent 60%),
    radial-gradient(760px 420px at 100% 0%, rgba(244, 63, 94, 0.12), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: 0;
}

body::before {
  width: 200px;
  height: 200px;
  right: 6%;
  top: 22%;
  background: rgba(255, 95, 31, 0.4);
}

body::after {
  width: 220px;
  height: 220px;
  left: 5%;
  bottom: 10%;
  background: rgba(99, 102, 241, 0.2);
}

.page {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.page-home {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.page-result {
  padding-top: 34px;
  display: grid;
  gap: 18px;
}

.hero-panel {
  width: 100%;
  max-width: 840px;
  border: 1px solid rgba(196, 204, 216, 0.7);
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(251, 252, 254, 0.95));
  box-shadow: var(--shadow-soft);
  padding: 40px 34px;
  display: grid;
  gap: 24px;
  animation: fadeInUp 0.45s ease;
}

.brand-block {
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.brand-text {
  background: linear-gradient(112deg, var(--brand-a), var(--brand-b) 45%, var(--brand-c));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo {
  width: clamp(44px, 7vw, 72px);
  height: clamp(44px, 7vw, 72px);
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(31, 36, 48, 0.22);
}

.brand-small {
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
}

.brand-small .brand-logo {
  width: clamp(32px, 5vw, 44px);
  height: clamp(32px, 5vw, 44px);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(31, 36, 48, 0.18);
}

.tagline {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  font-weight: 600;
}

.result-header {
  display: flex;
  align-items: center;
}

.search-form {
  width: 100%;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 8px 10px;
  box-shadow: 0 3px 16px rgba(16, 24, 40, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.search-wrap:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.search-wrap:focus-within {
  border-color: var(--brand-b);
  box-shadow: var(--shadow-focus);
}

.search-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 600;
  padding: 11px 12px;
}

.search-wrap input::placeholder {
  color: #8b94a5;
  font-weight: 500;
}

.search-wrap button {
  border: 0;
  outline: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-size: 0.93rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.2s ease;
}

.search-wrap button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.search-wrap button:active {
  transform: translateY(0);
}

.search-wrap button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.quick-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: #293040;
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.quick-chip:hover {
  border-color: #b6bfcd;
  background: #f3f5f9;
  transform: translateY(-1px);
}

.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.utility-links a {
  border: 1px solid rgba(184, 193, 206, 0.85);
  background: rgba(255, 255, 255, 0.92);
  color: #2a3140;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  line-height: 1;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.utility-links a:hover {
  border-color: #b6bfcd;
  background: #f3f5f9;
  transform: translateY(-1px);
}

.utility-links-legal {
  justify-content: flex-start;
}

.legal-page .utility-links-legal a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 6px 10px;
  line-height: 1.05;
}

.legal-page {
  min-height: 100dvh;
  display: grid;
  gap: 18px;
  padding-top: 34px;
  align-content: start;
}

.legal-page .utility-links {
  align-self: start;
}

.legal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.legal-card h1 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.legal-card h2 {
  margin: 18px 0 8px;
  font-size: 1.08rem;
}

.legal-card p {
  margin: 8px 0;
  color: #303746;
  line-height: 1.6;
}

.legal-card ul {
  margin: 8px 0 8px 20px;
  padding: 0;
  color: #303746;
}

.legal-card li {
  margin: 6px 0;
}

.inline-link {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  padding: 20px;
  min-height: 180px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  animation: fadeInUp 0.35s ease;
}

.query-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.result-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.answer-text {
  margin: 0;
  color: #10131a;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.58;
  font-weight: 700;
}

.result-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #222833;
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  background: #f3f5f9;
  border-color: #bcc5d3;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.loading {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #171b23;
  font-size: 1rem;
  font-weight: 800;
}

/* Spinner before loading text */
.loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #c9d0dc;
  border-top-color: #171b23;
  animation: spin 0.75s linear infinite;
}

.error-text {
  margin: 0;
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 700;
}

.footnote {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

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

@media (max-width: 760px) {
  .page {
    padding: 14px;
  }

  .hero-panel {
    padding: 24px 16px;
    border-radius: 22px;
    gap: 18px;
  }

  .tagline {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .search-wrap {
    padding: 6px;
    gap: 8px;
  }

  .search-wrap input {
    padding: 10px 8px;
    font-size: 0.95rem;
  }

  .search-wrap button {
    padding: 10px 14px;
    font-size: 0.84rem;
  }

  .quick-queries {
    gap: 8px;
  }

  .quick-chip {
    font-size: 0.8rem;
    padding: 7px 11px;
  }

  .utility-links a {
    font-size: 0.74rem;
    padding: 6px 9px;
  }

  .utility-links-legal {
    justify-content: center;
  }

  .result-card {
    padding: 14px;
  }

  .result-actions {
    gap: 8px;
  }

  .legal-card {
    padding: 16px;
  }
}
