/* AutoValue — light business theme */
:root {
  --bg: #f0f3f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #e8edf4;
  --border: #d8dee8;
  --text: #1a2332;
  --text-muted: #5c6b7f;
  --accent: #1a56b0;
  --accent-dim: rgba(26, 86, 176, 0.1);
  --accent-hover: #154a96;
  --success: #0d8f6e;
  --error: #c53030;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(26, 35, 50, 0.08);
  --shadow-md: 0 12px 40px rgba(26, 35, 50, 0.1);
  --font-display: "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--bg) 28%,
    var(--bg) 100%
  );
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

main {
  flex: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 35, 50, 0.04);
}

.site-header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo_mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #0d3d82);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.25s ease,
      opacity 0.25s ease,
      visibility 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    padding: 0.85rem 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 86, 176, 0.35);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(26, 86, 176, 0.4);
  color: white;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg-subtle);
  border-color: #c5ced9;
}

.btn--light {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 12px rgba(26, 35, 50, 0.12);
}

.btn--light:hover {
  background: #f4f7fb;
  color: var(--accent-hover);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section--tight {
  padding-top: 2rem;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero__lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 34ch;
  margin: 0 0 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__visual {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(26, 35, 50, 0.08);
}

.hero__badge strong {
  color: var(--text);
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

.feature-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 2rem;
  max-width: 38ch;
  font-size: 1.02rem;
  line-height: 1.5;
}

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

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.steps__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.04);
}

.steps__num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
}

.steps__item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.steps__item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cta-strip {
  margin: 2.5rem 0 0;
  padding: 2.25rem 1.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, #0d3d82 100%);
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cta-strip p {
  margin: 0 auto 1.15rem;
  font-size: 1.08rem;
  font-weight: 500;
  max-width: 32ch;
}

.feature-card:hover {
  border-color: rgba(26, 86, 176, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--accent);
}

.feature-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Page title */
.page-head {
  padding: 2.5rem 0 1rem;
  max-width: 640px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 0;
  color: var(--text-muted);
}

/* Form layout */
.estimator {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 4rem;
}

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

.form-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.form-panel h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.form-panel__hint {
  font-size: 0.9rem;
  /* color: var(--text-muted); */
  color: red;
  margin: 0 0 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem 1.25rem;
}

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

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

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.field input,
.field select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Combobox (brand / model typeahead) */
.combo {
  position: relative;
}

.combo__list {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  margin: 4px 0 0;
  padding: 0.35rem 0;
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.combo__list li[role="option"] {
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.35;
}

.combo__list li[role="option"]:hover,
.combo__list li[role="option"].combo__option--active {
  background: var(--accent-dim);
  color: var(--text);
}

.combo__empty {
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: default;
}

.catalog-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.field input:hover,
.field select:hover {
  border-color: #b8c4d4;
}

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

.field input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.field--error input,
.field--error select {
  border-color: var(--error);
}

.field__error {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 1.1em;
}

.side-panel {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-card {
  background: linear-gradient(165deg, #f8fafc 0%, #eef3f9 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.result-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-card__price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card__note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.45;
}

.result-card.is-loading .result-card__price {
  opacity: 0.5;
}

.api-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  line-height: 1.5;
}

.api-hint code {
  font-size: 0.75rem;
  color: var(--accent);
  word-break: break-all;
}

.api-hint a {
  color: var(--accent);
  font-weight: 600;
}

.api-hint a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: min(360px, calc(100vw - 2rem));
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  z-index: 100;
  transform: translateY(120%);
  opacity: 0;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast--success {
  border-left: 4px solid var(--success);
}

/* About */
.prose {
  max-width: 65ch;
  color: var(--text-muted);
}

.prose h2 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose--tight h2 {
  margin-top: 0;
}

.prose code {
  font-size: 0.88em;
  color: var(--accent);
  word-break: break-word;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  /* padding: 2rem 0; */
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  /* color: var(--accent); */
  color: black;
}
