/*
 * /use-cases. The tiles (.uc-tile) are shared with the homepage's "Many uses"
 * strip and live in styles.css; everything here is this page's alone.
 */

/* ---- Hero ---- */
.uc-hero {
    position: relative;
    padding-top: var(--nav-h);
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 60% at 72% 45%, rgba(255, 140, 0, 0.07) 0%, transparent 65%),
        var(--bg);
}

.uc-hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 5rem 2.5rem 2.5rem;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: center;
}

.uc-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.01em;
    margin-bottom: 1.6rem;
}

.uc-hero-desc {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-muted);
    max-width: 34rem;
    margin-bottom: 2rem;
}

.uc-hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Three renders, the front one turned to show the housing, the two behind
   it square on and set back, so the hero reads as "the same gauge, several
   faces" before a word of it is read. */
.uc-hero-visual {
    position: relative;
    aspect-ratio: 1.15;
    max-width: 560px;
    width: 100%;
    justify-self: center;
}
.uc-hero-visual img { position: absolute; height: auto; }
.uc-hero-front {
    width: 72%;
    left: 14%;
    top: 4%;
    z-index: 2;
    filter: drop-shadow(0 0 50px rgba(255, 140, 0, 0.2));
}
.uc-hero-back {
    width: 44%;
    top: 30%;
    opacity: 0.55;
    filter: blur(0.5px) brightness(0.8);
}
.uc-hero-back--l { left: -4%; }
.uc-hero-back--r { right: -4%; }

/* A row of chips under the hero: every use case one tap away, which also
   tells a skimmer what the page covers without scrolling it. */
.uc-jump {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2.5rem 3.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.uc-jump a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.uc-jump a:hover,
.uc-jump a:focus-visible {
    color: var(--amber);
    border-color: var(--amber-border-strong);
    background: var(--amber-faint);
}

/* ---- Sections ---- */
.uc-section { position: relative; }
.uc-section--alt { background: var(--bg-alt); }
.uc-section--alt::before,
.uc-section--alt::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.25), transparent);
}
.uc-section--alt::before { top: 0; }
.uc-section--alt::after { bottom: 0; }

/* Anchored rows land below the fixed nav rather than under it. */
.uc-row, .uc-tile { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }

/* ---- Partner rows ---- */
.uc-rows { display: flex; flex-direction: column; gap: 5.5rem; }

.uc-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 4rem;
    align-items: center;
}
.uc-row--flip .uc-row-media { order: 2; }

.uc-row-media {
    display: block;
    position: relative;
    max-width: 480px;
    width: 100%;
    justify-self: center;
}
.uc-row-media::before {
    content: '';
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.16) 0%, transparent 70%);
    filter: blur(20px);
}
.uc-row-media img {
    position: relative;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}
.uc-row-media:hover img { transform: scale(1.03) rotate(-1deg); }

.uc-eyebrow {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.uc-row-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.8rem;
}
.uc-partner {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--amber);
    border: 1px solid var(--amber-border);
    background: var(--amber-faint);
    border-radius: 2px;
    padding: 0.35rem 0.7rem;
    margin-bottom: 1.3rem;
}
.uc-partner span { color: var(--text); }

.uc-lead {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.uc-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
    display: grid;
    gap: 0.55rem;
}
.uc-points li {
    position: relative;
    padding-left: 1.6rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
}
.uc-points li::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.45em;
    width: 0.7rem;
    height: 0.38rem;
    border-left: 2px solid var(--amber);
    border-bottom: 2px solid var(--amber);
    transform: rotate(-45deg);
}

.uc-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    border-left: 2px solid var(--amber-border-strong);
    padding-left: 0.8rem;
    margin-bottom: 1.4rem;
}

.uc-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }

/* ---- Replace-a-gauge grid ---- */
.uc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

/* ---- Warnings, under the grid ---- */
.uc-warn {
    margin-top: 3.5rem;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2.5rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 2.25rem;
}
.uc-warn-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    margin: 0.3rem 0 0.9rem;
}
.uc-warn-copy > p:not(.overline):not(.uc-links) {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}
.uc-warn-links { align-items: center; }
.uc-warn-links a:not(.btn) { color: var(--amber); font-size: 0.9rem; }
.uc-warn-shots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.uc-warn-shots figure { margin: 0; text-align: center; position: relative; }
.uc-warn-shots figure::before {
    content: '';
    position: absolute;
    inset: 12% 12% 26%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 60, 40, 0.18) 0%, transparent 70%);
    filter: blur(16px);
}
.uc-warn-shots img { position: relative; display: block; width: 100%; height: auto; }
.uc-warn-shots figcaption {
    position: relative;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ---- More ---- */
.uc-more {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.uc-more-card {
    display: block;
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 1.4rem 1.5rem;
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.uc-more-card:hover,
.uc-more-card:focus-visible {
    border-color: var(--amber-border-strong);
    background: var(--bg-card-h);
    transform: translateY(-2px);
}
.uc-more-card h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.uc-more-card p { font-size: 0.88rem; line-height: 1.6; color: var(--text-muted); }

.uc-cta {
    margin-top: 3.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 2rem;
}
.uc-cta p { color: var(--text-muted); font-size: 0.95rem; max-width: 40rem; }
.uc-cta a:not(.btn) { color: var(--amber); }

/* ---- Narrower screens ---- */
@media (max-width: 1000px) {
    .uc-grid, .uc-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .uc-warn { grid-template-columns: 1fr; padding: 1.75rem 1.25rem; gap: 1.75rem; }
    .uc-hero-inner { grid-template-columns: 1fr; padding: 3rem 1rem 1.5rem; gap: 1.5rem; }
    .uc-hero-visual { max-width: 420px; order: -1; }
    .uc-jump { padding: 0 1rem 2.5rem; }
    .uc-row { grid-template-columns: 1fr; gap: 1.5rem; }
    .uc-row--flip .uc-row-media { order: 0; }
    .uc-row-media { max-width: 320px; }
    .uc-rows { gap: 4rem; }
}

@media (max-width: 600px) {
    .uc-grid, .uc-more { grid-template-columns: 1fr; }
    .uc-warn-shots { gap: 0.4rem; }
    .uc-warn-shots figcaption { font-size: 0.68rem; }
    /* Buttons are set in wide capitals and cannot wrap; stacked full width
       they never push the page sideways on a phone. */
    .uc-links .btn, .uc-hero-ctas .btn, .uc-cta .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .uc-row-media img, .uc-more-card { transition: none; }
    .uc-row-media:hover img { transform: none; }
}
