/* Shared design tokens and layout for every page in website/. Same navy/
   off-white palette as the desktop app's own auth pages
   (src/dashboard/server.ts's AUTH_ROOT_TOKENS) so the site and the product
   feel like one thing - but flipped proportions: cream is the dominant
   field here, navy is a deliberate accent block, not half the screen. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --border: #e6e8ec;
  --border-strong: #d5d9df;
  --ink: #0b1524;
  --muted: #5b6573;
  --faint: #8a93a1;
  --body-ink: #3a4453;
  --navy: #1e2a5a;
  --navy-deep: #141d42;
  --navy-accent: #93b4ff;
  --brand: #3453b4;
  --brand-hover: #2a4494;
  --ring: rgba(52, 83, 180, 0.3);
  --shadow-sm:
    0 1px 2px rgba(11, 21, 36, 0.06), 0 1px 3px rgba(11, 21, 36, 0.08);
  --shadow-md:
    0 4px 12px rgba(11, 21, 36, 0.08), 0 2px 4px rgba(11, 21, 36, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Source Sans 3",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.wrap.wrap-wide {
  max-width: 1200px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 20px;
  }
}

/* ---------- Nav ---------- */

.nav {
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav-word {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-word svg {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--ink);
}

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

/* ---------- Buttons ---------- */

.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: var(--radius-sm);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition:
    background 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    transform 0.1s var(--ease);
}

.btn {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-primary:active,
.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.btn:disabled,
.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.btn-lg {
  padding: 17px 34px;
  font-size: 1.0625rem;
}

/* ---------- Photo band (the one real dealership-world photo) ---------- */

.photo-section {
  padding: 0;
  margin-top: -40px; /* pulls the band up into the hero's own bottom padding */
  position: relative;
}

.photo-band {
  position: relative;
  overflow: hidden;
  max-height: 400px;
}

.photo-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(11, 21, 36, 0) 35%,
    rgba(11, 21, 36, 0.75) 100%
  );
}

.photo-band-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding-bottom: 28px;
}

.photo-band-caption p {
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.375rem;
}

@media (max-width: 900px) {
  .photo-section {
    margin-top: -24px;
  }
}

@media (max-width: 780px) {
  .photo-section {
    margin-top: 0;
  }
  .photo-band {
    max-height: 240px;
  }
  .photo-band-caption p {
    font-size: 1.125rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: rgba(52, 83, 180, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3.25rem;
  line-height: 1.08;
}

.hero-sub {
  margin: 24px 0 0;
  font-size: 1.1875rem;
  color: var(--body-ink);
  line-height: 1.6;
  max-width: 480px;
}

.hero-aside {
  margin-top: 20px;
  font-size: 1rem;
  color: var(--body-ink);
  max-width: 480px;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-foot {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--faint);
}

.hero-shot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: var(--surface);
}

.hero-shot img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .hero {
    padding: 56px 0 48px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero h1 {
    font-size: 2.375rem;
  }
}

/* ---------- Section scaffolding ---------- */

section {
  padding: 72px 0;
}

#how-it-works {
  padding-top: 48px;
}

.section-values {
  padding-top: 48px;
}

@media (max-width: 900px) {
  section {
    padding: 56px 0;
  }
}

.section-head {
  max-width: 620px;
  margin: 0 0 48px;
}

.section-head h2 {
  font-size: 2.25rem;
  line-height: 1.15;
}

.section-head p {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--body-ink);
  line-height: 1.6;
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- How it works: card grid ---------- */

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

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-num {
  font-family: "Fraunces", serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.1875rem;
  margin-bottom: 10px;
}

.step-card p {
  color: var(--body-ink);
  font-size: 0.9375rem;
  line-height: 1.6;
}

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

/* ---------- Value props ---------- */

.values {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.value-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.value-icon {
  width: 40px;
  height: 40px;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 2px; /* optical alignment with heading cap-height */
}

.values h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.values p {
  color: var(--body-ink);
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (max-width: 780px) {
  .value-row {
    gap: 16px;
  }
}

/* ---------- Trust (navy) section ---------- */

.section-trust {
  padding: 0;
}

.trust {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 88px 0;
}

.trust .section-head h2,
.trust .section-head p {
  color: #fff;
}

.trust .section-head p {
  color: rgba(255, 255, 255, 0.82);
}

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

.trust-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.trust-list svg {
  width: 22px;
  height: 22px;
  color: var(--navy-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-list span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9375rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .trust {
    padding: 56px 0;
  }
  .trust-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ---------- Pricing ---------- */

.pricing-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 48px 44px;
  text-align: center;
}

.pricing-plan {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.pricing-amount {
  font-family: "Fraunces", serif;
  font-size: 3.25rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}

.pricing-amount span {
  font-family: "Source Sans 3", sans-serif;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--muted);
}

.pricing-tag {
  margin: 16px 0 20px;
  color: var(--body-ink);
  font-size: 1rem;
}

.pricing-anchor {
  margin: 0 0 28px;
  color: var(--body-ink);
  font-size: 0.875rem;
  line-height: 1.6;
}

.pricing-card .btn-primary {
  width: 100%;
}

.pricing-note {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--faint);
  line-height: 1.5;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 720px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  font-family: "Source Sans 3", sans-serif;
  margin-bottom: 10px;
}

.faq-item p {
  color: var(--body-ink);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.faq-item code {
  background: rgba(52, 83, 180, 0.08);
  color: var(--brand-hover);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.875em;
}

/* ---------- Closing CTA ---------- */

.section-closing {
  padding: 0;
}

.closing-cta {
  background: linear-gradient(180deg, #eef1f9 0%, #e2e8f7 100%);
  padding: 88px 0;
  text-align: center;
}

.closing-cta .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 560px;
}

.closing-cta p {
  color: var(--body-ink);
  font-size: 1.0625rem;
}

@media (max-width: 900px) {
  .closing-cta {
    padding: 56px 0;
  }
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--faint);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--faint);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--muted);
}

/* ---------- Simple content pages (terms/privacy/success) ---------- */

.page-hero {
  padding: 64px 0 24px;
}

.page-hero h1 {
  font-size: 2.5rem;
}

.page-hero p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.prose {
  max-width: 680px;
  padding-bottom: 96px;
}

.prose h2 {
  font-size: 1.375rem;
  margin: 40px 0 14px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--body-ink);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.prose p + p {
  margin-top: 14px;
}

.prose ul {
  margin: 14px 0 0;
  padding-left: 22px;
}

.prose li + li {
  margin-top: 8px;
}

/* ---------- Success/download page ---------- */

.success-card {
  max-width: 480px;
  margin: 40px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 44px 40px;
  text-align: center;
}

.success-card h1 {
  font-size: 1.625rem;
  margin-bottom: 12px;
}

.success-card .body-copy {
  color: var(--body-ink);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.success-card .btn,
.success-card .btn-primary {
  width: 100%;
}

.success-card .eyebrow {
  display: block;
  text-align: left;
}

.next-steps {
  margin: 16px 0 0;
  padding-left: 22px;
  color: var(--body-ink);
  font-size: 0.9375rem;
  line-height: 1.6;
  text-align: left;
}

.next-steps li + li {
  margin-top: 14px;
}

.spinner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--body-ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

.subscribed-as {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.subscribed-as strong {
  color: var(--ink);
}

.g-signin-box {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.error-box {
  color: #a13a3a;
  font-size: 0.875rem;
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

/* ---------- Guides (long-form articles) ---------- */

.guide-body {
  max-width: 680px;
  padding-top: 56px;
  padding-bottom: 72px;
}

.breadcrumb-trail {
  display: block;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  color: var(--faint);
}

.breadcrumb-trail a {
  color: var(--faint);
  text-decoration: none;
}

.breadcrumb-trail a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.breadcrumb-trail span {
  color: var(--faint);
}

.guide-body h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  margin-bottom: 8px;
}

.guide-body h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-top: 40px;
  margin-bottom: 4px;
}

.guide-body h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  margin-top: 28px;
  margin-bottom: 4px;
}

.guide-body p,
.guide-body li {
  color: var(--body-ink);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.guide-body p {
  margin-top: 16px;
}

.guide-body ul,
.guide-body ol {
  margin-top: 16px;
  padding-left: 22px;
}

.guide-body li + li {
  margin-top: 10px;
}

.guide-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-body a:hover {
  color: var(--brand-hover);
}

.guide-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9375rem;
}

.guide-body th,
.guide-body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.guide-body th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-body .byline {
  margin-top: 20px;
  color: var(--body-ink);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 0.9375rem;
}

.guide-hub-intro p {
  max-width: 560px;
}

.guide-hub-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.guide-hub-list li {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.guide-hub-list li:last-child {
  border-bottom: 1px solid var(--border);
}

.guide-hub-list a {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.1875rem;
  color: var(--ink);
  text-decoration: none;
}

.guide-hub-list a:hover {
  color: var(--brand);
}

.guide-hub-list p {
  margin-top: 6px;
  color: var(--body-ink);
  font-size: 0.9375rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .guide-body h1 {
    font-size: 1.75rem;
  }
}
