/*
Theme Name: Sal's Auto Service v1
Theme URI: https://www.salsautoful.com/
Author: Rolando Cornejo
Description: Custom theme for Sal's Auto Service, 648 Williamson Ave, Fullerton, CA. Built-in local SEO, schema, llms.txt, robots.txt rules, appointment request form and auto-created pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sals
*/

:root {
  --purple: #472aac;        /* address band on the business card */
  --purple-deep: #2b1a73;
  --ink: #17132b;
  --body: #3f3b55;
  --paper: #ffffff;
  --lavender: #f2effb;
  --line: #dcd7ee;
  --decal: #d9361a;         /* window lettering red */
  --decal-bright: #ff5a36;
  --glass: #0d1526;         /* tinted front window */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--body); background: var(--paper); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: 0.18em; }
a:hover { color: var(--purple-deep); }
:focus-visible { outline: 3px solid var(--decal-bright); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, .big, .brand__name, .foot-name { font-stretch: 122%; font-weight: 700; color: var(--ink); line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
address { font-style: normal; margin: 0 0 1em; }
figure { margin: 0; }
table { border-collapse: collapse; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 800px; }
main > section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.tint { background: var(--lavender); }
.sub, .lead { font-size: 1.2rem; color: var(--body); }
.lead { max-width: 60ch; }
.fine { font-size: 0.875rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.75rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.textlink { font-weight: 600; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font: inherit; font-weight: 700; font-stretch: 112%; text-decoration: none; padding: 0.85rem 1.35rem; border-radius: 6px; border: 2px solid transparent; cursor: pointer; line-height: 1.2; text-align: center; }
.btn--call { background: var(--decal); color: #fff; }
.btn--call:hover { background: #b82a12; color: #fff; }
.btn--primary { background: var(--purple); color: #fff; }
.btn--primary:hover { background: var(--purple-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--purple); border-color: var(--purple); }
.btn--ghost:hover { background: var(--purple); color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--purple-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }

/* ---------- header ---------- */
.topbar { background: var(--ink); color: #e9e6f5; font-size: 0.9rem; }
.topbar__in { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; }
.topbar a { color: #fff; }
.site-head { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-head__in { display: flex; align-items: center; gap: 1.5rem; padding: 0.7rem 0; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; margin-right: auto; }
.brand__name { font-size: 1.3rem; margin: 0; text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink); }
.brand__tag { color: var(--purple); font-style: italic; font-weight: 600; font-size: 0.9rem; }
.brand img, .custom-logo { max-height: 56px; width: auto; }
.nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--purple); }
.nav-toggle { display: none; font: inherit; font-weight: 700; background: none; border: 2px solid var(--ink); border-radius: 6px; padding: 0.5rem 0.9rem; color: var(--ink); cursor: pointer; }
.head-call { padding: 0.65rem 1rem; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 !important; background: linear-gradient(180deg, var(--lavender), #fff 70%); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__photo { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(43, 26, 115, 0.55); }
.hero__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; }
.hero__photo figcaption { background: var(--purple); color: #fff; font-weight: 500; padding: 0.7rem 1rem; font-size: 1rem; }
.status { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 0.55rem; }
.status::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #9a96ad; flex: none; }
.status.is-open::before { background: #18a058; }
.status.is-closed::before { background: var(--decal); }

/* ---------- facts ---------- */
.facts { padding: 0 !important; border-block: 1px solid var(--line); }
.facts dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts dl > div { padding: 1.6rem 1.4rem; border-left: 1px solid var(--line); }
.facts dl > div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-weight: 700; font-stretch: 118%; color: var(--ink); font-size: 1.12rem; }
.facts dd { margin: 0.2rem 0 0; font-size: 0.98rem; }

/* ---------- symptom finder ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.chip { font: inherit; font-weight: 600; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 999px; padding: 0.6rem 1.1rem; cursor: pointer; }
.chip:hover { border-color: var(--purple); }
.chip[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.finder__out { margin-top: 1.5rem; background: var(--lavender); border-left: 5px solid var(--purple); padding: 1.4rem 1.6rem; border-radius: 0 8px 8px 0; max-width: 760px; }
.finder__out h3 { margin-bottom: 0.4em; }
.finder__out p:last-child { margin: 0; }

/* ---------- the window (signature) ---------- */
.window { background: var(--glass); color: #c9cfdd; }
.window h2 { color: #fff; max-width: 22ch; }
.window .sub { color: #c9cfdd; }
.window__panes { display: grid; grid-template-columns: 1fr 1fr; margin-top: 2.5rem; border: 6px solid #e8eaf0; border-radius: 4px; background: linear-gradient(160deg, #142544 0%, #0d1526 55%, #1a2d52 100%); }
.window__panes ul { list-style: none; margin: 0; padding: clamp(1.5rem, 4vw, 3rem); }
.window__panes ul + ul { border-left: 6px solid #e8eaf0; }
.window__panes li + li { margin-top: 0.35rem; }
.window__panes a { display: inline-block; font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(1.05rem, 2.5vw, 1.9rem); line-height: 1.2; color: var(--decal-bright); text-decoration: none; text-shadow: 0 0 1px #ffd23f, 0 0 1px #ffd23f; padding: 0.15rem 0; }
.window__panes a:hover, .window__panes a:focus-visible { color: #ffd23f; text-decoration: underline; }
.window__more { margin-top: 1.5rem; }
.window__more a { color: #fff; font-weight: 600; }

/* ---------- splits ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--top { align-items: start; }
.split--narrow { grid-template-columns: 0.8fr 1.2fr; }
.split figure img, .find__media video { border-radius: 10px; width: 100%; }

.reviews { background: var(--lavender); }
.makes__list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.makes__list li { padding: 0.9rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.makes__list--big li { font-size: 1.15rem; padding: 1.2rem; }

.warranty-band { background: var(--purple); color: #ece8fb; }
.warranty-band h2, .warranty-band .big { color: #fff; }
.warranty-band .big { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0; }
.warranty-band a { color: #fff; }

.hours { width: 100%; max-width: 380px; margin: 0 0 1rem; }
.hours caption { text-align: left; font-weight: 700; color: var(--ink); padding-bottom: 0.4rem; }
.hours th { text-align: left; font-weight: 500; padding: 0.3rem 1rem 0.3rem 0; }
.hours td { text-align: right; padding: 0.3rem 0; font-variant-numeric: tabular-nums; }
.hours tr { border-bottom: 1px solid var(--line); }
.areas { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.areas p { max-width: none; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h2, .faq summary h3 { display: inline; font-size: 1.15rem; font-stretch: 108%; letter-spacing: 0; }
.faq summary::after { content: "+"; position: absolute; right: 0.3rem; top: 0.85rem; font-size: 1.6rem; color: var(--purple); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.1rem; margin: 0; }

/* ---------- cta ---------- */
.cta-band { background: var(--ink); color: #d9d5ea; }
.cta-band__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.cta-band h2 { color: #fff; margin-bottom: 0.2em; }
.cta-band p { margin: 0; }
.cta-band .btn-row { margin: 0; }

/* ---------- inner pages ---------- */
.page-head { background: var(--lavender); padding: clamp(2rem, 5vw, 3.5rem) 0 !important; }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); max-width: 22ch; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1.2rem; font-size: 0.92rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: #8d88a6; }
.ticks { list-style: none; padding: 0; }
.ticks li { padding: 0.55rem 0 0.55rem 1.9rem; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0.2rem; top: 1rem; width: 0.85rem; height: 0.45rem; border-left: 3px solid var(--purple); border-bottom: 3px solid var(--purple); transform: rotate(-45deg); }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 0.8rem; padding-left: 0.3rem; }
.steps li::marker { font-weight: 800; color: var(--purple); }
.visit, .form-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.4rem, 3vw, 2rem); }
.form-card { border-top: 6px solid var(--purple); }
.svc-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.svc-grid li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.svc-grid a { display: block; padding: 1.6rem; text-decoration: none; color: var(--body); height: 100%; }
.svc-grid a:hover { background: var(--lavender); }
.svc-grid h2 { font-size: 1.25rem; color: var(--purple); }
.svc-grid p { margin: 0; font-size: 1rem; }
.cols { columns: 3 220px; column-gap: 2.5rem; padding-left: 1.2em; }
.cols li { break-inside: avoid; padding: 0.2rem 0; }
.rel { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.rel a { display: inline-block; border: 2px solid var(--line); border-radius: 999px; padding: 0.5rem 1rem; text-decoration: none; font-weight: 600; }
.rel a:hover { border-color: var(--purple); }
.related { padding-top: 0 !important; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 1.5rem 0 0; }
.values dt { font-weight: 700; font-stretch: 118%; color: var(--ink); font-size: 1.2rem; border-top: 4px solid var(--purple); padding-top: 0.8rem; }
.values dd { margin: 0.4rem 0 0; }
.prose h2 { margin-top: 1.8em; font-size: 1.45rem; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 0.4rem; }
.terms { width: 100%; margin: 1rem 0 1.5rem; }
.terms th, .terms td { text-align: left; padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.terms thead th { color: var(--ink); border-bottom: 2px solid var(--ink); }
.terms tbody th { color: var(--ink); width: 38%; }
.map { margin-top: 1.5rem; }
.map iframe { width: 100%; height: 340px; border: 0; border-radius: 10px; }

/* ---------- form ---------- */
.sals-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sals-form .full { grid-column: 1 / -1; }
.sals-form label { display: block; font-weight: 600; color: var(--ink); font-size: 0.95rem; margin-bottom: 0.3rem; }
.sals-form input[type="text"], .sals-form input[type="tel"], .sals-form input[type="email"], .sals-form select, .sals-form textarea { width: 100%; font: inherit; padding: 0.7rem 0.8rem; border: 2px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.sals-form input:focus, .sals-form select:focus, .sals-form textarea:focus { border-color: var(--purple); outline: none; }
.sals-form .hp { position: absolute; left: -9999px; }
.sals-form .consent { font-size: 0.9rem; }
.notice { padding: 1rem 1.2rem; border-radius: 8px; margin-bottom: 1.2rem; font-weight: 600; }
.notice--ok { background: #e6f6ed; color: #0c5a30; }
.notice--err { background: #fdebe7; color: #8f2410; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: #c9c5dc; padding: 4rem 0 6rem; font-size: 0.98rem; border-top: 6px solid var(--purple); }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr; gap: 2.5rem; }
.site-foot h2 { color: #fff; font-size: 1.05rem; margin-bottom: 0.8rem; }
.site-foot ul { list-style: none; padding: 0; }
.site-foot li { margin-bottom: 0.4rem; }
.foot-name { color: #fff; font-size: 1.3rem; text-transform: uppercase; margin: 0; }
.foot-tag { color: #b9a9f5; font-style: italic; font-weight: 600; }
.hours--foot tr { border-color: #35304f; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #35304f; font-size: 0.9rem; }
.foot-base p { margin: 0; max-width: none; }
.foot-base a { margin-left: 1.2rem; }
.foot-base a:first-child { margin-left: 0; }
.mobile-bar { display: none; }

/* ---------- WordPress content fallback ---------- */
.entry { padding: 3rem 0; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, .screen-reader-text { font-size: 0.9rem; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 0.5rem 1.25rem 1rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .facts dl { grid-template-columns: 1fr 1fr; }
  .facts dl > div { padding-left: 1.4rem; border-top: 1px solid var(--line); }
  .facts dl > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts dl > div:nth-child(-n+2) { border-top: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero__in, .split, .split--narrow { grid-template-columns: 1fr; }
  .hero__photo { max-width: 460px; }
  .values { grid-template-columns: 1fr; }
  .topbar__in a { display: none; }
  .head-call { display: none; }
  .mobile-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .mobile-bar a { color: #fff; text-decoration: none; font-weight: 700; text-align: center; padding: 0.95rem 0.5rem; border-left: 1px solid #35304f; }
  .mobile-bar a:first-child { background: var(--decal); border-left: 0; }
  .sals-form { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .window__panes { grid-template-columns: 1fr; }
  .window__panes ul + ul { border-left: 0; border-top: 6px solid #e8eaf0; }
  .foot-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .topbar, .site-head, .mobile-bar, .cta-band, .site-foot { display: none; } }
.faq + p { margin-top: 1.5rem; }
.sals-form p { margin: 0; max-width: none; }
