/* Sites We Built: four live client cases, each with its real piece running on the page */
.sw { padding-block: clamp(80px, 12vh, 150px); border-top: 1px solid var(--rule-soft); background: var(--ink-0); }
.sw-head { max-width: 760px; margin-bottom: clamp(48px, 8vh, 96px); }
.sw-lede { color: var(--fg-2); font-size: var(--t-m); line-height: 1.45; margin-top: 22px; max-width: 620px; }

.sw-case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding-block: clamp(48px, 8vh, 96px); border-top: 1px solid var(--rule-soft); }
.sw-case:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.sw-case:nth-of-type(even) .sw-copy { order: 2; }
.sw-num { font: 400 var(--t-xs)/1 var(--f-mono); letter-spacing: .14em; color: var(--fg-3); }
.sw-name { font: 900 var(--t-xl)/1 var(--f-display); letter-spacing: -0.025em; margin: 18px 0 16px; }
.sw-line { color: var(--fg-2); font-size: var(--t-s); line-height: 1.55; max-width: 460px; }
.sw-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; padding: 0; list-style: none; }
.sw-tags li { font: 400 var(--t-xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px; border: 1px solid var(--rule); color: var(--fg-2); border-radius: 999px; }
.sw-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.sw-visit { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 4px; }
.sw-visit:hover { color: var(--accent); }
.sw-visit::after { content: "\2197"; color: var(--accent); }
.sw-more { color: var(--fg-2); text-decoration: none; font-size: var(--t-s); }
.sw-more:hover { color: var(--fg); }

/* the stage: a framed screen with tabs; the phone sits over its corner */
.sw-stage { position: relative; padding-bottom: 48px; }
.sw-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--ink-1); border: 1px solid var(--rule-soft); box-shadow: 0 40px 80px -30px rgb(0 0 0 / .7); }
.sw-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; background: var(--ink-2); border-bottom: 1px solid var(--rule-soft); }
.sw-dots { display: flex; gap: 6px; }
.sw-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.sw-url { flex: 1; min-width: 0; font: 400 12px/1 var(--f-mono); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-tabs { display: flex; gap: 4px; }
.sw-tab { font: 400 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); background: none; border: 1px solid transparent; padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.sw-tab[aria-selected="true"] { color: var(--fg); border-color: var(--rule); background: var(--ink-1); }
.sw-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.sw-pane { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s; }
.sw-pane.on { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.sw-pane iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--ink-0); }
.sw-pane > img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* a live desktop site rendered at full size, scaled to the frame */
.sw-fit iframe { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; transform: scale(var(--k, .5)); }
.sw-hint { position: absolute; left: 14px; bottom: 12px; font: 400 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); background: rgb(0 0 0 / .45); padding: 7px 10px; border-radius: 999px; pointer-events: none; backdrop-filter: blur(6px); }
.sw-hint.top { top: 12px; bottom: auto; }
.sw-hint.dark { color: var(--paper-ink-2); background: rgb(255 255 255 / .6); }

/* long page that scrolls itself inside the frame */
.sw-scroll { position: absolute; inset: 0; overflow: hidden; }
.sw-scroll img { width: 100%; display: block; transform: translateY(0); transition: transform 14s linear; }
.sw-case.in .sw-scroll img { transform: translateY(var(--travel, -70%)); }

/* still with a slow push-in */
.sw-still { animation: sw-push 18s var(--ease) infinite alternate; }
@keyframes sw-push { from { transform: scale(1); } to { transform: scale(1.06); } }

.sw-phone { position: absolute; right: -14px; bottom: 0; width: clamp(110px, 17%, 170px); aspect-ratio: 390 / 844; border-radius: 22px; overflow: hidden; border: 5px solid #111; background: #111; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .8); }
.sw-case:nth-of-type(even) .sw-phone { right: auto; left: -14px; }
.sw-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* Shukria 3D */
.sw-3d { position: absolute; inset: 0; background: radial-gradient(120% 90% at 70% 40%, #f3e9f6 0%, #e6d9ee 55%, #d9c8e6 100%); cursor: grab; touch-action: pan-y; }
.sw-3d:active { cursor: grabbing; }
.sw-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.sw-devs { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 6px; }
.sw-dev { font: 400 11px/1 var(--f-mono); color: var(--paper-ink-2); background: rgb(255 255 255 / .7); border: 1px solid transparent; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.sw-dev[aria-pressed="true"] { background: #fff; color: var(--paper-ink); border-color: #b48ac9; }
.sw-load { position: absolute; inset: 0; display: grid; place-items: center; font: 400 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--paper-ink-2); pointer-events: none; transition: opacity .4s; }
.sw-load.gone { opacity: 0; }

@media (max-width: 860px) {
  .sw-case, .sw-case:nth-of-type(even) { grid-template-columns: 100%; }
  .sw-case:nth-of-type(even) .sw-copy { order: 0; }
  .sw-stage { padding-bottom: 72px; }
  .sw-phone { right: 10px; width: 78px; border-width: 3px; border-radius: 13px; }
  .sw-bar { gap: 8px; padding: 0 10px; }
  .sw-tab { padding: 6px 8px; font-size: 10px; }
  .sw-view { aspect-ratio: 4 / 3.4; }
  .sw-case:nth-of-type(even) .sw-phone { left: auto; right: 8px; }
  .sw-bar .sw-url { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-scroll img { transition: none; }
  .sw-case.in .sw-scroll img { transform: none; }
  .sw-still { animation: none; }
}
