/*
Theme Name: Clearline Auto Glass
Description: Lead-focused theme for an auto glass shop.
Version: 1.3.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: clearline
*/

:root {
  --ink: #07182e;
  --ink-2: #0d3a78;
  --blue: #0f62c4;
  --amber: #12a0ff;
  --amber-2: #4db8ff;
  --text: #24374d;
  --muted: #5d6f80;
  --line: #dfe5ec;
  --pale: #f2f6fa;
  --gutter: max(20px, calc((100% - 1160px) / 2));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 18px; line-height: 1.6; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--ink); line-height: 1.12; font-weight: 800; font-style: italic; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
/* The white ring keeps the focus indicator visible on dark sections too. */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; gap: 28px; min-height: 76px; padding: 0 var(--gutter); }
.brand { font-size: 1.45rem; font-weight: 700; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand { font-style: italic; font-weight: 800; }
.custom-logo-link { margin-right: auto; display: block; }
.custom-logo { max-height: 62px; width: auto; }
.nav ul { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav a { color: var(--ink); font-weight: 600; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav .current-menu-item a { border-bottom-color: var(--amber); }
.head-phone { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 6px; background: var(--amber); color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--amber-2); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }

/* Sections, all built from editable blocks */
.entry > * { margin-top: 0; margin-bottom: 0; }
.entry > :not(.sec) { max-width: 780px; margin-inline: auto; padding-inline: 20px; }
.sec { padding: clamp(56px, 8vw, 96px) var(--gutter); }
.sec-pale { background: var(--pale); }
.sec-dark { background: linear-gradient(115deg, var(--ink) 52%, var(--ink-2)); color: #d4dde6; }
.sec-dark h1, .sec-dark h2, .sec-dark h3 { color: #fff; }
.sec-amber { background: var(--amber); color: var(--ink); padding-block: clamp(44px, 6vw, 68px); }
.sec-amber .wp-block-columns { align-items: center; }
.lead { font-size: 1.2rem; }
.eyebrow { font-size: .92rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.sec-dark .eyebrow { color: var(--amber-2); }
.sec-head { max-width: 680px; margin-bottom: 36px; }
.sec .wp-block-columns { gap: clamp(20px, 3vw, 36px); margin-bottom: 0; }
.sec .wp-block-columns + .wp-block-columns { margin-top: clamp(20px, 3vw, 36px); }
.sec .wp-block-columns + p, .sec .wp-block-columns + .wp-block-buttons { margin-top: 28px; }
.split { align-items: center !important; }
.split img, .card img { border-radius: 8px; width: 100%; }
.wp-block-image { margin: 0; }

.page-band { background: linear-gradient(115deg, var(--ink) 52%, var(--ink-2)); border-bottom: 4px solid var(--amber); padding: clamp(44px, 6vw, 72px) var(--gutter); }
.page-band h1 { color: #fff; margin: 0; font-size: clamp(2.2rem, 4.6vw, 3.3rem); }

/* Buttons */
.wp-block-buttons { gap: 12px; }
.wp-block-button__link { border-radius: 6px; padding: 14px 26px; font-weight: 700; text-decoration: none; }
.btn-amber .wp-block-button__link { background: var(--amber); color: var(--ink); }
.btn-amber .wp-block-button__link:hover { background: var(--amber-2); }
.btn-ghost .wp-block-button__link { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn-ghost .wp-block-button__link:hover { border-color: #fff; }
.btn-ink .wp-block-button__link { background: var(--ink); color: #fff; }

.hero-actions { flex-direction: column; align-items: flex-start; }
.hero-actions .wp-block-button { width: min(340px, 100%); }
.hero-actions .wp-block-button__link { display: block; width: 100%; box-sizing: border-box; text-align: center; }

/* Big hero: the image block in the second column fills the whole section */
.hero-big { background: var(--ink); }
.hero-big .split { align-items: stretch !important; }
.hero-big .split img { border-radius: 0; object-fit: cover; object-position: 100% 50%; }
@media (min-width: 1201px) {
  .hero-big { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(580px, 84vh, 880px); overflow: hidden; }
  .hero-big::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(7, 24, 46, .84) 0%, rgba(7, 24, 46, .74) 38%, rgba(7, 24, 46, .6) 48%, rgba(7, 24, 46, 0) 62%); }
  .hero-big > .wp-block-group__inner-container { position: static; flex: 1; width: 100%; }
  .hero-big .split { position: static; width: 100%; }
  .hero-big .split > .wp-block-column:first-child { position: relative; z-index: 2; flex: 0 1 540px !important; max-width: 540px; }
  .hero-big .split > .wp-block-column:last-child { position: absolute; inset: 0; z-index: 0; margin: 0; }
  .hero-big .wp-block-image, .hero-big .split img { width: 100%; height: 100%; }
}
@media (max-width: 1200px) {
  .hero-big { padding-top: 0; }
  .hero-big .split { display: flex; flex-direction: column; gap: 30px; }
  .hero-big .split > .wp-block-column { flex-basis: auto !important; }
  .hero-big .split > .wp-block-column:last-child { order: -1; margin-inline: -20px; }
  .hero-big .split img { aspect-ratio: 16 / 9; max-height: 64vh; }
}
@media (max-width: 600px) {
  .hero-big .split img { aspect-ratio: 4 / 3; }
}

/* Call or text choice */
.contact-choice { width: calc(100% - 32px); max-width: 360px; border: 0; border-radius: 16px; padding: 26px; text-align: center; color: var(--text); box-shadow: 0 18px 50px rgba(7, 24, 46, .4); }
.contact-choice::backdrop { background: rgba(7, 24, 46, .62); }
.contact-choice h2 { font-size: 1.35rem; margin-bottom: .35em; }
.contact-choice p { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-bottom: 18px; }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-actions a { display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 10px; color: #fff; font-weight: 700; text-decoration: none; }
.contact-call { background: var(--ink); }
.contact-text { background: var(--blue); }
.contact-close { margin-top: 12px; min-height: 44px; padding: 0 18px; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }

/* Trust strip */
.trust { padding-block: 22px; border-bottom: 1px solid var(--line); }
.trust p { margin: 0; font-weight: 700; color: var(--ink); text-align: center; }
.trust p { display: flex; align-items: center; justify-content: center; gap: 10px; }
.trust .wp-block-columns { flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.trust .wp-block-column { flex: 0 1 auto !important; }
.trust .wp-block-column:nth-child(5) p { --trust-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.700l5.700 5.700a8 8 0 1 1-11.300 0z'/%3E%3C/svg%3E"); }
.trust p::before { content: ""; flex: none; width: 26px; height: 26px; background: var(--blue); -webkit-mask: var(--trust-icon) center / contain no-repeat; mask: var(--trust-icon) center / contain no-repeat; }
.trust .wp-block-column:nth-child(1) p { --trust-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7' cy='7' r='1.4'/%3E%3C/svg%3E"); }
.trust .wp-block-column:nth-child(2) p { --trust-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.trust .wp-block-column:nth-child(3) p { --trust-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6.500-8 12-8 12s-8-5.500-8-12a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.trust .wp-block-column:nth-child(4) p { --trust-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M8.200 12.700L7 22l5-3 5 3-1.200-9.300'/%3E%3C/svg%3E"); }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 20px; }
.card h3, .card p { padding-inline: 6px; }
.card h3 { margin-top: 16px; }
.card p:last-child { margin-bottom: 0; }
.reason { border-top: 3px solid var(--amber); padding-top: 16px; }
.reason p:last-child { margin-bottom: 0; }
.reviews-note { font-size: .86rem; color: var(--muted); }

/* Steps */
.steps { counter-reset: step; }
.step { counter-increment: step; }
.step::before { content: counter(step); display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin-bottom: 14px; border-radius: 50%; background: var(--amber); color: var(--ink); font-weight: 700; font-size: 1.2rem; }

/* Map */
.shop-map iframe { display: block; width: 100%; height: clamp(280px, 36vw, 400px); border: 0; border-radius: 8px; }

/* Lists */
.sec ul.wp-block-list { margin: 0 0 1em; padding-left: 1.2em; }
.sec ul.wp-block-list li { margin-bottom: .45em; }

/* Contact */
.contact-layout { align-items: flex-start !important; }
.col-main { flex: 1 1 64% !important; min-width: 0; }
.col-side { flex: 1 1 32% !important; background: var(--ink); color: #d4dde6; border-radius: 10px; padding: 28px; position: sticky; top: 100px; }
.col-side h2, .col-side h3 { color: #fff; }
.col-side h3 { font-size: 1.05rem; margin: 18px 0 2px; }
.col-side p { margin-bottom: .4em; }
.col-side a { color: #fff; }

/* Footer */
.site-foot { background: var(--ink); color: #b6c3cf; padding: 52px var(--gutter) 28px; font-size: 1rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.site-foot h2 { color: #fff; font-size: 1.15rem; margin-bottom: .6em; }
.site-foot a { color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.foot-base { border-top: 1px solid rgba(255,255,255,.14); margin-top: 32px; padding-top: 18px; font-size: .88rem; }

/* Accessibility options */
.foot-a11y { padding: 0; border: 0; background: none; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; }
.a11y-nav-btn { display: none; }
.a11y-fab { position: fixed; left: 16px; bottom: 16px; z-index: 55; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(7, 24, 46, .35); }
.a11y-fab svg { width: 28px; height: 28px; fill: currentColor; }
.a11y-panel { width: calc(100% - 32px); max-width: 380px; border: 0; border-radius: 14px; padding: 24px; color: var(--text); box-shadow: 0 18px 50px rgba(7, 24, 46, .4); }
.a11y-panel::backdrop { background: rgba(7, 24, 46, .62); }
.a11y-panel h2 { font-size: 1.35rem; }
.a11y-panel label { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; color: var(--ink); cursor: pointer; }
.a11y-panel input { width: 22px; height: 22px; flex: none; accent-color: var(--blue); }
.a11y-panel p { font-size: .95rem; }
.a11y-actions { display: flex; gap: 10px; margin-top: 8px; }
.a11y-actions button { flex: 1; min-height: 46px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.a11y-actions .a11y-close { background: var(--ink); color: #fff; }

html.a11y-text { font-size: 125%; }
html.a11y-text body { font-size: 22px; }
html.a11y-links a { text-decoration: underline !important; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-motion { scroll-behavior: auto; }
html.a11y-contrast { --text: #000; --muted: #000; --line: #000; --pale: #fff; --blue: #00338d; --ink-2: #000; --ink: #000; --amber: #ffd400; --amber-2: #ffe666; }
html.a11y-contrast body { color: #000; background: #fff; }
html.a11y-contrast a { color: #00338d; }
html.a11y-contrast .sec-dark, html.a11y-contrast .page-band, html.a11y-contrast .site-foot, html.a11y-contrast .col-side { background: #000; color: #fff; }
html.a11y-contrast .sec-dark a:not(.wp-block-button__link), html.a11y-contrast .site-foot a, html.a11y-contrast .col-side a, html.a11y-contrast .foot-a11y { color: #ffe666; }
html.a11y-contrast .site-foot, html.a11y-contrast .col-side p { color: #fff; }
html.a11y-contrast .btn-ghost .wp-block-button__link { color: #fff; border-color: #fff; }
html.a11y-contrast .hero-big::after { background: linear-gradient(90deg, rgba(0, 0, 0, .94) 0%, rgba(0, 0, 0, .9) 48%, rgba(0, 0, 0, 0) 62%); }
html.a11y-contrast .gst-small, html.a11y-contrast .gst-label small, html.a11y-contrast .gst-field label small, html.a11y-contrast .gst-vin-help { color: #000; }

/* Mobile call bar */
.call-bar { display: none; }

.nav a { white-space: nowrap; }

@media (max-width: 1200px) {
  .head-in { gap: 16px; }
  .nav ul { gap: 16px; }
  .btn { padding-inline: 16px; }
}

@media (max-width: 980px) {
  .head-phone { display: none; }
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 4px; }
  .nav a { display: block; padding: 10px 0; }
  .a11y-nav-btn { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
}

@media (min-width: 782px) and (max-width: 1040px) {
  .trust .wp-block-columns { justify-content: center; gap: 12px 32px; }
  .trust p { white-space: nowrap; }
}

@media (max-width: 781px) {
  body { padding-bottom: 92px; font-size: 17px; }
  .a11y-fab { display: none; }
  .head-in { gap: 12px; min-height: 64px; }
  .head-in > .btn { display: none; }
  .col-main, .col-side { flex-basis: 100% !important; }
  .col-side { position: static; }
  .foot-grid { grid-template-columns: 1fr; }
  .call-bar { display: grid; grid-template-columns: 1fr 1fr 1.45fr; gap: 7px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 60; padding: 7px; background: #fff; border-radius: 18px; box-shadow: 0 8px 26px rgba(7, 24, 46, .3); }
  .call-bar.no-quote { grid-template-columns: 1fr 1fr; }
  .call-bar a { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 54px; border-radius: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .call-bar svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .call-bar .bar-call { background: var(--ink); color: #fff; }
  .call-bar .bar-text { background: var(--blue); color: #fff; }
  .call-bar .bar-quote { background: var(--amber); color: var(--ink); }
  /* Phones lead with the headline and buttons; the photo fades in behind the bottom of the section. */
  .hero-big { position: relative; isolation: isolate; overflow: hidden; padding-top: 34px; padding-bottom: 230px; }
  .hero-big .split { position: static; }
  .hero-big .split > .wp-block-column:last-child { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; height: 420px; margin: 0; }
  .hero-big .split > .wp-block-column:last-child::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #07182e 0%, rgba(7, 24, 46, .84) 26%, rgba(7, 24, 46, .78) 48%, rgba(7, 24, 46, .08) 76%, rgba(7, 24, 46, 0) 100%); }
  .hero-big .wp-block-image, .hero-big .split img { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
  .hero-big .split > .wp-block-column:first-child { position: relative; z-index: 2; display: flex; flex-direction: column; }
  .hero-big .eyebrow { order: 1; }
  .hero-big h1 { order: 2; }
  .hero-big .hero-actions { order: 3; width: 100%; }
  .hero-big .hero-actions .wp-block-button { width: 100%; }
  .hero-big .lead { order: 4; margin: 22px 0 0; }
  .trust .wp-block-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .trust .wp-block-column { display: flex; align-items: center; justify-content: center; padding: 16px 8px; background: var(--pale); border: 1px solid var(--line); border-radius: 10px; }
  .trust .wp-block-column:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .trust p { flex-direction: column; gap: 8px; font-size: 1.02rem; line-height: 1.25; }
  .trust p::before { width: 36px; height: 36px; }
}
