/* JS Automóveis — prototype styles
   Tailwind (CDN) handles utility classes; this file covers the things
   Tailwind utilities can't express cleanly: browser surfaces, custom
   components (step nodes, dropzone, FAQ disclosure) and small animations. */

:root {
  --navy: #0B1B33;
  --electric: #1E5CFF;
  --electric-bright: #3B7BFF;
}

html {
  scroll-behavior: smooth;
}

/* ---------- Browser surfaces: theme what we didn't draw ---------- */
::selection {
  background: var(--electric);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #F4F6FA;
}
::-webkit-scrollbar-thumb {
  background: #C7D0E0;
  border-radius: 999px;
  border: 2px solid #F4F6FA;
}

:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #fff;
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  font-size: 0.875rem;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Hero blueprint grid backdrop ---------- */
.hero-grid {
  background-image:
    linear-gradient(to right, #F4F6FA 1px, transparent 1px),
    linear-gradient(to bottom, #F4F6FA 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- Como funciona: step nodes ---------- */
.step-node {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

/* ---------- Benefícios cards ---------- */
.benefit-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
}

/* ---------- Vehicle type chips ---------- */
.vehicle-chip {
  background: #fff;
  border: 1px solid #E2E6EE;
  border-radius: 12px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(11, 27, 51, 0.06);
}

/* ---------- Form fields ---------- */
.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.375rem;
}
.field-input {
  width: 100%;
  border: 1.5px solid #E2E6EE;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: #15171C;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(30, 92, 255, 0.15);
}
.field-input.is-invalid {
  border-color: #C0392B;
}
.field-error {
  display: none;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #C0392B;
}
.field-error.is-visible {
  display: block;
}

/* ---------- Photo upload dropzone ---------- */
.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px dashed #E2E6EE;
  border-radius: 12px;
  padding: 2rem 1rem;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  border-color: var(--electric);
  background: rgba(30, 92, 255, 0.04);
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #E2E6EE;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: rgba(11, 27, 51, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.875rem;
}

/* ---------- Deal / inventory cards (placeholders) ---------- */
.deal-card {
  background: #fff;
  border: 1px solid #E2E6EE;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(11, 27, 51, 0.06);
}
.deal-thumb {
  aspect-ratio: 4/3;
  border-radius: 8px;
  background: #F4F6FA;
  border: 1px solid #E2E6EE;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deal-thumb::before {
  content: "";
  width: 28px;
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6472' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7l1.8-3h4.4L16 7'/%3E%3Ccircle cx='12' cy='13.5' r='3.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  opacity: 0.5;
}
.deal-thumb::after {
  content: "Imagem ilustrativa";
  position: absolute;
  inset: auto 8px 8px auto;
  font-size: 0.6875rem;
  color: #5B6472;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
}
.deal-tag {
  display: inline-block;
  margin-top: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.1875rem 0.5rem;
  border-radius: 9999px;
}
.deal-tag--bought {
  background: rgba(30, 143, 92, 0.12);
  color: #1E8F5C;
}
.deal-tag--sold {
  background: rgba(30, 92, 255, 0.12);
  color: #1E5CFF;
}

/* ---------- Social section ---------- */
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid #E2E6EE;
  background: #fff;
  border-radius: 10px;
  padding: 0.5rem 1rem;
}
.social-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #F4F6FA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6472' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7l1.8-3h4.4L16 7'/%3E%3Ccircle cx='12' cy='13.5' r='3.3'/%3E%3C/svg%3E") center/28px no-repeat;
  opacity: 0.9;
  border: 1px solid #E2E6EE;
}

/* ---------- FAQ disclosure ---------- */
.faq-item {
  padding: 1.25rem 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-left: 1rem;
  border-right: 2px solid #5B6472;
  border-bottom: 2px solid #5B6472;
  transform: rotate(45deg);
  transition: transform 200ms ease;
}
.faq-item[open] summary::after {
  transform: rotate(-135deg);
}
.faq-item p {
  margin-top: 0.75rem;
  color: #5B6472;
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 60ch;
}

/* ---------- Mobile sticky CTA: respect device safe area ---------- */
.safe-bottom {
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
