/*
 * Workspace, grown into a site: the fly-up features menu, the free-for-everyone
 * section, and the feature pages at /features/{slug}. Loaded after workspace.css.
 */

/* Header actions ------------------------------------------------------- */

.ws-header .ws-btn { margin-left: 0; }
.ws-header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ws-nav { margin-right: 0; align-items: center; }

.ws-coffee-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #fcd98a;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.ws-coffee-link:hover { background: rgba(252, 217, 138, 0.1); color: #ffe7b0; }
.ws-coffee-link:hover .ficon { transform: rotate(-12deg) translateY(-1px); }
.ws-coffee-link .ficon { transition: transform 0.35s var(--ease); }

/* Menu trigger */
.ws-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--body);
    font: 500 14px/1.2 var(--sans);
    transition: color 0.25s, background 0.25s;
}
.ws-menu-trigger svg { transition: transform 0.35s var(--ease); }
.ws-menu-trigger:hover, .ws-menu-trigger[aria-expanded="true"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.ws-menu-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.ws-burger { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.06); position: relative; }
.ws-burger span { position: absolute; left: 12px; width: 16px; height: 2px; padding: 0; border-radius: 2px; background: var(--text); transition: transform 0.35s var(--ease), top 0.35s var(--ease); }
.ws-burger span:first-child { top: 15px; }
.ws-burger span:last-child { top: 23px; }
.ws-burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.ws-burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* The fly-up panel ------------------------------------------------------ */

.ws-menu-panel {
    position: fixed;
    left: 0;
    right: 0;
    top: 68px;
    z-index: 120;
    padding: 10px 0 0;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transform-origin: 50% 0;
    transition: opacity 0.32s var(--ease), transform 0.45s var(--ease);
    pointer-events: none;
}
.ws-menu-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.ws-menu-panel[hidden] { display: block; visibility: hidden; }
.ws-menu-panel.is-open[hidden], .ws-menu-panel.is-open { visibility: visible; }

.ws-menu-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(21, 23, 29, 0.94);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    box-shadow: 0 0 0 1px var(--line-2) inset, 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 80px -30px rgba(109, 139, 255, 0.35);
}
.ws-menu-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; }
.ws-menu-group-title { margin: 8px 12px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ws-menu-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.ws-menu-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: background 0.25s, box-shadow 0.25s, opacity 0.45s var(--ease), transform 0.5s var(--ease);
    transition-delay: 0s, 0s, calc(var(--n, 0) * 28ms), calc(var(--n, 0) * 28ms);
}
.ws-menu-panel.is-open .ws-menu-item { opacity: 1; transform: none; }
.ws-menu-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(109, 139, 255, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}
.ws-menu-item:hover, .ws-menu-item:focus-visible { background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--line-2) inset; }
.ws-menu-item:hover::before, .ws-menu-item:focus-visible::before { opacity: 1; }
.ws-menu-item.is-current { box-shadow: 0 0 0 1px rgba(109, 139, 255, 0.5) inset; background: rgba(109, 139, 255, 0.08); }
.ws-menu-icon {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--s2);
    color: var(--accent-2);
    box-shadow: 0 0 0 1px var(--line) inset;
    transition: transform 0.35s var(--ease), color 0.25s, background 0.25s;
}
.ws-menu-item:hover .ws-menu-icon { transform: translateY(-2px) rotate(-4deg); color: #fff; background: rgba(109, 139, 255, 0.35); }
.ws-menu-text { position: relative; display: grid; gap: 2px; }
.ws-menu-text strong { color: var(--text); font-size: 14px; font-weight: 600; }
.ws-menu-text small { color: var(--muted); font-size: 13px; line-height: 1.4; }

.ws-menu-promo {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border-radius: 14px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(109, 139, 255, 0.28), transparent 60%),
        radial-gradient(90% 70% at 0% 100%, rgba(52, 211, 153, 0.18), transparent 60%),
        var(--s2);
    box-shadow: 0 0 0 1px var(--line-2) inset;
}
.ws-menu-promo-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: #ff9fbf; }
.ws-menu-promo strong { color: var(--text); font: 500 20px/1.2 var(--head); letter-spacing: -0.02em; }
.ws-menu-promo p { margin: 0; font-size: 14px; line-height: 1.55; }
.ws-menu-promo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.ws-menu-mobile-links { display: none; }

.ws-menu-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(5, 6, 9, 0.5); opacity: 0; transition: opacity 0.35s; }
.ws-menu-scrim.is-open { opacity: 1; }
.ws-menu-scrim[hidden] { display: block; visibility: hidden; }
.ws-menu-scrim.is-open { visibility: visible; }

@media (max-width: 1180px) {
    .ws-menu-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .ws-burger { display: inline-block; }
    .ws-header-actions .ws-coffee-link span { display: none; }
    .ws-menu-panel {
        top: auto;
        bottom: 0;
        max-height: calc(100dvh - 76px);
        overflow-y: auto;
        padding: 0;
        transform: translateY(100%);
        transition: opacity 0.3s var(--ease), transform 0.55s var(--ease);
    }
    .ws-menu-panel .ws-wrap { width: 100%; }
    .ws-menu-grid { grid-template-columns: minmax(0, 1fr); border-radius: 22px 22px 0 0; padding: 18px 14px 110px; }
    .ws-menu-mobile-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .ws-menu-mobile-links a { padding: 12px 14px; border-radius: 12px; background: var(--s2); color: var(--text); text-decoration: none; font-size: 15px; box-shadow: 0 0 0 1px var(--line) inset; }
}
@media (max-width: 620px) {
    .ws-menu-groups { grid-template-columns: minmax(0, 1fr); }
}

/* "Explore" links in the bento ------------------------------------------ */

.ws-card-more {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--accent-2);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.ws-card-more span { display: inline-block; transition: transform 0.35s var(--ease); }
.ws-card-more:hover span, .ws-card:hover .ws-card-more span { transform: translateX(5px); }
.ws-card-more::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ws-card { position: relative; cursor: pointer; }

/* Free for everyone ------------------------------------------------------ */

.ws-free-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px 64px;
    padding: clamp(28px, 5vw, 64px);
    border-radius: 28px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, var(--s1), #11131a);
    box-shadow: 0 0 0 1px var(--line-2) inset, 0 40px 90px -40px rgba(0, 0, 0, 0.8);
}
.ws-free-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 20%), rgba(109, 139, 255, 0.14), transparent 65%);
    transition: opacity 0.4s;
}
.ws-free-glow {
    position: absolute;
    z-index: -2;
    right: -12%;
    top: -40%;
    width: 60%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.22), rgba(109, 139, 255, 0.12) 45%, transparent 70%);
    filter: blur(20px);
}
.ws-free-copy h2 { margin: 10px 0 18px; }
.ws-free-copy p + p { margin-top: 14px; }
.ws-free-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
.ws-free-points li {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    box-shadow: 0 0 0 1px var(--line) inset;
    transition: transform 0.4s var(--ease), box-shadow 0.3s, background 0.3s;
}
.ws-free-points li:hover { transform: translateX(6px); background: rgba(255, 255, 255, 0.045); box-shadow: 0 0 0 1px rgba(109, 139, 255, 0.4) inset; }
.ws-free-points li > span { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(109, 139, 255, 0.14); color: var(--accent-2); }
.ws-free-points strong { display: block; color: var(--text); font-weight: 600; font-size: 16px; }
.ws-free-points p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; }
.ws-free-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 8px; border-top: 1px solid var(--line); padding-top: 28px; }
.ws-btn--coffee { background: linear-gradient(180deg, #ffd978, #f5b93f); color: #2a1a02; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset, 0 10px 28px -10px rgba(245, 185, 63, 0.75); }
.ws-btn--coffee:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 16px 36px -10px rgba(245, 185, 63, 0.9); }
.ws-free-note { margin: 0; font-size: 14px; color: var(--muted); flex: 1 1 260px; }

@media (max-width: 900px) {
    .ws-free-card { grid-template-columns: minmax(0, 1fr); }
}

/* Feature pages ---------------------------------------------------------- */

.wf-hero { position: relative; padding: 64px 0 40px; overflow: clip; isolation: isolate; text-align: center; }
.wf-hero .ws-hero-grid { -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 20%, transparent 75%); }
.wf-crumbs { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.wf-crumbs a { color: var(--body); text-decoration: none; }
.wf-crumbs a:hover { color: var(--text); }
.wf-badge {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 28px auto 22px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(160deg, rgba(109, 139, 255, 0.7), rgba(109, 139, 255, 0.15));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 20px 50px -18px rgba(109, 139, 255, 0.9);
}
.wf-hero h1 { max-width: 900px; margin: 0 auto; font-size: clamp(38px, 6vw, 72px); line-height: 1.04; letter-spacing: -0.045em; }
.wf-lede { max-width: 700px; margin: 22px auto 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; }
.wf-hero .ws-hero-cta { justify-content: center; margin-top: 32px; }
.wf-stage { position: relative; margin-top: 56px; perspective: 1600px; }
.wf-stage-glow { position: absolute; left: 10%; right: 10%; bottom: -12%; height: 60%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(109, 139, 255, 0.45), rgba(52, 211, 153, 0.12) 60%, transparent); filter: blur(30px); }
.wf-stage-frame {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    box-shadow: 0 0 0 1px var(--line-2) inset;
    transform-origin: 50% 0;
    transform: rotateX(calc(max(0, 0.5 - var(--p, 1)) * 44deg)) translateY(calc(max(0, 0.5 - var(--p, 1)) * 60px));
    transition: transform 0.1s linear;
}
.wf-float {
    position: absolute;
    z-index: 3;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(27, 30, 38, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 0 1px var(--line-2) inset, 0 20px 40px -18px rgba(0, 0, 0, 0.8);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.wf-float i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.wf-float--a { left: 2%; top: 18%; }
.wf-float--b { right: 1%; top: 42%; }
.wf-float--c { left: 6%; bottom: 10%; }

/* Highlights */
.wf-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.wf-hl {
    position: relative;
    padding: 24px;
    border-radius: 18px;
    background: var(--s1);
    box-shadow: 0 0 0 1px var(--line) inset;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.3s;
}
.wf-hl::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(109, 139, 255, 0.16), transparent 65%); opacity: 0; transition: opacity 0.3s; }
.wf-hl:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(109, 139, 255, 0.45) inset, 0 24px 50px -24px rgba(109, 139, 255, 0.55); }
.wf-hl:hover::before { opacity: 1; }
.wf-hl b { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(109, 139, 255, 0.15); color: var(--accent-2); font-size: 14px; margin-bottom: 16px; }
.wf-hl h3 { position: relative; font-size: 18px; }
.wf-hl p { position: relative; margin-top: 8px; font-size: 15px; line-height: 1.6; }

/* Scenes: alternating copy + big "screenshot" */
.wf-scenes { display: grid; gap: clamp(80px, 12vw, 160px); }
.wf-scene { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.wf-scene:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.wf-scene:nth-child(even) .wf-scene-copy { order: 2; }
.wf-scene-num { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-2); font: 600 14px var(--sans); }
.wf-scene-num::after { content: ""; width: 48px; height: 1px; background: linear-gradient(90deg, var(--accent-2), transparent); }
.wf-scene-copy h2 { margin: 14px 0 16px; font-size: clamp(28px, 3.2vw, 40px); }
.wf-scene-copy ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.wf-scene-copy li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.wf-scene-copy li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 6px; background: rgba(52, 211, 153, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5 9.2 2.6 2.6L13 6.5' fill='none' stroke='%2334d399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

.wf-shot { position: relative; perspective: 1400px; }
.wf-shot-back {
    position: absolute;
    inset: 8% -6% -8% 8%;
    z-index: -1;
    border-radius: 28px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 32px 32px,
        radial-gradient(80% 80% at 70% 30%, color-mix(in srgb, var(--tint, #6d8bff) 38%, transparent), transparent 70%);
    box-shadow: 0 0 0 1px var(--line) inset;
}
.wf-scene:nth-child(even) .wf-shot-back { inset: 8% 8% -8% -6%; }
.wf-shot-frame {
    transform: rotateY(calc((0.5 - var(--p, 0.5)) * 14deg)) rotateX(calc((0.5 - var(--p, 0.5)) * -8deg));
    transform-style: preserve-3d;
    transition: transform 0.15s linear;
}
.wf-scene:nth-child(even) .wf-shot-frame { transform: rotateY(calc((0.5 - var(--p, 0.5)) * -14deg)) rotateX(calc((0.5 - var(--p, 0.5)) * -8deg)); }
.wf-shot .aw { transition: box-shadow 0.4s var(--ease), transform 0.5s var(--ease); }
.wf-shot:hover .aw { transform: translateY(-6px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tint, #6d8bff) 60%, transparent), 0 50px 90px -30px color-mix(in srgb, var(--tint, #6d8bff) 55%, transparent); }
.wf-shot-tag {
    position: absolute;
    z-index: 3;
    right: -10px;
    bottom: -18px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--s2);
    box-shadow: 0 0 0 1px var(--line-2) inset, 0 20px 40px -18px rgba(0, 0, 0, 0.8);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}
.wf-scene:nth-child(even) .wf-shot-tag { right: auto; left: -10px; }

/* Details */
.wf-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: 20px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.wf-detail { padding: 26px; background: var(--bg); transition: background 0.3s; }
.wf-detail:hover { background: var(--s1); }
.wf-detail h3 { font-size: 17px; }
.wf-detail p { margin-top: 6px; font-size: 15px; line-height: 1.6; }
.wf-detail code { color: var(--accent-2); }

/* Related */
.wf-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wf-rel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 26px;
    border-radius: 18px;
    background: var(--s1);
    box-shadow: 0 0 0 1px var(--line) inset;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.3s;
}
.wf-rel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(109, 139, 255, 0.18), transparent 65%); opacity: 0; transition: opacity 0.3s; }
.wf-rel:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(109, 139, 255, 0.5) inset, 0 30px 60px -30px rgba(109, 139, 255, 0.6); }
.wf-rel:hover::before { opacity: 1; }
.wf-rel > * { position: relative; }
.wf-rel .ws-menu-icon { width: 44px; height: 44px; }
.wf-rel strong { color: var(--text); font: 500 20px/1.25 var(--head); letter-spacing: -0.02em; }
.wf-rel span { font-size: 15px; }
.wf-rel em { margin-top: auto; padding-top: 10px; font-style: normal; color: var(--accent-2); font-size: 14px; font-weight: 600; }

/* Pager */
.wf-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wf-pager a { display: grid; gap: 4px; padding: 22px 24px; border-radius: 16px; text-decoration: none; box-shadow: 0 0 0 1px var(--line) inset; transition: background 0.3s, box-shadow 0.3s, transform 0.4s var(--ease); }
.wf-pager a:hover { background: var(--s1); box-shadow: 0 0 0 1px var(--line-2) inset; }
.wf-pager a:first-child:hover { transform: translateX(-4px); }
.wf-pager a:last-child { text-align: right; }
.wf-pager a:last-child:hover { transform: translateX(4px); }
.wf-pager small { font-size: 13px; color: var(--muted); }
.wf-pager strong { color: var(--text); font-size: 17px; font-weight: 600; }

@media (max-width: 1024px) {
    .wf-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wf-scene, .wf-scene:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
    .wf-scene:nth-child(even) .wf-scene-copy { order: 0; }
    .wf-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wf-related { grid-template-columns: minmax(0, 1fr); }
    .wf-float { display: none; }
}
@media (max-width: 620px) {
    .wf-highlights, .wf-details, .wf-pager { grid-template-columns: minmax(0, 1fr); }
    .wf-pager a:last-child { text-align: left; }
    .wf-shot-tag { right: 8px; }
    .wf-scene:nth-child(even) .wf-shot-tag { left: 8px; }
    .wf-shot-back { inset: 6% -3% -6% 3%; }
}

@media (prefers-reduced-motion: reduce) {
    .wf-stage-frame, .wf-shot-frame, .wf-scene:nth-child(even) .wf-shot-frame { transform: none; }
    .ws-menu-item { opacity: 1; transform: none; }
}

.ws-section-gap { margin-top: 48px; }
