/* #141 — the MARKETING-SITE layer (our own cleverdogdesign.com rebuild).
   Loaded ONLY when the cdd_marketing_site option is set (never on a client
   site). Brand: yellow #FCD21D · orange #FFA94F · grey #333 · Dosis.
   Motion is GPU-only (transform/opacity) and fully disabled under
   prefers-reduced-motion. */

:root {
    --cdd-yellow: #FCD21D;
    --cdd-orange: #FFA94F;
    --cdd-grey:   #333333;
}

/* ---- The chunky brand button (double-outline, from the locked spec) ---- */
.cdd-mkt .wp-block-button__link,
.cdd-btn {
    font-family: 'Dosis', Helvetica, Arial, sans-serif !important;
    font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    background: var(--cdd-yellow) !important; color: var(--cdd-grey) !important;
    border: 2px solid var(--cdd-grey) !important; border-radius: 12px !important;
    box-shadow: 3px 3px 0 var(--cdd-grey);
    padding: .8em 1.6em; text-decoration: none; display: inline-block;
    transition: transform .12s ease, box-shadow .12s ease;
}
.cdd-mkt .wp-block-button__link:hover, .cdd-btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--cdd-grey); }
.cdd-mkt .wp-block-button__link:active, .cdd-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--cdd-grey); }
.cdd-btn--ghost { background: #fff !important; }

/* ---- #144 HEADER CLEARANCE (the #1 defect) ----
   Under the smart header the site header is position:fixed (out of flow),
   and only .cdd-hero/.cdd-page-header carried compensating padding — the
   marketing pages use .cdd-mkt-band, so the header painted over the first
   band on EVERY page. The first section now clears it. No-JS keeps the
   in-flow sticky header, so only the .cdd-js path needs the offset. */
.cdd-js body.cdd-smart-header .cdd-mkt > section:first-child { padding-top: 170px; }

/* ---- #144 STICKY FOOTER (the specials-page "footer 300px too high") ----
   Short pages left the footer floating mid-viewport with raw background
   below. Classic column layout: content stretches, footer sits at the
   bottom on every page height. Marketing-only (this file never loads on a
   client site). */
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > .cdd-site-footer { margin-top: auto; }

/* ---- #144 FOOTER — consistent height + the JS-injected secondary nav ---- */
.cdd-site-footer .cdd-footer-bar { padding-top: 44px; padding-bottom: 44px; align-items: center; }
.cdd-footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.cdd-footer-nav a { text-decoration: none; }

/* ---- Section rhythm ---- */
.cdd-mkt-band { padding: 64px 0; }
.cdd-mkt-band--yellow { background: var(--cdd-yellow); }
.cdd-mkt-band--grey { background: var(--cdd-grey); color: #fff; }
.cdd-mkt-band--soft { background: #fffdf3; }
.cdd-mkt h1, .cdd-mkt h2, .cdd-mkt h3 { text-transform: uppercase; }
.cdd-kicker { color: var(--cdd-orange); font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: .06em; }

/* ---- Cards / tiles ---- */
.cdd-tile { border: 2px solid var(--cdd-grey); border-radius: 16px; padding: 24px; background: #fff; box-shadow: 4px 4px 0 rgba(51,51,51,.12); }
.cdd-tile h3 { margin-top: 0; }

/* ---- Hero mascot: the "silent wave" (asset slot placeholder waves too) ---- */
.cdd-mascot { display: inline-flex; align-items: center; justify-content: center; }
.cdd-mascot .cdd-wave { display: inline-block; transform-origin: 70% 70%; animation: cdd-wave 2.6s ease 2.5s 3; }
@keyframes cdd-wave {
    0%, 60%, 100% { transform: rotate(0); }
    65%, 75%, 85% { transform: rotate(14deg); }
    70%, 80%      { transform: rotate(-7deg); }
}
.cdd-mascot video, .cdd-mascot img { max-width: 100%; height: auto; }

/* ---- #144 HERO READ-IN (load) + VIDEO FADE-IN — silent waves, no CLS ----
   Text children rise in with a soft stagger; videos fade in once decoded
   (the width/height attrs + aspect-ratio reserve the box, so nothing
   shifts). Reduced motion: everything simply visible, videos paused on
   their poster (JS side). */
@media (prefers-reduced-motion: no-preference) {
    .cdd-js .cdd-hero-in > * { opacity: 0; transform: translateY(14px); animation: cdd-in .65s var(--cdd-ease, ease) forwards; }
    .cdd-js .cdd-hero-in > *:nth-child(2) { animation-delay: .12s; }
    .cdd-js .cdd-hero-in > *:nth-child(3) { animation-delay: .24s; }
    .cdd-js .cdd-hero-in > *:nth-child(4) { animation-delay: .36s; }
    .cdd-js .cdd-hero-in > *:nth-child(5) { animation-delay: .48s; }
    .cdd-js .cdd-hero-in > *:nth-child(n+6) { animation-delay: .58s; }
    @keyframes cdd-in { to { opacity: 1; transform: none; } }
    .cdd-js .cdd-video-in video { opacity: 0; transition: opacity .8s ease .1s; }
    .cdd-js .cdd-video-in video.cdd-ready { opacity: 1; }
}
.cdd-mkt-video { width: min(360px, 78vw); aspect-ratio: 1 / 1; }
.cdd-mkt-video video, .cdd-mkt-video img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cdd-band-video { border-radius: 16px; border: 2px solid var(--cdd-grey); overflow: hidden; aspect-ratio: 16 / 9; }
.cdd-band-video video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- #144 CLIENT LOGO STRIP ---- */
.cdd-logo-strip { display: flex; flex-wrap: wrap; gap: 26px 38px; align-items: center; justify-content: center; }
.cdd-logo-strip img { height: 40px; width: auto; max-width: 130px; object-fit: contain; opacity: .8; transition: opacity .2s ease; }
.cdd-logo-strip img:hover { opacity: 1; }

/* ---- #144 WORK TILES (fixed aspect = zero CLS; classy hover lift) ---- */
.cdd-work-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cdd-work-tile { display: block; text-decoration: none; color: var(--cdd-grey); border: 2px solid var(--cdd-grey); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 4px 4px 0 rgba(51,51,51,.12); transition: transform .18s ease, box-shadow .18s ease; }
.cdd-work-tile:hover { transform: translateY(-4px); box-shadow: 6px 8px 0 rgba(51,51,51,.16); }
.cdd-work-tile .cdd-work-shot { aspect-ratio: 4 / 3; background: #f4f4f4; }
.cdd-work-tile img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cdd-work-tile .cdd-work-cap { padding: 12px 16px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cdd-work-tile .cdd-work-cap span:last-child { color: var(--cdd-orange); }

/* ---- #144 HOW-IT-WORKS STEPPER ---- */
.cdd-stepper { position: relative; display: grid; gap: 20px; }
.cdd-stepper::before { content: ''; position: absolute; left: 21px; top: 28px; bottom: 28px; width: 2px; background: var(--cdd-yellow); }
.cdd-stepper .cdd-tile { position: relative; margin-left: 56px; }
.cdd-stepper .cdd-step__num { position: absolute; left: -56px; top: 22px; background: var(--cdd-yellow); z-index: 1; }
@media (max-width: 560px) { .cdd-stepper::before { display: none; } .cdd-stepper .cdd-tile { margin-left: 0; } .cdd-stepper .cdd-step__num { position: static; margin-bottom: 8px; } }

/* ---- Specials promo slot (fixed size so any variant fits) ---- */
.cdd-special { min-height: 150px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.cdd-special-count { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---- Ticket-tape specials ticker ---- */
.cdd-ticker { overflow: hidden; white-space: nowrap; background: var(--cdd-grey); color: var(--cdd-yellow); padding: 10px 0; }
.cdd-ticker__track { display: inline-block; padding-left: 100%; animation: cdd-ticker 28s linear infinite; will-change: transform; }
.cdd-ticker a { color: var(--cdd-yellow); text-decoration: none; font-weight: 700; text-transform: uppercase; margin-right: 64px; }
.cdd-ticker a:hover { color: #fff; }
@keyframes cdd-ticker { from { transform: translate3d(0,0,0); } to { transform: translate3d(-100%,0,0); } }
.cdd-ticker:hover .cdd-ticker__track { animation-play-state: paused; }

/* ---- Engine-fed price grids ---- */
.cdd-price-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cdd-price { font-size: 30px; font-weight: 700; }
.cdd-price small { display: block; font-size: 13px; font-weight: 500; color: #777; }
.cdd-gstline { font-size: 12px; color: #999; }

/* ---- How-it-works steps (micro-interaction on hover) ---- */
.cdd-step { transition: transform .15s ease; }
.cdd-step:hover { transform: translateY(-4px); }
.cdd-step__num { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; background: var(--cdd-yellow); border: 2px solid var(--cdd-grey); align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }

/* ---- FAQ / progressive disclosure (kills the wall of text) ---- */
.cdd-faq details { border: 2px solid var(--cdd-grey); border-radius: 12px; margin-bottom: 10px; background: #fff; }
.cdd-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.cdd-faq summary::-webkit-details-marker { display: none; }
.cdd-faq summary::after { content: 'ⓘ'; color: var(--cdd-orange); font-size: 20px; transition: transform .15s ease; }
.cdd-faq details[open] summary::after { content: '▴'; }
.cdd-faq details > div { padding: 0 18px 16px; }

/* ---- Scroll reveal (marketing pages; once per section) ---- */
@media (prefers-reduced-motion: no-preference) {
    .cdd-mkt [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
    .cdd-mkt [data-reveal].cdd-in { opacity: 1; transform: none; }
}

/* ---- Reduced motion: everything still, everything readable ---- */
@media (prefers-reduced-motion: reduce) {
    .cdd-ticker__track { animation: none; padding-left: 0; }
    .cdd-mascot .cdd-wave { animation: none; }
    .cdd-mkt .wp-block-button__link, .cdd-btn, .cdd-step { transition: none; }
}

/* ---- #144 hero grid: text + media side-by-side from 880px ---- */
@media (min-width: 880px) {
    .cdd-hero-grid { grid-template-columns: 1fr auto !important; }
}

/* ---- #144 header logo: readable size on the marketing site ---- */
.cdd-site-header .wp-block-site-logo img { max-height: 58px; }
