/*
Theme Name: Autolink Leasing
Theme URI: https://autolink.example.com
Author: Autolink
Author URI: https://autolink.example.com
Description: Custom WordPress theme for Autolink, an auto leasing company. Includes a lease vehicle inventory (custom post type), a client-side lease payment calculator, a financing/credit application form, and standard informational pages. Colors are controlled via CSS custom properties at the top of this file for easy re-theming.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: autolink
*/

/* =========================================================
   1. BRAND VARIABLES — change these to re-theme the site
   ========================================================= */
:root {
  --al-navy: #0b1f3a;
  --al-navy-light: #16305a;
  --al-blue: #1b4b8f;
  --al-blue-light: #e8f0fb;
  --al-orange: #ff6b2c;
  --al-orange-dark: #e2551a;
  --al-white: #ffffff;
  --al-gray-50: #f6f8fb;
  --al-gray-100: #eef1f6;
  --al-gray-200: #dde2eb;
  --al-gray-400: #98a3b3;
  --al-gray-600: #5b6674;
  --al-gray-800: #2a3140;
  --al-text: #1c2330;
  --al-success: #1f8a4c;
  --al-error: #c0392b;

  --al-font-heading: "Poppins", "Segoe UI", Arial, sans-serif;
  --al-font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --al-radius: 10px;
  --al-radius-sm: 6px;
  --al-shadow: 0 4px 18px rgba(11, 31, 58, 0.08);
  --al-shadow-lg: 0 12px 32px rgba(11, 31, 58, 0.14);
  --al-container: 1180px;
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--al-font-body);
  color: var(--al-text);
  background: var(--al-white);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--al-blue); text-decoration: none; }
a:hover { color: var(--al-orange); }
h1, h2, h3, h4, h5 {
  font-family: var(--al-font-heading);
  color: var(--al-navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

.container {
  max-width: var(--al-container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--gray { background: var(--al-gray-50); }
.section--navy { background: var(--al-navy); color: var(--al-white); }
.section--navy h2, .section--navy h3 { color: var(--al-white); }
.section-heading { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-heading .eyebrow {
  display: inline-block; color: var(--al-orange); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; font-size: .8rem;
  margin-bottom: 10px;
}

/* =========================================================
   3. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 28px; border-radius: 999px; font-weight: 600;
  font-family: var(--al-font-heading); border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  font-size: .95rem;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--al-orange); color: var(--al-white); }
.btn-primary:hover { background: var(--al-orange-dark); color: var(--al-white); }
.btn-secondary { background: var(--al-white); color: var(--al-navy); border-color: var(--al-gray-200); }
.btn-secondary:hover { border-color: var(--al-navy); color: var(--al-navy); }
.btn-outline-light { background: transparent; color: var(--al-white); border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { border-color: var(--al-white); color: var(--al-white); }
.btn-block { width: 100%; }

/* =========================================================
   4. SITE HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--al-white);
  border-bottom: 1px solid var(--al-gray-100);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: var(--al-container); margin: 0 auto;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding img { max-height: 44px; }
.site-title {
  font-family: var(--al-font-heading); font-weight: 700; font-size: 1.4rem;
  color: var(--al-navy); margin: 0;
}
.site-title a { color: inherit; }
.site-title span { color: var(--al-orange); }

.primary-nav ul {
  list-style: none; display: flex; gap: 28px; margin: 0; padding: 0;
}
.primary-nav a {
  color: var(--al-navy); font-weight: 600; font-size: .95rem;
}
.primary-nav a:hover { color: var(--al-orange); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone { font-weight: 700; color: var(--al-navy); white-space: nowrap; }
.header-phone a { color: inherit; }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.menu-toggle span { width: 26px; height: 3px; background: var(--al-navy); border-radius: 2px; }

@media (max-width: 880px) {
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--al-white);
    box-shadow: var(--al-shadow); display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav li { border-top: 1px solid var(--al-gray-100); }
  .primary-nav a { display: block; padding: 14px 24px; }
  .menu-toggle { display: flex; }
  .header-phone { display: none; }
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero {
  background: linear-gradient(135deg, var(--al-navy) 0%, var(--al-navy-light) 60%, var(--al-blue) 100%);
  color: var(--al-white); padding: 96px 0;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: var(--al-white); }
.hero .lede { font-size: 1.15rem; color: var(--al-gray-100); max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; font-family: var(--al-font-heading); color: var(--al-orange); }
.hero-stats div span { font-size: .85rem; color: var(--al-gray-200); }
.hero-panel {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--al-radius); padding: 28px; backdrop-filter: blur(4px);
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 56px 0; } }

/* =========================================================
   6. CARDS / GRIDS
   ========================================================= */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--al-white); border: 1px solid var(--al-gray-100); border-radius: var(--al-radius);
  padding: 28px; box-shadow: var(--al-shadow);
}
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--al-blue-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  margin-bottom: 16px; color: var(--al-blue);
}

/* Vehicle / inventory cards */
.vehicle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .vehicle-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .vehicle-grid { grid-template-columns: 1fr; } }

.vehicle-card {
  background: var(--al-white); border-radius: var(--al-radius); overflow: hidden;
  border: 1px solid var(--al-gray-100); box-shadow: var(--al-shadow);
  display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease;
}
.vehicle-card:hover { box-shadow: var(--al-shadow-lg); transform: translateY(-3px); }
.vehicle-card__media { position: relative; aspect-ratio: 4/3; background: var(--al-gray-100); overflow: hidden; }
.vehicle-card__media img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-card__badge {
  position: absolute; top: 12px; left: 12px; background: var(--al-orange); color: var(--al-white);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 999px;
}
.vehicle-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.vehicle-card__title { font-size: 1.05rem; margin-bottom: 4px; }
.vehicle-card__meta { color: var(--al-gray-600); font-size: .85rem; margin-bottom: 14px; }
.vehicle-card__price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.vehicle-card__price strong { font-size: 1.5rem; font-family: var(--al-font-heading); color: var(--al-navy); }
.vehicle-card__price span { color: var(--al-gray-600); font-size: .85rem; }
.vehicle-card__specs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: .82rem; color: var(--al-gray-600); }
.vehicle-card__specs li strong { color: var(--al-text); }
.vehicle-card__actions { margin-top: auto; display: flex; gap: 10px; }
.vehicle-card__actions .btn { flex: 1; padding: 10px 16px; font-size: .85rem; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: end;
  background: var(--al-white); border: 1px solid var(--al-gray-100); border-radius: var(--al-radius);
  padding: 20px; box-shadow: var(--al-shadow); margin-bottom: 36px;
}
.filter-bar label { display: block; font-size: .78rem; font-weight: 700; color: var(--al-gray-600); text-transform: uppercase; margin-bottom: 6px; }
.filter-bar select, .filter-bar input {
  padding: 10px 12px; border-radius: var(--al-radius-sm); border: 1px solid var(--al-gray-200); min-width: 160px;
}
.no-results { text-align: center; padding: 48px 20px; color: var(--al-gray-600); }

/* =========================================================
   7. FORMS
   ========================================================= */
.al-form { background: var(--al-white); border: 1px solid var(--al-gray-100); border-radius: var(--al-radius); padding: 32px; box-shadow: var(--al-shadow); }
.al-form fieldset { border: none; padding: 0; margin: 0 0 24px; }
.al-form legend { font-family: var(--al-font-heading); font-weight: 700; color: var(--al-navy); padding: 0 0 12px; font-size: 1.1rem; border-bottom: 2px solid var(--al-gray-100); width: 100%; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-row.single { grid-template-columns: 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--al-navy); }
.form-field .required { color: var(--al-orange); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--al-gray-200); border-radius: var(--al-radius-sm);
  font-family: var(--al-font-body); font-size: .95rem; background: var(--al-white); color: var(--al-text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--al-blue); box-shadow: 0 0 0 3px var(--al-blue-light);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--al-gray-600); margin-bottom: 20px; }
.form-consent input { width: auto; margin-top: 3px; }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-notice { padding: 14px 18px; border-radius: var(--al-radius-sm); margin-bottom: 20px; font-weight: 600; }
.form-notice--success { background: #e9f8ee; color: var(--al-success); border: 1px solid #bfe9cc; }
.form-notice--error { background: #fdecea; color: var(--al-error); border: 1px solid #f3c2bc; }

/* =========================================================
   8. LEASE CALCULATOR
   ========================================================= */
.calculator {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
@media (max-width: 900px) { .calculator { grid-template-columns: 1fr; } }
.calc-inputs, .calc-result { background: var(--al-white); border: 1px solid var(--al-gray-100); border-radius: var(--al-radius); padding: 32px; box-shadow: var(--al-shadow); }
.calc-inputs .form-field { margin-bottom: 18px; }
.calc-range-value { font-weight: 700; color: var(--al-orange); }
.calc-result { background: var(--al-navy); color: var(--al-white); position: sticky; top: 100px; }
.calc-result h3 { color: var(--al-white); }
.calc-monthly { font-family: var(--al-font-heading); font-size: 3rem; color: var(--al-orange); margin: 10px 0; }
.calc-breakdown { list-style: none; padding: 0; margin: 20px 0 0; }
.calc-breakdown li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .92rem; }
.calc-breakdown li:last-child { border-bottom: none; }
.calc-disclaimer { font-size: .78rem; color: var(--al-gray-200); margin-top: 20px; }

/* =========================================================
   9. FAQ ACCORDION
   ========================================================= */
.accordion { max-width: 820px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid var(--al-gray-200); }
.accordion-trigger {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 4px; font-family: var(--al-font-heading); font-weight: 600; font-size: 1.05rem;
  color: var(--al-navy);
}
.accordion-trigger .plus { font-size: 1.4rem; color: var(--al-orange); transition: transform .2s ease; flex-shrink: 0; }
.accordion-trigger[aria-expanded="true"] .plus { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.accordion-panel-inner { padding: 0 4px 20px; color: var(--al-gray-600); }

/* =========================================================
   10. TESTIMONIALS / MISC
   ========================================================= */
.testimonial-card { background: var(--al-white); border-radius: var(--al-radius); padding: 28px; box-shadow: var(--al-shadow); border: 1px solid var(--al-gray-100); }
.testimonial-card .stars { color: var(--al-orange); margin-bottom: 12px; }
.testimonial-card .author { margin-top: 16px; font-weight: 700; color: var(--al-navy); font-size: .9rem; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 44px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--al-orange); color: var(--al-white); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--al-font-heading);
}

.cta-banner {
  background: linear-gradient(120deg, var(--al-orange), var(--al-orange-dark));
  color: var(--al-white); border-radius: var(--al-radius); padding: 48px; text-align: center;
}
.cta-banner h2 { color: var(--al-white); }
.cta-banner .btn-secondary { background: var(--al-white); color: var(--al-orange-dark); }

/* =========================================================
   11. PAGE HEADER (interior pages)
   ========================================================= */
.page-header { background: var(--al-navy); color: var(--al-white); padding: 56px 0; text-align: center; }
.page-header h1 { color: var(--al-white); margin-bottom: 8px; }
.breadcrumbs { color: var(--al-gray-200); font-size: .85rem; }
.breadcrumbs a { color: var(--al-gray-200); }
.breadcrumbs a:hover { color: var(--al-orange); }

.entry-content { max-width: 820px; margin: 0 auto; }
.entry-content h2 { margin-top: 1.4em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

.contact-details { list-style: none; padding: 0; margin: 0 0 24px; }
.contact-details li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--al-gray-100); }
.contact-details li strong { color: var(--al-navy); min-width: 90px; display: inline-block; }
.map-embed { border-radius: var(--al-radius); overflow: hidden; border: 1px solid var(--al-gray-100); }
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

/* =========================================================
   12. FOOTER
   ========================================================= */
.site-footer { background: var(--al-navy); color: var(--al-gray-200); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--al-white); font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--al-gray-200); }
.footer-grid a:hover { color: var(--al-orange); }
.footer-logo { color: var(--al-white); font-family: var(--al-font-heading); font-weight: 700; font-size: 1.3rem; margin-bottom: 12px; display: block; }
.footer-logo span { color: var(--al-orange); }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; color: var(--al-white);
}
.footer-social a:hover { background: var(--al-orange); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex;
  justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--al-gray-400);
}
.footer-bottom a { color: var(--al-gray-400); }

/* =========================================================
   13. PAGINATION / UTIL
   ========================================================= */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
  padding: 10px 16px; border-radius: var(--al-radius-sm); border: 1px solid var(--al-gray-200); color: var(--al-navy);
}
.pagination .current { background: var(--al-navy); color: var(--al-white); border-color: var(--al-navy); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--al-navy); color: var(--al-white);
  padding: 12px 18px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }
