/* =====================================================================
   QuickTie site design system (redesign proposal)
   Tokens + a small set of composable classes, prefixed `qs-` so they sit
   beside Bootstrap/Phoenix and the tw- Tailwind utilities without clashes.
   Page-specific layout lives in each component's .razor.css.
   ===================================================================== */

:root {
    --qs-teal: #00808a; /* a shade under the logo teal (#009aa6) so white on teal and teal on white both reach 4.5:1 */
    --qs-teal-700: #0c6268;
    --qs-teal-50: #e6f6f7;
    --qs-red: #9e3039;
    --qs-red-600: #b03640;
    --qs-ink: #0f1c24;
    --qs-ink-2: #3b4a54;
    --qs-muted: #6b7a85;
    --qs-line: #e3e8ec;
    --qs-bg: #ffffff;
    --qs-bg-soft: #f5f8fa;
    --qs-card: #ffffff;
    --qs-radius: 18px;
    --qs-radius-sm: 12px;
    --qs-shadow: 0 1px 2px rgb(15 28 36 / 0.04), 0 8px 24px rgb(15 28 36 / 0.06);
    --qs-shadow-lg: 0 24px 60px rgb(15 28 36 / 0.14);
    --qs-max: 1240px;
    --qs-header-h: 106px;
    --qs-font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-bs-theme="dark"] {
    --qs-ink: #eef3f6;
    --qs-ink-2: #c4cfd6;
    --qs-muted: #8c9aa4;
    --qs-line: #253540;
    --qs-bg: #0b141a;
    --qs-bg-soft: #101d25;
    --qs-card: #12212b;
    --qs-teal-50: #0f2e33;
    --qs-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
}

.qs-site {
    font-family: var(--qs-font);
    color: var(--qs-ink);
    background: var(--qs-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.qs-site main { flex: 1; padding-top: var(--qs-header-h); }
/* app.css still pads .content for the old 5rem navbar with !important; clear the full fixed header instead. */
.qs-site > main.content { padding: var(--qs-header-h) 0 0 !important; }
.qs-site a { color: inherit; }
.qs-site h1, .qs-site h2, .qs-site h3, .qs-site h4 { color: var(--qs-ink); font-weight: 700; letter-spacing: -0.015em; }

/* ---------- Layout ---------- */
.qs-container { width: 100%; max-width: var(--qs-max); margin-inline: auto; padding-inline: 20px; }
.qs-section { padding-block: clamp(48px, 7vw, 88px); }
.qs-section--soft { background: var(--qs-bg-soft); }
.qs-section--tight { padding-block: clamp(32px, 4vw, 48px); }
.qs-grid { display: grid; gap: 20px; }
.qs-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.qs-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.qs-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
/* auto-fill keeps empty tracks, so one or two results stay card-sized instead of stretching across the row. */
.qs-grid--tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.qs-stack { display: flex; flex-direction: column; gap: 12px; }
.qs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.qs-spread { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }

/* ---------- Type ---------- */
.qs-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--qs-teal);
}
.qs-h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.05; margin: 0; }
.qs-h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12; margin: 6px 0 0; }
.qs-h3 { font-size: 1.15rem; line-height: 1.3; margin: 0; }
.qs-lead { font-size: 1.12rem; line-height: 1.6; color: var(--qs-ink-2); max-width: 62ch; margin: 0; }
.qs-muted { color: var(--qs-muted); }
.qs-small { font-size: 0.875rem; }

/* ---------- Buttons ---------- */
.qs-btn {
    --_bg: var(--qs-ink); --_fg: #fff; --_bd: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 22px; border-radius: 999px; border: 1px solid var(--_bd);
    background: var(--_bg); color: var(--_fg) !important; font-weight: 600; font-size: 0.97rem;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.qs-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgb(15 28 36 / 0.16); }
.qs-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.qs-btn--red { --_bg: var(--qs-red); }
.qs-btn--red:hover { --_bg: var(--qs-red-600); }
.qs-btn--teal { --_bg: var(--qs-teal); }
.qs-btn--ghost { --_bg: transparent; --_fg: var(--qs-ink); --_bd: var(--qs-line); }
.qs-btn--glass { --_bg: rgb(255 255 255 / 0.12); --_bd: rgb(255 255 255 / 0.3); backdrop-filter: blur(8px); }
.qs-btn--sm { padding: 8px 14px; font-size: 0.87rem; }
.qs-btn--block { width: 100%; }

.qs-link { color: var(--qs-teal) !important; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.qs-link:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.qs-card {
    background: var(--qs-card); border: 1px solid var(--qs-line); border-radius: var(--qs-radius);
    box-shadow: var(--qs-shadow); padding: 24px; position: relative;
}
.qs-card--flat { box-shadow: none; }
.qs-card--hover { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; text-decoration: none; display: block; }
.qs-card--hover:hover { transform: translateY(-3px); box-shadow: var(--qs-shadow-lg); border-color: color-mix(in srgb, var(--qs-teal) 40%, var(--qs-line)); }

.qs-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none;
    background: var(--qs-teal-50); color: var(--qs-teal); font-size: 1.1rem;
}
.qs-icon--red { background: color-mix(in srgb, var(--qs-red) 10%, transparent); color: var(--qs-red); }
.qs-icon--lg { width: 56px; height: 56px; font-size: 1.35rem; border-radius: 16px; }

/* ---------- Chips, badges ---------- */
.qs-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--qs-line); background: var(--qs-card); color: var(--qs-ink-2);
    font-size: 0.9rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: all 0.15s ease;
}
.qs-chip:hover { border-color: var(--qs-teal); color: var(--qs-teal); }
.qs-chip.is-active { background: var(--qs-ink); border-color: var(--qs-ink); color: #fff; }
.qs-chip .qs-count { font-size: 0.75rem; opacity: 0.7; }

.qs-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; background: var(--qs-teal-50); color: var(--qs-teal-700);
}
.qs-badge--red { background: color-mix(in srgb, var(--qs-red) 10%, transparent); color: var(--qs-red); }
.qs-badge--muted { background: var(--qs-bg-soft); color: var(--qs-muted); }

/* ---------- Forms ---------- */
.qs-field { display: flex; flex-direction: column; gap: 6px; }
.qs-field label { font-size: 0.85rem; font-weight: 600; color: var(--qs-ink-2); }
.qs-input, .qs-site .qs-input {
    width: 100%; padding: 12px 14px; border-radius: var(--qs-radius-sm); border: 1px solid var(--qs-line);
    background: var(--qs-card); color: var(--qs-ink); font: inherit; font-size: 0.98rem; outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.qs-input:focus { border-color: var(--qs-teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--qs-teal) 15%, transparent); }
textarea.qs-input { min-height: 120px; resize: vertical; }
/* The native arrow sits flush against the border; draw our own chevron with room beside it. */
select.qs-input, .qs-site select.qs-input {
    appearance: none; padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%237d8b95' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}
.qs-site .validation-message { color: var(--qs-red); font-size: 0.82rem; }

.qs-search {
    display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: 999px;
    background: var(--qs-card); border: 1px solid var(--qs-line); box-shadow: var(--qs-shadow);
}
.qs-search i { color: var(--qs-muted); }
.qs-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.02rem; color: var(--qs-ink); padding: 10px 0; }

/* ---------- Page hero (inner pages) ---------- */
.qs-hero {
    position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(1200px 500px at 85% -10%, rgb(255 255 255 / 0.16), transparent 60%),
                linear-gradient(135deg, var(--qs-teal) 0%, var(--qs-teal-700) 100%);
    padding-block: clamp(48px, 7vw, 84px);
}
.qs-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%);
}
.qs-hero > * { position: relative; z-index: 1; }
.qs-hero h1, .qs-hero .qs-h1 { color: #fff; }
.qs-hero .qs-lead { color: rgb(255 255 255 / 0.88); }
.qs-hero .qs-eyebrow { color: #bff3f6; }
.qs-hero--dark { background: radial-gradient(900px 400px at 80% 0%, rgb(0 154 166 / 0.35), transparent 60%), #0b1a21; }


/* ---------- Stats ---------- */
.qs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: var(--qs-card); border: 1px solid var(--qs-line); border-radius: var(--qs-radius); box-shadow: var(--qs-shadow-lg); overflow: hidden; }
.qs-stat { padding: 22px 20px; text-align: center; }
.qs-stat + .qs-stat { border-left: 1px solid var(--qs-line); }
.qs-stat strong { display: block; font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--qs-teal); line-height: 1; }
.qs-stat span { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--qs-muted); font-weight: 500; }
@media (max-width: 640px) { .qs-stat + .qs-stat { border-left: 0; border-top: 1px solid var(--qs-line); } }

/* ---------- Product tile ---------- */
.qs-product { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 18px; }
.qs-product__media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--qs-bg-soft); border-radius: var(--qs-radius-sm); padding: 14px; }
.qs-product__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.qs-product h3 { font-size: 1.02rem; margin: 0; }
.qs-product p { font-size: 0.88rem; color: var(--qs-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qs-product__foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- CTA band ---------- */
.qs-cta {
    border-radius: var(--qs-radius); padding: clamp(28px, 5vw, 48px); color: #fff;
    background: radial-gradient(600px 300px at 90% 10%, rgb(255 255 255 / 0.18), transparent 60%), linear-gradient(120deg, var(--qs-red) 0%, #6f1f27 100%);
    display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.qs-cta h2 { color: #fff; margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.qs-cta p { margin: 6px 0 0; color: rgb(255 255 255 / 0.85); max-width: 56ch; }
.qs-cta .qs-btn:not(.qs-btn--glass) { --_bg: #fff; --_fg: var(--qs-red); }

/* ---------- Steps / progress ---------- */
.qs-steps { display: flex; gap: 8px; counter-reset: step; }
.qs-step { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 0.88rem; font-weight: 600; color: var(--qs-muted); }
.qs-step::before {
    counter-increment: step; content: counter(step);
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
    border: 2px solid var(--qs-line); background: var(--qs-card); font-size: 0.85rem;
}
.qs-step::after { content: ""; flex: 1; height: 2px; background: var(--qs-line); }
.qs-step:last-child::after { display: none; }
@media (max-width: 560px) {
    /* Four labels and their connectors don't fit a phone: drop the connectors and let labels wrap. */
    .qs-steps { gap: 6px; }
    .qs-step { gap: 6px; min-width: 0; font-size: 0.78rem; line-height: 1.2; }
    .qs-step::after { display: none; }

    /* The theme's container pads 8px on phones but its rows pull out 16px (half the 2rem gutter),
       so older Bootstrap pages ran 8px past the screen edge. */
    .qs-site main .container { padding-inline: 1rem; }
}
.qs-step.is-done::before { content: "✓"; background: var(--qs-teal); border-color: var(--qs-teal); color: #fff; }
.qs-step.is-current { color: var(--qs-ink); }
.qs-step.is-current::before { border-color: var(--qs-teal); color: var(--qs-teal); }

.qs-progress { height: 8px; border-radius: 99px; background: var(--qs-line); overflow: hidden; }
.qs-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--qs-teal), #36c2cc); border-radius: inherit; }

/* ---------- Misc ---------- */
.qs-divider { height: 1px; background: var(--qs-line); border: 0; margin: 20px 0; }
.qs-check { display: flex; gap: 10px; align-items: flex-start; }
.qs-check i { color: var(--qs-teal); margin-top: 4px; }
.qs-empty { text-align: center; padding: 48px 20px; color: var(--qs-muted); }
.qs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Custom icons ---------- */
/* Glyphs Font Awesome doesn't have, used like any FA icon (`fa-solid fa-quicktie-cable`): an SVG mask painted in currentColor. */
.fa-quicktie-cable::before {
    content: "";
    display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em;
    background: currentColor;
    -webkit-mask: url("../images/icons/quicktie-cable.svg") center / contain no-repeat;
    mask: url("../images/icons/quicktie-cable.svg") center / contain no-repeat;
}

/* ---------- Document cover (thumbnail or generated) ---------- */
.qs-cover { aspect-ratio: 8.5 / 11; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 40px rgb(15 28 36 / 0.22); background: #fff; }
.qs-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qs-cover--generated {
    display: flex; flex-direction: column; justify-content: space-between; padding: 18px; color: #fff;
    background: radial-gradient(240px 200px at 100% 0%, rgb(255 255 255 / 0.25), transparent 70%), linear-gradient(160deg, var(--qs-teal) 0%, var(--qs-teal-700) 100%);
}
.qs-cover--generated strong { font-size: 1.15rem; line-height: 1.15; }
.qs-cover--generated small { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.qs-cover--generated i { font-size: 2rem; opacity: 0.9; }

/* 3D explorer hotspots: created by ProductExplorer.razor.js for the full explorer and embedded viewers alike. */
.explorer-labels { position: absolute; inset: 0; pointer-events: none; }
.explorer-labels .hotspot {
    position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid #fff; background: var(--qs-teal); color: #fff; font: 700 0.85rem var(--qs-font);
    box-shadow: 0 0 0 6px rgb(0 167 179 / 0.25), 0 6px 14px rgb(0 0 0 / 0.25);
    cursor: pointer; pointer-events: auto; transition: opacity 0.2s, background 0.2s;
}
.explorer-labels .hotspot:hover, .explorer-labels .hotspot.is-active { background: var(--qs-red); box-shadow: 0 0 0 8px rgb(158 48 57 / 0.25), 0 6px 14px rgb(0 0 0 / 0.25); }
/* Phones: a size down, so a dozen markers on a model a few hundred pixels across overlap less and cover less of it. */
@media (max-width: 560px) {
    .explorer-labels .hotspot { left: -12px; top: -12px; width: 24px; height: 24px; font-size: 0.72rem; box-shadow: 0 0 0 4px rgb(0 167 179 / 0.25), 0 4px 10px rgb(0 0 0 / 0.25); }
}
