/*
Theme Name: KEM's Tag & Title
Theme URI: https://kemstagandtitle.com
Author: KEM's Tag & Title
Author URI: https://kemstagandtitle.com
Description: Maryland MVA-approved tag & title services theme. A faithful conversion of the KEM's Tag & Title website — hero, services, about, FAQ, appointment booking (with email + saved submissions) and contact pages. Self-installing: activate the theme and all pages are created automatically.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kem-tag-title
Tags: business, services, one-column, custom-menu, featured-images, translation-ready
*/

/* =========================================================
   Design tokens (matched to the original site)
   ========================================================= */
:root {
  --background: oklch(100% 0 0);
  --foreground: oklch(18% .05 260);
  --primary: oklch(30% .13 260);
  --primary-foreground: oklch(99% 0 0);
  --secondary: oklch(96% .01 250);
  --muted: oklch(96% .01 250);
  --muted-foreground: oklch(50% .03 260);
  --accent: oklch(95% .04 28);
  --accent-foreground: oklch(58% .22 28);
  --border: oklch(92% .01 255);
  --card: oklch(100% 0 0);
  --card-foreground: oklch(18% .05 260);
  --ring: oklch(30% .13 260);

  --brand-navy: oklch(30% .13 260);
  --brand-red: oklch(58% .22 28);
  --gradient-hero: linear-gradient(180deg, oklch(98% .01 255) 0%, oklch(94% .03 255) 100%);

  --radius: .5rem;
  --container: 1200px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 6px 20px -6px rgba(16, 24, 40, .12);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .2);
}

/* =========================================================
   Base / reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--brand-navy); margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.text-muted { color: var(--muted-foreground); }
.text-red { color: var(--brand-red); }
.text-center { text-align: center; }

.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 5rem 0; } }

/* eyebrow label */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--brand-red);
  margin-bottom: .75rem;
}
.section-title { font-size: 2rem; font-weight: 700; }
@media (min-width: 768px) { .section-title { font-size: 2.4rem; } }
.section-sub { color: var(--muted-foreground); max-width: 620px; }
.mx-auto { margin-inline: auto; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: .95rem;
  padding: .8rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-navy); color: var(--primary-foreground); box-shadow: var(--shadow-md); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-red { background: var(--brand-red); color: #fff; box-shadow: var(--shadow-md); width: 100%; justify-content: center; padding: .95rem 1.4rem; }
.btn-red:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; color: var(--brand-navy); border-color: var(--border); }
.btn-outline:hover { background: var(--secondary); }
.btn-white { background: #fff; color: var(--brand-navy); }
.btn svg { width: 18px; height: 18px; }

/* =========================================================
   Top bar
   ========================================================= */
.topbar { background: var(--brand-red); color: #fff; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .5rem; }
.topbar a { color: #fff; display: inline-flex; align-items: center; gap: .4rem; }
.topbar svg { width: 15px; height: 15px; }

/* =========================================================
   Header
   ========================================================= */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-badge {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-navy); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; letter-spacing: .02em;
}
.brand-name { font-family: var(--font-display); font-weight: 700; color: var(--brand-navy); font-size: 1.05rem; line-height: 1.1; }
.brand-sub { font-size: .72rem; color: var(--muted-foreground); }

.main-nav { display: none; }
@media (min-width: 992px) { .main-nav { display: flex; gap: 1.6rem; } }
.main-nav a { font-weight: 500; color: var(--foreground); font-size: .95rem; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--brand-red); }

.header-cta { display: none; text-align: right; }
@media (min-width: 992px) { .header-cta { display: block; } }
.header-cta .label { font-size: .72rem; color: var(--muted-foreground); }
.header-cta .phone { font-family: var(--font-display); font-weight: 700; color: var(--brand-navy); font-size: 1.15rem; }

/* mobile nav */
.nav-toggle { display: inline-flex; background: none; border: 0; cursor: pointer; color: var(--brand-navy); padding: .3rem; }
@media (min-width: 992px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 26px; height: 26px; }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: #fff; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-nav a.active { color: var(--brand-red); }

/* =========================================================
   Hero
   ========================================================= */
.hero { background: var(--gradient-hero); }
.hero .container { display: grid; gap: 2rem; align-items: center; padding-block: 3rem; }
@media (min-width: 992px) { .hero .container { grid-template-columns: 1.05fr .95fr; padding-block: 5rem; } }
.hero-title { font-size: 2.5rem; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 768px) { .hero-title { font-size: 3.6rem; } }
.hero-underline { position: relative; display: inline-block; }
.hero-underline::after { content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: 4px; background: var(--brand-red); border-radius: 2px; }
.hero-rule { width: 56px; height: 4px; background: var(--brand-red); border-radius: 2px; margin-bottom: 1.5rem; }
.hero-text { font-size: 1.1rem; color: var(--muted-foreground); max-width: 480px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-img { justify-self: center; }
.hero-img img { border-radius: 1rem; filter: drop-shadow(0 30px 40px rgba(16,24,40,.18)); }

/* page hero (inner pages) */
.page-hero { background: var(--gradient-hero); border-bottom: 1px solid var(--border); text-align: center; padding: 4rem 0; }
@media (min-width:768px){ .page-hero { padding: 5rem 0; } }
.page-hero h1 { font-size: 2.4rem; font-weight: 800; }
@media (min-width:768px){ .page-hero h1 { font-size: 3.2rem; } }
.page-hero p { color: var(--muted-foreground); max-width: 640px; margin: 1rem auto 0; }

/* =========================================================
   About / welcome
   ========================================================= */
.split { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 992px) { .split { grid-template-columns: 1fr 1fr; } }
.check-list { display: grid; gap: .7rem; margin: 1.5rem 0; }
.check-list li { display: flex; align-items: flex-start; gap: .6rem; list-style: none; color: var(--foreground); }
.check-list svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--brand-red); margin-top: 2px; }
.about-img img { border-radius: 1rem; box-shadow: var(--shadow-lg); }

/* CTA band */
.cta-band { background: var(--gradient-hero); }
.cta-band .container { display: grid; gap: 1.5rem; align-items: center; padding-block: 3rem; }
@media (min-width: 768px) { .cta-band .container { grid-template-columns: 1fr auto; } }
.cta-band h2 { font-size: 1.5rem; max-width: 780px; }
@media (min-width: 768px) { .cta-band h2 { font-size: 1.9rem; } }

/* =========================================================
   Services grid
   ========================================================= */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .grid-3 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in oklab, var(--brand-navy) 25%, var(--border)); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent); color: var(--brand-red);
  display: grid; place-items: center; margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.card p { color: var(--muted-foreground); font-size: .93rem; margin-bottom: 1rem; }
.card-link { color: var(--brand-red); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; }
.card-link svg { width: 16px; height: 16px; }

/* =========================================================
   Stats
   ========================================================= */
.stats { background: var(--brand-navy); color: #fff; }
.stats .grid { grid-template-columns: 1fr; text-align: center; }
@media (min-width: 768px) { .stats .grid { grid-template-columns: repeat(3, 1fr); } }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; color: #fff; }
.stat-label { color: rgba(255,255,255,.8); }

/* key facts */
.facts .grid { grid-template-columns: 1fr; }
@media (min-width: 768px) { .facts .grid { grid-template-columns: repeat(3, 1fr); } }
.fact { text-align: center; padding: 1rem; }
.fact-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--brand-red); display: grid; place-items: center; margin: 0 auto 1rem; }
.fact-icon svg { width: 28px; height: 28px; }

/* values (about page) */
.values .grid { grid-template-columns: 1fr; }
@media (min-width: 640px){ .values .grid { grid-template-columns: repeat(2,1fr);} }
@media (min-width: 992px){ .values .grid { grid-template-columns: repeat(4,1fr);} }

/* =========================================================
   Services (list) page
   ========================================================= */
.service-list { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .service-list { grid-template-columns: repeat(2, 1fr); } }
.service-item { display: flex; gap: 1.2rem; }
.service-item .card-icon { flex: 0 0 auto; }
.service-item h3 { font-size: 1.2rem; }

/* =========================================================
   FAQ (accordion)
   ========================================================= */
.faq { max-width: 780px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0; text-align: left;
  font-family: var(--font-body); font-weight: 500; font-size: 1.02rem; color: var(--brand-navy);
}
.faq-q svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--muted-foreground); transition: transform .25s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--muted-foreground); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 0 1.2rem; font-size: .95rem; }

/* =========================================================
   Appointment / Contact
   ========================================================= */
.layout-2col { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 992px) { .layout-2col { grid-template-columns: 1.6fr 1fr; } }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; gap: 1.1rem 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; color: var(--foreground); }
.field label .req { color: var(--brand-red); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: .95rem;
  padding: .7rem .8rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--foreground); width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid color-mix(in oklab, var(--brand-navy) 40%, transparent); border-color: var(--brand-navy); }
.form-note { text-align: center; color: var(--muted-foreground); font-size: .85rem; margin-top: 1rem; }

.alert { border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.5rem; font-size: .95rem; }
.alert-success { background: oklch(95% .05 150); color: oklch(40% .1 150); border: 1px solid oklch(85% .08 150); }
.alert-error { background: var(--accent); color: var(--accent-foreground); border: 1px solid color-mix(in oklab, var(--brand-red) 30%, transparent); }

/* side cards */
.help-card { background: var(--brand-navy); color: #fff; border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.25rem; }
.help-card h3 { color: #fff; }
.help-card p { color: rgba(255,255,255,.8); font-size: .92rem; }
.help-card .phone { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.info-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.25rem; }
.info-row { display: flex; justify-content: space-between; padding: .35rem 0; color: var(--muted-foreground); font-size: .95rem; }
.info-card h3 { font-size: 1.1rem; margin-bottom: .8rem; }
.info-card ul li { list-style: none; position: relative; padding-left: 1.2rem; margin-bottom: .5rem; color: var(--muted-foreground); font-size: .95rem; }
.info-card ul li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-red); }

/* contact cards */
.contact-cards { display: grid; gap: 1rem; }
.contact-card { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; transition: box-shadow .2s; }
.contact-card:hover { box-shadow: var(--shadow-md); }
.contact-ic { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; background: var(--accent); color: var(--brand-red); display: grid; place-items: center; }
.contact-ic svg { width: 22px; height: 22px; }
.contact-card .label { font-family: var(--font-display); font-weight: 700; color: var(--brand-navy); }
.contact-card .value { color: var(--muted-foreground); font-size: .95rem; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); min-height: 380px; height: 100%; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--brand-navy); color: rgba(255,255,255,.82); }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; padding: 3.5rem 0 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.7); font-size: .92rem; max-width: 320px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-links li { list-style: none; margin-bottom: .55rem; font-size: .93rem; }
.footer-contact li { list-style: none; margin-bottom: .55rem; font-size: .93rem; color: rgba(255,255,255,.75); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 1.2rem 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; font-size: .85rem; color: rgba(255,255,255,.6); }

/* utilities */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
