/*
Theme Name: Corvette Generation
Theme URI: https://corvettegeneration.com/
Author: Corvette Generation
Description: Fast, plugin-free theme for Corvette Generation (C3 & C4 Corvette parts and service). Simple navigation, click-to-call, and a built-in contact form protected by Cloudflare Turnstile.
Version: 1.2.1
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: corvette-generation
*/

:root {
	--cg-ink: #16181d;
	--cg-text: #2a2e36;
	--cg-muted: #5b6270;
	--cg-red: #b8102a;
	--cg-red-dark: #8f0c20;
	--cg-bg: #f4f5f7;
	--cg-surface: #fff;
	--cg-line: #dfe2e8;
	--cg-radius: 10px;
	--cg-wrap: 1120px;
	--cg-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--cg-font); font-size: 1.0625rem; line-height: 1.65; color: var(--cg-text); background: var(--cg-bg); }
img { max-width: 100%; height: auto; }
a { color: var(--cg-red); text-underline-offset: 3px; }
a:hover { color: var(--cg-red-dark); }
:focus-visible { outline: 3px solid #0b57d0; outline-offset: 2px; }
h1, h2, h3 { color: var(--cg-ink); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
p { margin: 0 0 1em; }

.screen-reader-text, .cg-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cg-skip { position: absolute; left: -999px; top: 8px; background: var(--cg-ink); color: #fff; padding: 12px 16px; border-radius: 6px; z-index: 100; }
.cg-skip:focus { left: 8px; color: #fff; }
.cg-wrap { width: min(var(--cg-wrap), 100% - 32px); margin-inline: auto; }

/* Buttons */
.cg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 8px; border: 2px solid var(--cg-red); background: var(--cg-red); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.cg-btn:hover { background: var(--cg-red-dark); border-color: var(--cg-red-dark); color: #fff; }
.cg-btn--light { background: #fff; color: var(--cg-ink); border-color: #fff; }
.cg-btn--light:hover { background: #e9ebef; border-color: #e9ebef; color: var(--cg-ink); }
.cg-btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.cg-btn--ghost:hover { background: rgb(255 255 255 / .12); border-color: #fff; color: #fff; }

/* Header + navigation */
.cg-header { position: sticky; top: 0; z-index: 50; background: var(--cg-ink); border-bottom: 3px solid var(--cg-red); }
.cg-header__bar { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.cg-brand { display: inline-flex; align-items: center; margin-right: auto; color: #fff; font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: .01em; }
.cg-brand:hover { color: #fff; }
.cg-brand img { display: block; max-height: 52px; width: auto; }
.cg-call { display: none; }
.cg-menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: transparent; color: #fff; border: 2px solid rgb(255 255 255 / .5); border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.cg-menu-toggle:focus-visible, .cg-header a:focus-visible { outline-color: #fff; }

.cg-nav { display: none; width: 100%; }
.cg-nav.is-open { display: block; }
.cg-nav ul { list-style: none; margin: 0; padding: 0; }
.cg-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; color: #fff; text-decoration: none; font-weight: 600; border-radius: 8px; }
.cg-nav a:hover { background: rgb(255 255 255 / .1); color: #fff; }
.cg-nav .current-menu-item > a, .cg-nav .current-menu-ancestor > a { background: var(--cg-red); }
.cg-nav .sub-menu { padding-left: 16px; }
.cg-header__bar { flex-wrap: wrap; }
.cg-nav { order: 3; padding-bottom: 12px; }

@media (min-width: 900px) {
	.cg-menu-toggle { display: none; }
	.cg-nav, .cg-nav.is-open { display: block; width: auto; order: 0; padding: 0; }
	.cg-nav > ul { display: flex; gap: 4px; }
	.cg-nav li { position: relative; }
	.cg-nav .menu-item-has-children > a::after { content: ""; margin-left: 8px; border: 5px solid transparent; border-top-color: currentColor; border-bottom: 0; }
	.cg-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 260px; padding: 8px; background: var(--cg-ink); border: 1px solid #343944; border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .35); }
	.cg-nav li:hover > .sub-menu, .cg-nav li:focus-within > .sub-menu { display: block; }
	.cg-call { display: inline-flex; min-height: 44px; }
}

/* Hero + sections */
.cg-hero { background: linear-gradient(135deg, #16181d 0%, #2b0a10 100%); color: #fff; padding: clamp(48px, 9vw, 110px) 0; }
.cg-hero h1 { color: #fff; max-width: 18ch; }
.cg-hero p { font-size: 1.2rem; max-width: 52ch; color: #e6e8ec; }
.cg-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cg-section { padding: clamp(36px, 6vw, 72px) 0; }
.cg-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cg-card { background: var(--cg-surface); border: 1px solid var(--cg-line); border-radius: var(--cg-radius); padding: 24px; }
.cg-card h3 { font-size: 1.2rem; }
.cg-card ul { margin: 0; padding-left: 1.2em; }
.cg-cta { background: var(--cg-ink); color: #fff; text-align: center; }
.cg-cta h2 { color: #fff; }
.cg-cta p { margin-inline: auto; color: #e6e8ec; }

/* Content pages */
.cg-page { padding: clamp(28px, 5vw, 56px) 0; }
.cg-content { background: var(--cg-surface); border: 1px solid var(--cg-line); border-radius: var(--cg-radius); padding: clamp(20px, 4vw, 40px); }
.cg-content > :last-child { margin-bottom: 0; }
.cg-content .alignwide, .cg-content .alignfull { max-width: 100%; }
.cg-content h2, .cg-content h3 { margin-top: 1.4em; }
.cg-breadcrumb { font-size: .9rem; color: var(--cg-muted); margin-bottom: 12px; }

/* Contact form */
.cg-contact { display: grid; gap: 24px; }
@media (min-width: 900px) { .cg-contact { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.cg-form { display: grid; gap: 18px; }
.cg-field { display: grid; gap: 6px; }
.cg-field label { font-weight: 700; font-size: .95rem; color: var(--cg-ink); }
.cg-field input, .cg-field select, .cg-field textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--cg-ink); background: #fff; border: 1.5px solid #8a93a3; border-radius: 8px; }
.cg-field textarea { min-height: 150px; resize: vertical; }
.cg-field input:focus, .cg-field select:focus, .cg-field textarea:focus { outline: 3px solid #0b57d0; outline-offset: 0; border-color: var(--cg-ink); }
.cg-field--row { display: grid; gap: 18px; }
@media (min-width: 640px) { .cg-field--row { grid-template-columns: 1fr 1fr; } }
.cg-note { padding: 14px 16px; border-radius: 8px; font-weight: 600; border: 1px solid; }
.cg-note--ok { background: #e6f4ec; border-color: #8fcdb2; color: #0f4f37; }
.cg-note--err { background: #fdecea; border-color: #e7a09b; color: #7d1913; }
.cg-note--warn { background: #fff4d6; border-color: #e3c466; color: #5a4100; }
.cg-info p { margin-bottom: .5em; }

/* Footer */
.cg-footer { background: var(--cg-ink); color: #cfd3da; padding: 40px 0 24px; margin-top: 0; }
.cg-footer a { color: #fff; }
.cg-footer h2 { color: #fff; font-size: 1.1rem; }
.cg-footer__grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cg-footer ul { list-style: none; margin: 0; padding: 0; }
.cg-footer li { margin-bottom: 6px; }
.cg-footer__legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid #343944; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .cg-header, .cg-footer, .cg-skip { display: none; } }

/* Light (white) header: default. Choose Dark in Customize > Header. */
.cg-header--light { background: #fff; box-shadow: 0 1px 8px rgb(22 24 29 / .08); }
.cg-header--light .cg-brand, .cg-header--light .cg-brand:hover { color: var(--cg-ink); }
.cg-header--light .cg-menu-toggle { color: var(--cg-ink); border-color: #8a93a3; }
.cg-header--light .cg-menu-toggle:focus-visible, .cg-header--light a:focus-visible { outline-color: #0b57d0; }
.cg-header--light .cg-nav a { color: var(--cg-ink); }
.cg-header--light .cg-nav a:hover { background: #eef0f3; color: var(--cg-ink); }
.cg-header--light .cg-nav .current-menu-item > a, .cg-header--light .cg-nav .current-menu-ancestor > a { background: var(--cg-red); color: #fff; }
@media (min-width: 900px) {
	.cg-header--light .cg-nav .sub-menu { background: #fff; border-color: var(--cg-line); box-shadow: 0 12px 30px rgb(22 24 29 / .15); }
}

/* Hero with rotating photos */
.cg-hero { position: relative; overflow: hidden; }
.cg-hero--img { display: flex; align-items: center; min-height: clamp(380px, 62vh, 660px); background: var(--cg-ink); }
.cg-hero__content { position: relative; z-index: 2; }
.cg-hero__slides { position: absolute; inset: 0; z-index: 0; }
.cg-hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.cg-hero__slide.is-active { opacity: 1; }
.cg-hero__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cg-hero--shade::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgb(10 12 16 / .78) 0%, rgb(10 12 16 / .35) 70%, rgb(10 12 16 / .2) 100%); }
.cg-hero--img:not(.cg-hero--shade) h1, .cg-hero--img:not(.cg-hero--shade) p { text-shadow: 0 2px 10px rgb(0 0 0 / .6); }
.cg-hero__controls { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 999px; background: rgb(10 12 16 / .55); }
.cg-hero__pause { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: .8rem; cursor: pointer; }
.cg-hero__dot { width: 14px; height: 14px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.cg-hero__dot.is-active { background: #fff; }
.cg-hero__controls button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cg-hero__slide { transition: none; } }
.cg-content--gap { margin-bottom: 24px; }
.cg-field--captcha input[type="text"] { max-width: 140px; }

.cg-formbox { max-width: 760px; }
.cg-contact-auto { margin-top: 2em; }
#contact-form { scroll-margin-top: 96px; }
.cg-card .cg-card__list { margin: 0 0 1em; }

.cg-footer__credit { margin: 6px 0 0; font-size: .8rem; opacity: .8; }
.cg-footer__credit a { text-underline-offset: 3px; }
