/*
Theme Name: Hot Car
Theme URI: https://hotcaraccessories.com/
Author: Blaine Anderson
Description: Theme for Hot Car Accessories: American sports car parts since 2005. A block theme; colours, fonts and layouts are in theme.json and every page can be edited in the Site Editor.
Version: 1.1
Requires at least: 6.6
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: hotcar
*/

/* The signature: twin racing stripes, the Viper GTS's, used as the site's mark throughout.
   Everything theme.json can't express lives here. */
:root {
  --hc-ease: cubic-bezier(.2,.8,.2,1);
  --hc-red: var(--wp--preset--color--red);
  --hc-ink: var(--wp--preset--color--asphalt);
  --hc-stripes: linear-gradient(90deg, var(--hc-red) 0 42%, transparent 42% 58%, var(--hc-red) 58% 100%);
  --hc-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  --hc-carbon: repeating-linear-gradient(45deg, #ffffff06 0 2px, transparent 2px 6px), repeating-linear-gradient(-45deg, #00000040 0 2px, transparent 2px 6px);
}
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--hc-red); color: #fff; }

/* Full-width sections sit flush against each other and against the header and footer */
.wp-site-blocks > * + *, main > .alignfull, main > .alignfull + * { margin-block-start: 0 !important; }
/* Line a narrower block up with the left edge of the 1240px column (where the logo sits) */
.hc-left { margin-left: max(0px, calc((100% - 1240px) / 2)) !important; margin-right: 0 !important; }
.hc-red { color: var(--hc-red); }

/* ---- header: a dark bar, floating over the photo on the home page ---- */
.hc-header { position: relative; z-index: 20; }
.home .hc-header { position: absolute; inset: 0 0 auto 0; background: linear-gradient(#000c, #0000) !important; }
.hc-wordmark { margin: 0; }
.hc-wordmark a { color: #fff !important; text-decoration: none; font-family: var(--wp--preset--font-family--display); font-weight: 900;
  font-size: 1.65rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1; white-space: nowrap; display: inline-flex; align-items: center; gap: .55rem; }
.hc-wordmark a::before { content: ""; width: 22px; height: 26px; background: var(--hc-stripes); transform: skewX(-14deg); }
.hc-wordmark a span { color: var(--hc-red); }
.hc-header .wp-block-navigation a { font-family: var(--wp--preset--font-family--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; font-size: 1.05rem; text-decoration: none; position: relative; }
.hc-header .wp-block-navigation-item__content::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px;
  background: var(--hc-red); transition: right .35s var(--hc-ease); }
.hc-header .wp-block-navigation-item__content:hover::after { right: 0; }
.hc-phone { margin: 0; }
.hc-phone a { display: inline-block; border: 1.5px solid #ffffff55; padding: .55rem 1rem; color: #fff !important; text-decoration: none; font-weight: 600;
  white-space: nowrap; transition: all .25s var(--hc-ease); }
.hc-phone a:hover { background: var(--hc-red); border-color: var(--hc-red); }

/* ---- hero ---- */
.hc-hero { min-height: min(94vh, 900px) !important; overflow: hidden; }
.hc-hero .wp-block-cover__background { background: linear-gradient(100deg, #000f 6%, #000b 40%, #0003 75%, #0006) !important; opacity: 1 !important; }
.hc-hero::after { content: ""; position: absolute; inset: 0; background: var(--hc-grain); mix-blend-mode: overlay; opacity: .35; pointer-events: none; z-index: 1; }
.hc-hero::before { content: ""; position: absolute; z-index: 1; top: -10%; bottom: -10%; left: 58%; width: 150px; background: var(--hc-stripes);
  opacity: .9; transform: skewX(-14deg) translateX(120vw); animation: hc-stripe 1.3s .25s var(--hc-ease) forwards; mix-blend-mode: multiply; }
.hc-hero .wp-block-cover__inner-container { width: 100% !important; max-width: none !important; margin: 0 !important; position: relative; z-index: 2; }
.hc-hero .wp-block-cover__inner-container > * { margin-left: max(0px, calc((100% - 1240px) / 2)) !important; margin-right: 0 !important; max-width: min(100%, 1240px); box-sizing: border-box; }
.hc-hero .wp-block-cover__inner-container > p { max-width: min(100%, 34rem) !important; }
.hc-eyebrow { font-family: var(--wp--preset--font-family--display); font-weight: 700; text-transform: uppercase; letter-spacing: .3em;
  font-size: .95rem; color: var(--hc-red); }
.hc-eyebrow::before { content: ""; display: inline-block; width: 42px; height: 3px; background: currentColor; vertical-align: middle; margin-right: 14px; }
.hc-hero .wp-block-cover__inner-container > h1 { max-width: 11ch; }
.hc-hero h1 { font-size: clamp(3.2rem, 8.5vw, 7.4rem) !important; line-height: .9 !important; text-shadow: 0 6px 50px #000a; }
.hc-hero h1 .hc-red { display: inline-block; }
.hc-hero .hc-eyebrow, .hc-hero h1, .hc-hero p:not(.hc-eyebrow), .hc-hero .wp-block-buttons { animation: hc-rise 1s var(--hc-ease) both; }
.hc-hero h1 { animation-delay: .1s; } .hc-hero p:not(.hc-eyebrow) { animation-delay: .25s; } .hc-hero .wp-block-buttons { animation-delay: .4s; }
.hc-outline .wp-block-button__link { background: transparent !important; border: 2px solid #fff !important; }
.hc-outline .wp-block-button__link:hover { background: #fff !important; color: var(--hc-ink) !important; }
.wp-block-button__link { transition: background .25s var(--hc-ease), transform .25s var(--hc-ease), color .25s; }
.wp-block-button__link:hover { transform: translateY(-2px); }

/* the car names running under the hero (the text is two identical halves) */
.hc-marquee { overflow: hidden; white-space: nowrap; position: relative; }
.hc-marquee p { display: inline-block; margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; font-size: 1.35rem; animation: hc-slide 50s linear infinite; }
.hc-marquee em { font-style: normal; display: inline-block; width: 16px; height: 18px; margin: 0 1.4rem; vertical-align: -1px;
  background: linear-gradient(90deg, #fff 0 40%, transparent 40% 60%, #fff 60%); transform: skewX(-14deg); color: transparent; overflow: hidden; }

/* ---- section heads ---- */
.hc-sechead h2 { font-size: clamp(2.6rem, 5vw, 4.4rem) !important; }

/* ---- store cards: Viper as the tall feature card, numbered like race cars ---- */
.hc-grid { display: grid !important; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto auto; gap: 1.4rem !important; counter-reset: hc; }
.hc-grid > .hc-card:first-child { grid-row: span 2; min-height: 640px; }
.hc-grid > .hc-card:first-child .wp-block-image img { object-position: 30% 70%; }
.hc-grid > .hc-card { margin: 0 !important; }
.hc-card { position: relative; overflow: hidden; background: var(--hc-ink); color: #fff; min-height: 300px; counter-increment: hc;
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.hc-card::before { content: "0" counter(hc); position: absolute; top: .4rem; right: 1.2rem; z-index: 1; font-family: var(--wp--preset--font-family--display);
  font-weight: 900; font-size: 6.5rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px #ffffffaa; transition: -webkit-text-stroke-color .4s; }
.hc-card:hover::before { -webkit-text-stroke-color: var(--hc-red); }
.hc-card .wp-block-image { position: absolute; inset: 0; margin: 0; z-index: -1; }
.hc-card .wp-block-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--hc-ease), filter 1.1s; filter: saturate(.85) contrast(1.05); }
.hc-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 30%, #000e 94%); }
.hc-card:hover .wp-block-image img { transform: scale(1.07); filter: saturate(1.1) contrast(1.05); }
.hc-card h3 { margin: 0; font-size: clamp(2rem, 3.2vw, 2.8rem) !important; }
.hc-grid > .hc-card:first-child h3 { font-size: clamp(2.6rem, 5vw, 4.4rem) !important; }
.hc-card h3 a { color: #fff; text-decoration: none; }
.hc-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }   /* the whole card is the link */
.hc-card p { margin: .4rem 0 0; color: #d6d6d6; max-width: 34rem; }
.hc-card .hc-go { font-family: var(--wp--preset--font-family--display); font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  color: #fff; margin-top: 1rem; display: inline-flex; align-items: center; gap: .6rem; }
.hc-card .hc-go::before { content: ""; width: 28px; height: 3px; background: var(--hc-red); transition: width .4s var(--hc-ease); }
.hc-card:hover .hc-go::before { width: 56px; }
.hc-card-tag { position: absolute; top: 1.4rem; left: 1.4rem; z-index: 1; background: var(--hc-red); color: #fff; font-family: var(--wp--preset--font-family--display);
  font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; padding: .35rem 1.1rem .35rem .75rem; margin: 0 !important;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }

/* ---- who we are: carbon weave, numbers like an instrument cluster ---- */
.hc-carbon { background-image: var(--hc-carbon); position: relative; }
.hc-carbon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--hc-stripes); opacity: .9; }
.hc-stat { border-top: 1px solid #ffffff22; padding-top: 1.1rem; margin: 0 0 1.8rem !important; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .2em; color: var(--wp--preset--color--steel); position: relative; }
.hc-stat::before { content: ""; position: absolute; top: -1px; left: 0; width: 38px; height: 3px; background: var(--hc-red); }
.hc-stat strong { display: block; font-family: var(--wp--preset--font-family--display); font-weight: 900; font-size: clamp(3rem, 5vw, 4.6rem);
  line-height: 1; color: #fff; letter-spacing: 0; margin-bottom: .35rem; font-variant-numeric: tabular-nums; }

/* ---- call band ---- */
.hc-band { position: relative; overflow: hidden; }
.hc-band::after { content: ""; position: absolute; right: -40px; top: -20%; bottom: -20%; width: 220px; background: linear-gradient(90deg, #0002 0 42%, transparent 42% 58%, #0002 58%);
  transform: skewX(-14deg); pointer-events: none; }
.hc-band .wp-block-columns { position: relative; z-index: 1; }

/* ---- inner pages ---- */
.hc-pagehead { position: relative; overflow: hidden; background-image: var(--hc-carbon); }
.hc-pagehead::after { content: ""; position: absolute; right: 8%; top: -20%; bottom: -20%; width: 120px; background: var(--hc-stripes); transform: skewX(-14deg); opacity: .95; }
.hc-pagehead h1 { position: relative; z-index: 1; font-size: clamp(3rem, 7vw, 6rem) !important; max-width: 14ch !important;
  margin-left: max(0px, calc((100% - 1240px) / 2)) !important; margin-right: 0 !important; }
.hc-prose > p:first-child { font-size: 1.35rem; line-height: 1.55; }
.hc-prose h2 { margin-top: 2.6rem; font-size: 2.2rem !important; display: flex; align-items: center; gap: .8rem; }
.hc-prose h2::before { content: ""; flex: none; width: 16px; height: 20px; background: var(--hc-stripes); transform: skewX(-14deg); }
.hc-info { gap: 1.2rem !important; }
.hc-prose > .hc-info.alignwide { max-width: 1240px !important; width: 100%; }
.hc-info a { overflow-wrap: anywhere; }
.hc-info > .wp-block-column { background: #fff; border-top: 4px solid var(--hc-red); padding: 1.6rem 1.8rem; box-shadow: 0 1px 0 #0000000d, 0 18px 40px -24px #0004; }
.hc-info h3 { font-size: 1rem !important; letter-spacing: .2em; color: var(--hc-red); margin: 0 0 .7rem; }
.hc-info p { margin-top: 0; }

/* ---- footer: a giant outlined wordmark along the bottom ---- */
.hc-footer { position: relative; overflow: hidden; }
.hc-footer a { color: #fff; text-decoration: none; transition: color .2s; }
.hc-footer a:hover { color: var(--hc-red); }
.hc-footer h4 { font-size: .95rem !important; letter-spacing: .22em; color: var(--wp--preset--color--steel); }
.hc-bigmark { margin-top: 2.5rem !important; margin-left: max(0px, calc((100% - 1240px) / 2)) !important; margin-bottom: 0 !important; max-width: none !important; font-family: var(--wp--preset--font-family--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(5rem, 19vw, 17rem); line-height: .78; letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1.5px #ffffff26; white-space: nowrap;
  user-select: none; }

@keyframes hc-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes hc-slide { to { transform: translateX(-50%); } }
@keyframes hc-stripe { to { transform: skewX(-14deg) translateX(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .hc-hero::before { transform: skewX(-14deg); } }

@media (max-width: 900px) {
  .hc-grid { grid-template-columns: 1fr; }
  .hc-grid > .hc-card:first-child { grid-row: auto; min-height: 460px; }
  .hc-hero::before { left: 72%; width: 90px; }
}
@media (max-width: 781px) {
  .hc-phone { display: none; }
  .hc-card { min-height: 300px; }
  .hc-card::before { font-size: 4.5rem; }
  .hc-hero { min-height: 660px !important; }
  .hc-hero .wp-block-cover__inner-container > h1 { max-width: none; font-size: clamp(2.6rem, 12.5vw, 3.6rem) !important; }
  .hc-hero { padding-left: 1.1rem !important; padding-right: 1.1rem !important; }
  .hc-pagehead::after { right: -30px; width: 80px; }
  .hc-wordmark a { font-size: 1.35rem; }
}
