/* TradeYoke case study: real product visuals and the TradeYoke identity.
   Colours are TradeYoke's own design tokens (tradeyoke.com/css/tokens.css):
   primary #1E6FD9, primary ink #1457b0, on-ink #7fc0ff, ink #0b1f33, text #1c2128,
   warning #D98A1E, and the per-trade colours (window cleaning #1E6FD9, gardening #2E9E4F,
   electrician #7C3AED, plumber #0891B2, solar installer #EA580C).
   Type follows tradeyoke.com: 'Helvetica Neue', Helvetica, Arial, system-ui.
   Device frames come from /css/device-frames.css (dvc-). */

.cty-page {
    --cty-blue: #1E6FD9;
    --cty-blue-ink: #1457b0;
    --cty-onink: #7fc0ff;
    --cty-ink: #0b1f33;
    --cty-text: #1c2128;
    --cty-muted: #57606a;
    --cty-amber: #D98A1E;
    --cty-wc: #1E6FD9;
    --cty-gd: #2E9E4F;
    --cty-el: #7C3AED;
    --cty-pl: #0891B2;
    --cty-so: #EA580C;
    --cty-font: 'Helvetica Neue', Helvetica, Arial, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    overflow-x: clip;
}

/* ---------- Hero: TradeYoke's ink gradient, text left, devices right ---------- */
.cty-page .ty-hero {
    background: linear-gradient(160deg, rgb(5, 39, 103) 0%, #0b1f33 55%, #3a0647 120%);
    padding-bottom: 0;
}
.cty-page .ty-hero::before {
    background-image: linear-gradient(rgba(127, 192, 255, 0.06) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(127, 192, 255, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
}

.cty-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}
.cty-hero-grid > * { min-width: 0; }

@media (max-width: 991px) {
    .cty-hero-grid { grid-template-columns: minmax(0, 1fr); }
}

.cty-logo {
    display: block;
    width: 148px;
    height: auto;
    margin-bottom: 22px;
}

.cty-hero-devices {
    margin: 0 auto;
    width: 100%;
    max-width: 640px;
}
.cty-stage {
    position: relative;
    padding-bottom: 9%;
}
.cty-hero-devices .dvc-browser { --dvc-w: 88%; }
.cty-hero-devices .dvc-phone {
    position: absolute;
    right: 0;
    bottom: 0;
    --dvc-w: 26%;
    --dvc-ratio: 9 / 20;
    --dvc-edge: #5a6577;
}
.cty-hero-devices figcaption {
    margin-top: 14px;
    color: #9fb0c0;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Per-trade "van livery" band along the foot of the hero */
.cty-livery {
    height: 8px;
    margin-top: 56px;
    background: linear-gradient(90deg,
        var(--cty-wc) 0 20%, var(--cty-gd) 20% 40%, var(--cty-el) 40% 60%,
        var(--cty-pl) 60% 80%, var(--cty-so) 80% 100%);
}

/* Buttons in TradeYoke's own style */
.cty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-family: var(--cty-font);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cty-btn--primary { background: var(--cty-blue); color: #fff !important; border: 1px solid var(--cty-blue); }
.cty-btn--primary:hover, .cty-btn--primary:focus-visible { background: var(--cty-blue-ink); border-color: var(--cty-blue-ink); }
.cty-btn--ghost { border: 1px solid rgba(255, 255, 255, 0.5); color: #fff !important; }
.cty-btn--ghost:hover, .cty-btn--ghost:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.cty-btn--quiet { border: 1px solid rgba(255, 255, 255, 0.25); color: #e6edf3 !important; }
.cty-btn--quiet:hover, .cty-btn--quiet:focus-visible { border-color: rgba(255, 255, 255, 0.6); }
.cty-btn:focus-visible { outline: 3px solid var(--cty-onink); outline-offset: 2px; }
.cty-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.cty-actions .cty-btn { padding: 10px 18px; font-size: 0.92rem; }

/* ---------- Existing sections: trades accents ---------- */
.cty-page .ty-card { border-top: 4px solid var(--cty-accent, var(--cty-blue)); }
.cty-page .ty-grid > :nth-child(5n+1) { --cty-accent: var(--cty-wc); }
.cty-page .ty-grid > :nth-child(5n+2) { --cty-accent: var(--cty-gd); }
.cty-page .ty-grid > :nth-child(5n+3) { --cty-accent: var(--cty-el); }
.cty-page .ty-grid > :nth-child(5n+4) { --cty-accent: var(--cty-pl); }
.cty-page .ty-grid > :nth-child(5n+5) { --cty-accent: var(--cty-so); }
.cty-page a.ty-card:hover, .cty-page a.ty-card:focus-visible { box-shadow: 0 10px 28px -12px rgba(11, 31, 51, 0.35); }

/* ---------- The platform, on screen (gallery) ---------- */
.cty-gallery-intro { max-width: 800px; }

.cty-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    margin-top: 40px;
}
.cty-feature > * { min-width: 0; }
.cty-feature .dvc-laptop { --dvc-ratio: 16 / 10; }
.cty-feature h3 {
    font-family: var(--cty-font);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cty-text);
    margin: 0 0 10px;
}
.cty-feature p { color: var(--cty-muted); font-size: 0.95rem; line-height: 1.7; margin: 0; }
@media (max-width: 860px) {
    .cty-feature { grid-template-columns: minmax(0, 1fr); }
}

.cty-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 26px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
}
@media (max-width: 1100px) { .cty-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cty-gallery { grid-template-columns: minmax(0, 1fr); } }

.cty-shot { margin: 0; }
.cty-shot .dvc-browser { --dvc-shadow: 0 18px 30px -18px rgba(11, 31, 51, 0.45); }
.cty-shot figcaption {
    margin-top: 14px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--cty-muted);
}
.cty-shot figcaption b {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cty-text);
    font-size: 0.95rem;
    margin-bottom: 3px;
}
.cty-shot figcaption b::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--cty-dot, var(--cty-blue));
    flex: none;
}

.cty-livesite {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}
.cty-livesite .cty-btn--outline {
    border: 1px solid var(--cty-blue-ink);
    color: var(--cty-blue-ink) !important;
}
.cty-livesite .cty-btn--outline:hover, .cty-livesite .cty-btn--outline:focus-visible { background: #eaf2fd; }

/* ---------- Squeegee Rush band ---------- */
.cty-page .ty-demo-band {
    background: linear-gradient(160deg, rgb(5, 39, 103) 0%, #0b1f33 60%, #3a0647 130%);
}
.cty-page .ty-demo-band::after {
    background: radial-gradient(ellipse, rgba(30, 111, 217, 0.28) 0%, transparent 70%);
}
.cty-band-shot {
    position: relative;
    z-index: 1;
    flex: 0 1 340px;
    min-width: 0;
    width: 100%;
    max-width: 340px;
}
@media (max-width: 700px) { .cty-band-shot { flex-basis: 100%; max-width: 420px; } }
@media (max-width: 480px) {
    .cty-page .ty-demo-band { padding: 28px 20px; }
    .cty-page .ty-demo-band .txt { min-width: 0; flex-basis: 100%; }
    .cty-page .ty-play-btn { padding-left: 24px; padding-right: 24px; }
}

/* ---------- Phones, tablets and touch ---------- */
.cty-page { overflow-wrap: break-word; }
@media (pointer: coarse) {
    .cty-btn, .cty-actions .cty-btn { min-height: 44px; justify-content: center; }
}
@media (max-width: 479px) {
    .cty-actions .cty-btn, .cty-livesite .cty-btn { width: 100%; justify-content: center; text-align: center; }
    .cty-page .ty-demo-band .act, .cty-page .ty-play-btn { width: 100%; }
    .cty-page .ty-play-btn { text-align: center; }
}
/* No hover on touch: the play button's pressed-down hover state would stick after a tap. */
@media (hover: none) {
    .cty-page .ty-play-btn:hover { transform: none; box-shadow: 0 6px 0 #92400e, 0 14px 34px rgba(245, 158, 11, 0.4); }
}

@media (prefers-reduced-motion: reduce) {
    .cty-btn { transition: none; }
    .cty-page .ty-play-btn { transition: none; }
}
