/* ─────────────────────────────────────────────────────────────────────────
   Public site — Web Design showcase
   Hero · filter pills · alternating case studies with angled device mockups
   and an internally-scrollable preview of the full-length screenshot.

   Relies on tokens declared in branding-andmore-design.css. Falls back
   gracefully on browsers without 3D transforms (the tilt simply doesn't
   apply — content is still legible).
   ──────────────────────────────────────────────────────────────────────── */

/* ── Hero ───────────────────────────────────────────────────────────────── */
.webdesign-showcase .wd-hero {
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--am-border-soft, rgba(255,255,255,.08));
    position: relative;
    overflow: hidden;
}
.webdesign-showcase .wd-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 60% at 90% 10%, rgba(203,191,176,.06) 0%, transparent 70%),
        radial-gradient(40% 60% at 0% 100%, rgba(203,191,176,.04) 0%, transparent 70%);
    pointer-events: none;
}
.webdesign-showcase .wd-hero__eyebrow {
    font-family: var(--am-font-sub, sans-serif);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .72rem;
    color: var(--am-text-muted, #888);
    margin-bottom: .5rem;
}
.webdesign-showcase .wd-hero__title {
    font-family: var(--am-font-heading, serif);
    font-weight: 300;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.05;
    margin: 0 0 1rem;
    color: var(--am-base, #fff);
}
.webdesign-showcase .wd-hero__lead {
    max-width: 56ch;
    color: var(--am-text, #ccc);
    font-size: 1.05rem;
    line-height: 1.6;
}
.webdesign-showcase .wd-hero__meta {
    display: flex;
    gap: 2.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.webdesign-showcase .wd-hero__metric {
    font-family: var(--am-font-heading, serif);
    font-size: 3rem;
    line-height: 1;
    color: var(--am-base, #fff);
}
.webdesign-showcase .wd-hero__metric-label {
    font-family: var(--am-font-sub, sans-serif);
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--am-text-muted, #888);
}

/* ── Filter pills ───────────────────────────────────────────────────────── */
.webdesign-showcase .wd-filters {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--am-border-soft, rgba(255,255,255,.06));
    position: sticky;
    top: 0;
    z-index: 5;
    background: color-mix(in srgb, var(--am-bg, #161c18) 92%, transparent);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.webdesign-showcase .wd-filters__scroll {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: .25rem;
}
.webdesign-showcase .wd-filters__scroll::-webkit-scrollbar { display: none; }

.webdesign-showcase .wd-pill {
    flex-shrink: 0;
    border: 1px solid var(--am-border, rgba(255,255,255,.15));
    background: transparent;
    color: var(--am-text, #ccc);
    padding: .5rem 1rem;
    border-radius: var(--am-radius-pill, 999px);
    font-family: var(--am-font-sub, sans-serif);
    font-size: .82rem;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.webdesign-showcase .wd-pill:hover {
    border-color: var(--am-base, #fff);
    color: var(--am-base, #fff);
}
.webdesign-showcase .wd-pill.is-active {
    background: var(--am-base, #fff);
    color: var(--am-contrast, #111);
    border-color: var(--am-base, #fff);
}
.webdesign-showcase .wd-pill__count {
    font-size: .7rem;
    opacity: .7;
    background: rgba(0,0,0,.15);
    border-radius: var(--am-radius-pill, 999px);
    padding: .05rem .45rem;
}
.webdesign-showcase .wd-pill.is-active .wd-pill__count {
    background: rgba(0,0,0,.12);
    opacity: .9;
}

/* ── Cases ──────────────────────────────────────────────────────────────── */
.webdesign-showcase .wd-cases {
    padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
}
.webdesign-showcase .wd-case {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    padding: clamp(2rem, 5vw, 4rem) 0;
    border-bottom: 1px solid var(--am-border-soft, rgba(255,255,255,.06));
}
.webdesign-showcase .wd-case:last-of-type { border-bottom: none; }

.webdesign-showcase .wd-case.is-right .wd-case__visual { order: 2; }
.webdesign-showcase .wd-case.is-right .wd-case__copy   { order: 1; }

@media (max-width: 900px) {
    .webdesign-showcase .wd-case {
        grid-template-columns: 1fr;
    }
    .webdesign-showcase .wd-case.is-right .wd-case__visual,
    .webdesign-showcase .wd-case.is-right .wd-case__copy {
        order: unset;
    }
}

/* ── Copy column ────────────────────────────────────────────────────────── */
.webdesign-showcase .wd-case__type {
    font-family: var(--am-font-sub, sans-serif);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .72rem;
    color: var(--am-text-muted, #888);
    margin: 0 0 .75rem;
}
.webdesign-showcase .wd-case__title {
    font-family: var(--am-font-heading, serif);
    font-weight: 300;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.1;
    margin: 0 0 .5rem;
}
.webdesign-showcase .wd-case__title a {
    color: var(--am-base, #fff);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-size: 0 1px;
    background-repeat: no-repeat;
    transition: background-size .35s ease;
}
.webdesign-showcase .wd-case__title a:hover {
    background-size: 100% 1px;
}
.webdesign-showcase .wd-case__client {
    color: var(--am-text-muted, #888);
    font-size: .9rem;
    margin: 0 0 1rem;
}
.webdesign-showcase .wd-case__desc {
    color: var(--am-text, #ccc);
    line-height: 1.7;
    margin: 0 0 1.5rem;
}
.webdesign-showcase .wd-case__actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.webdesign-showcase .wd-case__link {
    font-family: var(--am-font-sub, sans-serif);
    text-decoration: none;
    font-size: .9rem;
    letter-spacing: .04em;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--am-text-muted, #888);
    transition: gap .25s ease, color .25s ease;
}
.webdesign-showcase .wd-case__link:hover {
    color: var(--am-base, #fff);
    gap: .8rem;
}

/* ── Mockup cluster ─────────────────────────────────────────────────────── */
.webdesign-showcase .wd-case__visual {
    position: relative;
    min-height: 320px;
}
/* Ambient gold glow behind the mockup cluster (brand secondary —
   --am-photo-gold). Sits in the centre of the visual area and grows
   on hover to feel like the device is being spotlit from behind. */
.webdesign-showcase .wd-case__visual::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 70%;
    height: 70%;
    transform: translate(-50%, -50%) scale(.85);
    background: radial-gradient(
        ellipse at center,
        var(--am-photo-gold, #C9A96E) 0%,
        rgba(201, 169, 110, .35) 35%,
        transparent 70%
    );
    opacity: .25;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}
.webdesign-showcase .wd-case:hover .wd-case__visual::before {
    /* Hand off to a looping pulse on hover. The animation overrides the
       opacity/transform set above and breathes between two intensities,
       making the spotlight feel alive while the cursor lingers. */
    animation: wd-glow-pulse 2.8s ease-in-out infinite;
}

@keyframes wd-glow-pulse {
    0%, 100% {
        opacity: .45;
        transform: translate(-50%, -50%) scale(.95);
    }
    50% {
        opacity: .7;
        transform: translate(-50%, -50%) scale(1.12);
    }
}

.webdesign-showcase .wd-mockup {
    position: relative;
    perspective: 1200px;             /* lower value → stronger depth */
    perspective-origin: 50% 50%;
    transform-style: preserve-3d;
    z-index: 1;
}

/* Devices use 3D rotation only. Rotation alternates per case side so each
   cluster faces toward the copy column. A shared, smooth ease-out-quint
   curve keeps desktop + mobile moving in sync during hover. */

/* Shared timing for everything that animates on hover. easeOutQuint:
   a fast start that decelerates smoothly to a stop — feels organic. */
.webdesign-showcase .wd-device--desktop,
.webdesign-showcase .wd-device--mobile,
.webdesign-showcase .wd-browser,
.webdesign-showcase .wd-phone,
.webdesign-showcase .wd-case__visual::before {
    transition:
        transform   .85s cubic-bezier(.22, 1, .36, 1),
        box-shadow  .85s cubic-bezier(.22, 1, .36, 1),
        opacity     .85s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}

/* Desktop frame — default (.is-left): visible face angled toward right (text) */
.webdesign-showcase .wd-device--desktop {
    transform: rotateY(22deg) rotateX(8deg);
    transform-origin: 40% 50%;
}
.webdesign-showcase .wd-case:hover .wd-device--desktop {
    transform: rotateY(14deg) rotateX(5deg);
}

/* Desktop frame — mirrored on .is-right: visible face angles toward left (text) */
.webdesign-showcase .is-right .wd-device--desktop {
    transform: rotateY(-22deg) rotateX(8deg);
    transform-origin: 60% 50%;
}
.webdesign-showcase .wd-case.is-right:hover .wd-device--desktop {
    transform: rotateY(-14deg) rotateX(5deg);
}

/* Mobile frame — default: bottom-right corner of the desktop */
.webdesign-showcase .wd-device--mobile {
    position: absolute;
    right: 4%;
    bottom: -4%;
    width: 18%;
    min-width: 90px;
    max-width: 160px;
    z-index: 2;
    transform: rotateY(18deg) rotateX(6deg) translateZ(110px);
    transform-origin: 50% 100%;
}
.webdesign-showcase .wd-case:hover .wd-device--mobile {
    transform: rotateY(12deg) rotateX(4deg) translateZ(120px) translateY(-6px);
}

/* Mobile frame — mirrored on .is-right: jumps to bottom-LEFT corner and
   flips its tilt to match the desktop's mirrored rotation. */
.webdesign-showcase .is-right .wd-device--mobile {
    right: auto;
    left: 4%;
    transform: rotateY(-18deg) rotateX(6deg) translateZ(110px);
}
.webdesign-showcase .wd-case.is-right:hover .wd-device--mobile {
    transform: rotateY(-12deg) rotateX(4deg) translateZ(120px) translateY(-6px);
}

/* ── Browser chrome ─────────────────────────────────────────────────────── */
.webdesign-showcase .wd-browser {
    background: #1c1f24;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 30px 60px -20px rgba(0,0,0,.55),
        0 20px 30px -10px rgba(0,0,0,.35),
        0 0 0 1px rgba(255,255,255,.04) inset,
        0 0 0 rgba(201, 169, 110, 0);
}
.webdesign-showcase .wd-case:hover .wd-browser {
    box-shadow:
        0 30px 60px -20px rgba(0,0,0,.55),
        0 20px 30px -10px rgba(0,0,0,.35),
        0 0 0 1px rgba(201, 169, 110, .25) inset,
        0 0 80px -10px rgba(201, 169, 110, .45);
}
.webdesign-showcase .wd-browser__bar {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .8rem;
    background: linear-gradient(180deg, #2a2e34 0%, #22262b 100%);
    border-bottom: 1px solid rgba(0,0,0,.4);
}
.webdesign-showcase .wd-browser__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,.2) inset;
}
.webdesign-showcase .wd-browser__url {
    margin-left: auto;
    margin-right: auto;
    background: rgba(0,0,0,.35);
    border-radius: 4px;
    padding: .15rem .7rem;
    font-family: var(--am-font-sub, sans-serif);
    font-size: .72rem;
    color: rgba(255,255,255,.65);
    max-width: 60%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.webdesign-showcase .wd-browser__url i { font-size: .65rem; margin-right: .3rem; opacity: .6; }

/* Screen container — fixed aspect, inner image scrolls */
.webdesign-showcase .wd-screen {
    position: relative;
    background: #0f1114;
    aspect-ratio: 16 / 10;
}
.webdesign-showcase .wd-screen--phone { aspect-ratio: 9 / 19.5; }

.webdesign-showcase .wd-screen__scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
    -webkit-overflow-scrolling: touch;
}
.webdesign-showcase .wd-screen__scroll::-webkit-scrollbar { width: 6px; }
.webdesign-showcase .wd-screen__scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18);
    border-radius: 3px;
}
.webdesign-showcase .wd-screen__scroll::-webkit-scrollbar-track { background: transparent; }

.webdesign-showcase .wd-screen__scroll img {
    display: block;
    width: 100%;
    height: auto;
    /* full-length screenshots overflow vertically — that's the point */
}

.webdesign-showcase .wd-screen__scroll:focus-visible {
    outline: 2px solid var(--am-base, #fff);
    outline-offset: -2px;
}

/* Scroll hint pill — always opposite to the mobile so it stays visible.
   Default cases (.is-left): mobile bottom-right → hint bottom-left.
   Mirrored cases (.is-right): mobile bottom-left → hint bottom-right
   (override below). */
.webdesign-showcase .wd-screen__hint {
    position: absolute;
    left: .7rem;
    right: auto;
    bottom: .7rem;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-family: var(--am-font-sub, sans-serif);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .25rem .55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .35s ease, transform .35s ease;
}
.webdesign-showcase .wd-case:hover .wd-screen__hint,
.webdesign-showcase .wd-screen__scroll:focus-within ~ .wd-screen__hint {
    opacity: 1;
    transform: translateY(0);
}

/* On .is-right cases the mobile sits bottom-left, so the hint hops to the
   opposite corner (bottom-right) to stay out of its way. */
.webdesign-showcase .is-right .wd-screen__hint {
    left: auto;
    right: .7rem;
}

/* ── Phone chrome ──────────────────────────────────────────────────────── */
/* Whole phone gets the iPhone-like 9:19.5 aspect; the screen fills inside the
   thin uniform bezel so proportions stay correct at any width. */
.webdesign-showcase .wd-phone {
    position: relative;
    box-sizing: border-box;             /* aspect-ratio includes padding */
    aspect-ratio: 9 / 19.5;
    background: #0d0e10;
    border-radius: 14% / 6.5%;          /* matches iPhone corner radius scaling */
    padding: 5px;
    box-shadow:
        0 40px 60px -20px rgba(0,0,0,.75),
        0 25px 40px -15px rgba(0,0,0,.55),
        0 0 0 1px rgba(255,255,255,.06) inset,    /* outer rim highlight   */
        0 0 0 2px rgba(0,0,0,.6)        inset,    /* depth between bezels  */
        0 0 0 rgba(201, 169, 110, 0);
}
.webdesign-showcase .wd-case:hover .wd-phone {
    box-shadow:
        0 40px 60px -20px rgba(0,0,0,.75),
        0 25px 40px -15px rgba(0,0,0,.55),
        0 0 0 1px rgba(201, 169, 110, .35) inset,
        0 0 0 2px rgba(0,0,0,.6)        inset,
        0 0 50px -5px  rgba(201, 169, 110, .55);
}
.webdesign-showcase .wd-phone .wd-screen {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;                  /* the phone already sets the ratio */
    border-radius: 12% / 5.5%;
    overflow: hidden;
    background: #0f1114;
}

/* Dynamic-island style notch — floats over the screen, near the top */
.webdesign-showcase .wd-phone__notch {
    position: absolute;
    top: 3.5%;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    height: 2.5%;
    min-height: 14px;
    background: #0d0e10;
    border-radius: 999px;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* Home indicator — on the screen, near the bottom */
.webdesign-showcase .wd-phone__bar {
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    height: 4px;
    background: rgba(255,255,255,.55);
    border-radius: 999px;
    z-index: 3;
    pointer-events: none;
}

/* ── Placeholder when neither image exists ──────────────────────────────── */
.webdesign-showcase .wd-mockup__placeholder {
    aspect-ratio: 16 / 10;
    background: var(--am-bg-alt, #1e2420);
    border: 1px dashed var(--am-border, rgba(255,255,255,.15));
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--am-text-muted, #888);
    gap: .5rem;
}
.webdesign-showcase .wd-mockup__placeholder i { font-size: 2.5rem; opacity: .6; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.webdesign-showcase .wd-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--am-text, #ccc);
}
.webdesign-showcase .wd-empty i {
    font-size: 3rem;
    opacity: .35;
}

/* ── Accessibility: respect reduced motion ─────────────────────────────── */
/* The hover transitions are deliberate UX feedback and stay on for all users.
   Only the smooth-scroll behaviour and the infinite glow pulse get suppressed
   for users with `prefers-reduced-motion: reduce` — those are continuous
   motion that can trigger vestibular discomfort. */
@media (prefers-reduced-motion: reduce) {
    .webdesign-showcase .wd-screen__scroll { scroll-behavior: auto; }
    .webdesign-showcase .wd-case:hover .wd-case__visual::before {
        animation: none !important;
    }
}

/* ── Mobile / touch — flatten tilt for legibility on small screens ─────── */
@media (max-width: 700px) {
    .webdesign-showcase .wd-device--desktop {
        transform: none;
    }
    .webdesign-showcase .wd-device--mobile {
        right: 2%;
        bottom: -6%;
        width: 26%;
        transform: rotateY(-10deg) translateZ(60px);
    }
    .webdesign-showcase .wd-hero__meta {
        justify-content: flex-start;
        gap: 1.5rem;
    }
}
