/* NEXT Auto Auctions website. Colors come only from brand.css (--next-* variables). Mobile first. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--next-font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--next-charcoal);
  background: var(--next-white);
}
img { max-width: 100%; height: auto; }
a { color: var(--next-sky-deep); text-underline-offset: 2px; }
a:hover { color: var(--next-charcoal-900); }
h1, h2, h3 { font-family: var(--next-font-display); font-weight: 800; line-height: 1.2; color: var(--next-charcoal-900); }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
:focus-visible { outline: 3px solid var(--next-sky-deep); outline-offset: 2px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--next-charcoal); color: var(--next-white); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }
.fine { font-size: .9rem; color: var(--next-charcoal); opacity: .85; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .7rem 1.3rem; border-radius: 8px; border: 2px solid transparent;
  font-family: var(--next-font-display); font-weight: 800; font-size: 1rem; text-decoration: none;
  cursor: pointer; transition: transform .1s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--next-sky); color: var(--next-charcoal-900); }
.btn-primary:hover { background: var(--next-sky); color: var(--next-charcoal-900); filter: brightness(1.06); }
.btn-secondary { background: var(--next-charcoal); color: var(--next-white); }
.btn-secondary:hover { background: var(--next-charcoal-900); color: var(--next-white); }
.btn-ghost { background: transparent; color: var(--next-white); border-color: var(--next-white); }
.btn-ghost:hover { background: var(--next-white); color: var(--next-charcoal-900); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Language banner */
.lang-banner {
  display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: .5rem 1rem; background: var(--next-charcoal-900); color: var(--next-white); font-size: .95rem;
}
.lang-banner[hidden] { display: none; }
.lang-banner a { color: var(--next-sky); font-weight: 600; }
.lang-banner-close { background: none; border: 0; color: var(--next-white); font-size: 1.3rem; cursor: pointer; line-height: 1; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--next-white); border-bottom: 1px solid var(--next-gray-300); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand img { display: block; width: 140px; height: auto; }
.nav-toggle > summary {
  list-style: none; cursor: pointer; font-family: var(--next-font-display); font-weight: 800;
  padding: .6rem 1rem; border: 2px solid var(--next-charcoal); border-radius: 8px; min-height: 44px;
}
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.25rem 1.25rem;
  background: var(--next-white); border-bottom: 1px solid var(--next-gray-300);
}
.nav a { padding: .65rem .25rem; color: var(--next-charcoal-900); text-decoration: none; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--next-sky-deep); }
.nav .nav-cta { margin-top: .5rem; color: var(--next-charcoal-900); }
.lang-switch { border-top: 1px solid var(--next-gray-300); }

@media (min-width: 900px) {
  .brand img { width: 157px; }
  .nav-toggle > summary { display: none; }
  .nav { position: static; flex-direction: row; align-items: center; gap: 1.1rem; padding: 0; border: 0; background: none; }
  .nav a { padding: .3rem 0; }
  .nav .nav-cta { margin: 0 0 0 .5rem; padding: .55rem 1rem; min-height: 44px; }
  .lang-switch { border: 0; padding-left: 1rem !important; border-left: 1px solid var(--next-gray-300) !important; }
}

/* Hero */
.hero { background: var(--next-charcoal-900); color: var(--next-white); padding: 3rem 0 3.25rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--next-arrow-gradient); }
.hero h1 { color: var(--next-white); max-width: 18ch; }
.kicker { font-family: var(--next-font-display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 1rem; color: var(--next-sky); margin: 0 0 .75rem; }
.lead { font-size: 1.15rem; max-width: 60ch; }
.hero .lead { color: var(--next-gray-100); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.page-head { background: var(--next-gray-100); padding: 2.25rem 0 1.75rem; border-bottom: 4px solid transparent; border-image: var(--next-arrow-gradient) 1; }

/* Sections */
.section { padding: 2.75rem 0; }
.section.alt { background: var(--next-gray-100); }
.band { background: var(--next-charcoal); color: var(--next-white); }
.band h2 { color: var(--next-white); }
.band-row { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.cards-3, .two-col, .visit, .footer-grid, .grid-2 { display: grid; gap: 1.25rem; }
.card { background: var(--next-white); border: 1px solid var(--next-gray-300); border-radius: 12px; padding: 1.25rem 1.4rem; }
a.vehicle-card { color: var(--next-charcoal); text-decoration: none; display: block; }
a.vehicle-card h2, a.vehicle-card h3 { color: var(--next-charcoal-900); }
a.vehicle-card:hover { border-color: var(--next-charcoal); }
.vehicle-place, .pickup-place { font-family: var(--next-font-display); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--next-sky-deep); margin: 0 0 .4rem; }
.pickup-place { font-size: 1rem; }
.vehicle-go { font-weight: 600; color: var(--next-sky-deep); margin-bottom: 0; }
.spec-list { margin: 0 0 1.5rem; }
.spec-list div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--next-gray-300); }
.spec-list dt { margin: 0; font-weight: 600; }
.spec-list dd { margin: 0; }
.vehicle-layout .calc { position: static; }
.section.alt .card { border-color: transparent; }

@media (min-width: 720px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .visit, .grid-2 { grid-template-columns: 1fr 1fr; }
  .band-row { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; }
  .vehicle-layout { grid-template-columns: .9fr 1.1fr; }
  .vehicle-layout .calc { position: sticky; top: 5.5rem; }
}

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1rem 1rem 3.75rem; border: 1px solid var(--next-gray-300); border-radius: 12px; }
.steps li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--next-sky); color: var(--next-charcoal-900);
  font-family: var(--next-font-display); font-weight: 800;
}
.steps p { margin: 0; }
@media (min-width: 720px) { .steps:not(.steps-long) { grid-template-columns: repeat(3, 1fr); } }

/* Auctions */
.auction-list { display: grid; gap: 1rem; }
.auction { border: 1px solid var(--next-gray-300); border-left: 6px solid var(--next-sky); border-radius: 12px; padding: 1.25rem; }
.auction-type { font-weight: 600; margin: 0; }
.empty-state { border: 2px dashed var(--next-gray-300); border-radius: 12px; padding: 1.5rem; max-width: 640px; }
.empty-state[hidden] { display: none; }

/* Notices */
.notice { background: var(--next-gray-100); border-left: 6px solid var(--next-sky-deep); border-radius: 8px; padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.notice[hidden] { display: none; }
.notice.warn { border-left-color: var(--next-charcoal-900); }
.notice h2 { font-size: 1.2rem; }
.bid-ack { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; padding: 1rem; background: rgba(31, 31, 31, .55); }
.bid-ack[hidden] { display: none; }
.bid-ack-card { width: min(36rem, 100%); max-height: min(90vh, 40rem); overflow: auto; background: var(--next-white); color: var(--next-charcoal); border-radius: 12px; border-top: 6px solid var(--next-charcoal-900); padding: 1.25rem; }
.bid-ack-card h2 { font-size: 1.35rem; }
.bid-ack-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .5rem; }
.btn:disabled,
.btn[aria-disabled="true"],
.btn[aria-disabled="true"]:hover { opacity: .45; cursor: not-allowed; filter: none; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 1.75rem; position: relative; margin-bottom: .5rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--next-sky-deep); }

/* Forms */
.lead-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .3rem; }
label { font-weight: 600; }
input, select, textarea {
  font: inherit; color: var(--next-charcoal-900); background: var(--next-white);
  width: 100%; min-height: 48px; padding: .6rem .8rem; border: 2px solid var(--next-gray-300); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { border-color: var(--next-sky-deep); outline: none; }
.consent { border: 1px solid var(--next-gray-300); border-radius: 8px; padding: .75rem 1rem 1rem; margin: 0; display: grid; gap: .9rem; }
.consent legend { font-weight: 600; padding: 0 .3rem; }
.check { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; font-weight: 400; font-size: .92rem; }
.check input { width: 1.4rem; height: 1.4rem; min-height: 0; margin-top: .15rem; accent-color: var(--next-sky-deep); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 600; margin: 0; padding: .75rem 1rem; border-radius: 8px; background: var(--next-gray-100); }
.form-status.error { border-left: 6px solid var(--next-charcoal-900); }
.lead-form.done .field, .lead-form.done .consent, .lead-form.done button, .lead-form.done .fine { display: none; }

/* Fees */
.calc label { display: block; margin-bottom: .3rem; }
.money-input { display: flex; align-items: center; border: 2px solid var(--next-gray-300); border-radius: 8px; padding-left: .8rem; }
.money-input:focus-within { border-color: var(--next-sky-deep); }
.money-input input { border: 0; font-size: 1.4rem; font-weight: 600; }
.calc-lines { margin: 1rem 0; }
.calc-lines div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--next-gray-300); }
.calc-lines dd { margin: 0; font-weight: 600; white-space: nowrap; }
.calc-lines .total { border-bottom: 0; border-top: 3px solid var(--next-charcoal-900); margin-top: .25rem; font-size: 1.2rem; }
.vehicle-layout .calc-lines .total { border-top: 0; border-bottom: 3px solid var(--next-charcoal-900); margin-top: 0; margin-bottom: .25rem; font-size: 1.35rem; }
.calc-lines .total dt, .calc-lines .total dd { font-weight: 800; }
.fee-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.fee-table th, .fee-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--next-gray-300); }
.fee-table th { font-family: var(--next-font-display); }
.fee-table td:last-child, .fee-table th:last-child { text-align: right; font-weight: 600; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--next-gray-300); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .6rem 0 0; }

/* Visit */
.visit h3 { margin-top: 0; }
.phone { font-size: 1.3rem; font-weight: 800; color: var(--next-sky-deep); }

/* Legal pages */
.legal h2 { font-size: 1.15rem; margin-top: 1.75rem; }
.legal p, .legal li { font-size: .98rem; }

/* Footer */
.site-footer { background: var(--next-charcoal-900); color: var(--next-gray-100); padding: 2.5rem 0 1.5rem; margin-top: 2rem; }
.site-footer a { color: var(--next-sky); }
.site-footer a:hover { color: var(--next-white); }
.footer-h { font-size: 1rem; color: var(--next-white); margin-bottom: .5rem; }
.footer-legal { font-size: .9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-bottom { border-top: 1px solid var(--next-charcoal); margin-top: 1.5rem; padding-top: 1rem; font-size: .85rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Questions assistant */
.chat {
  position: fixed; z-index: 40;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
}
.chat-launch { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.chat-open { box-shadow: 0 8px 24px rgba(53, 53, 53, .25); }
.chat-open[aria-expanded="true"] { outline: 3px solid var(--next-sky-deep); outline-offset: 2px; }
.chat-panel {
  position: absolute; right: 0; bottom: calc(100% + .6rem);
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(100vh - 6rem));
  display: flex; flex-direction: column;
  background: var(--next-white); color: var(--next-charcoal);
  border: 2px solid var(--next-charcoal); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(53, 53, 53, .2); overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .35rem .35rem .35rem 1rem; background: var(--next-charcoal); color: var(--next-white);
}
.chat-head h2 { margin: 0; color: var(--next-white); font-size: 1.05rem; }
.chat-close {
  background: none; border: 0; color: var(--next-white); font-size: 1.5rem; line-height: 1;
  cursor: pointer; min-width: 44px; min-height: 44px;
}
.chat-intro { margin: 0; padding: .75rem 1rem 0; font-size: .9rem; }
.chat-log { display: flex; flex-direction: column; gap: .5rem; padding: .75rem 1rem; overflow: auto; min-height: 2.5rem; }
.chat-user, .chat-assistant { margin: 0; padding: .55rem .75rem; border-radius: 8px; max-width: 95%; white-space: pre-wrap; }
.chat-user { align-self: flex-end; background: var(--next-charcoal); color: var(--next-white); }
.chat-assistant { align-self: flex-start; background: var(--next-gray-100); color: var(--next-charcoal); }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .5rem; }
.chat-suggestions[hidden] { display: none; }
.chat-suggest {
  background: var(--next-white); color: var(--next-charcoal); border: 1px solid var(--next-gray-300);
  border-radius: 999px; padding: .4rem .75rem; cursor: pointer; font: inherit; font-size: .85rem;
}
.chat-form { display: flex; gap: .5rem; padding: .75rem 1rem 1rem; border-top: 1px solid var(--next-gray-300); }
.chat-form input {
  flex: 1; min-width: 0; border: 2px solid var(--next-gray-300); border-radius: 8px;
  padding: .6rem .7rem; font: inherit; color: var(--next-charcoal); background: var(--next-white);
}
.chat-form input:focus { border-color: var(--next-sky-deep); outline: none; }
.chat-form .btn { min-height: 44px; padding-inline: 1rem; }
