:root {
  --bg: #0a0c0d;
  --bg-raised: #111516;
  --bg-card: #14181a;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #21e6c1;
  --accent-dim: #12352f;
  --accent-ink: #04211d;
  --text: #eef3f2;
  --text-dim: #9db3ae;
  --text-faint: #5e716d;
  --gold: #e8b64c;
  --silver: #c3ccd1;
  --bronze: #cd8c5c;
  --violet: #b490f0;
  --violet-dim: rgba(180, 144, 240, 0.14);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 10px;
}

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

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

/* header */

.site-top {
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header {
  background: rgba(10, 12, 13, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

/* mode switch */

.mode-switch-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.mode-switch {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.75rem 0;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.mode-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mode-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.mode-btn.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

/* provider view */

.provider-section {
  padding: 3.5rem 0 4.5rem;
}

.provider-subtitle {
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0.75rem 0 2rem;
}

.requests-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.request-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  opacity: 0;
  animation: fade-up 0.3s ease forwards;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.request-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.request-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
}

.request-icon svg {
  width: 22px;
  height: 22px;
}

.request-icon--entrega {
  background: rgba(232, 182, 76, 0.14);
  color: var(--gold);
}

.request-icon--profissional {
  background: var(--violet-dim);
  color: var(--violet);
}

.request-badge {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.3rem 0.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}

.request-badge--corrida {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.request-badge--entrega {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(232, 182, 76, 0.1);
}

.request-badge--profissional {
  color: var(--violet);
  border-color: var(--violet);
  background: var(--violet-dim);
}

.request-info {
  flex: 1;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.request-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.accept-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.accept-btn:hover:not(:disabled) {
  background: #3df2cd;
}

.accept-btn:disabled {
  background: var(--bg-raised);
  color: var(--text-faint);
  cursor: default;
}

.requests-error,
.ranking-error {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* hero */

.hero {
  padding: 5rem 0 5.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

.hero .subtitle {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 42ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cta-button:hover {
  background: #3df2cd;
  transform: translateY(-1px);
}

.cta-secondary {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cta-secondary:hover {
  color: var(--text);
  border-color: var(--accent);
}

.preview-window {
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.preview-search-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.25rem;
  padding: 0.7rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.preview-search-bar .search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.preview-answer {
  margin: 0 1.25rem 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* sections */

.ranking-section,
.search-section,
.how-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
}

.ranking-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.ranking-sort-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#ranking-sort {
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  font-family: var(--font-body);
}

#ranking-sort:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.rank-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  opacity: 0;
  animation: fade-up 0.3s ease forwards;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.rank-card--1 {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 14px 30px rgba(232, 182, 76, 0.12);
}

.rank-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.rank-avatar {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--accent-dim);
  color: var(--accent);
}

.rank-card--1 .rank-avatar {
  background: rgba(232, 182, 76, 0.16);
  color: var(--gold);
}

.rank-card--2 .rank-avatar {
  background: rgba(195, 204, 209, 0.14);
  color: var(--silver);
}

.rank-card--3 .rank-avatar {
  background: rgba(205, 140, 92, 0.16);
  color: var(--bronze);
}

.rank-pos {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.rank-card--1 .rank-pos {
  color: var(--gold);
}

.rank-name {
  font-size: 1.1rem;
  margin: 0 0 0.2rem;
}

.rank-service {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 0.8rem;
  text-transform: capitalize;
}

.rank-stars {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-bottom: 0.9rem;
}

.star {
  color: var(--border-strong);
  font-size: 0.95rem;
}

.star--filled {
  color: var(--gold);
}

.rank-rating-num {
  margin-left: 0.4rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
}

.rank-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.chip {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.chip--fast {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.rank-cta {
  margin-top: auto;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rank-cta:hover {
  background: #3df2cd;
}

/* search bar (Google-style) */

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

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 620px;
  margin: 1.75rem 0 0;
  padding: 0.9rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  flex-shrink: 0;
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

#chat-input::placeholder {
  color: var(--text-faint);
}

#chat-input:disabled {
  opacity: 0.5;
}

.search-results {
  max-width: 620px;
  margin-top: 1.25rem;
}

.search-results:empty {
  margin-top: 0;
}

.result-query {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.result-answer {
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0;
  animation: fade-up 0.25s ease forwards;
}

.result-answer--error {
  border-color: #ff7d8a;
  color: #ff9aa6;
}

.result-loading {
  color: var(--text-dim);
}

/* post a request */

.post-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.post-subtitle {
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0.75rem 0 2rem;
}

.post-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 760px;
  align-items: end;
}

.post-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post-field--wide {
  grid-column: span 2;
}

.post-field label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}

.post-field input,
.post-field select {
  padding: 0.6rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.post-field input:focus,
.post-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.post-submit {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.post-submit:hover {
  background: #3df2cd;
}

.post-status {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  min-height: 1.2em;
}

.post-status--ok {
  color: var(--accent);
}

.post-status--error {
  color: #ff9aa6;
}

/* how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-number {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* footer */

.site-footer {
  padding: 2rem 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-grid p {
  font-size: 0.82rem;
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    order: -1;
  }
}

@media (max-width: 760px) {
  .ranking-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .post-form {
    grid-template-columns: 1fr;
  }

  .post-field--wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
