/* "On a desktop": five working websites in one monitor. Uses the site's own tokens. */
.sites { width: min(100%, 960px); display: grid; justify-items: center; gap: 28px; }
.sites h4, .sites h5, .sites p, .sites ul, .cs h4, .cs p, .cs ul { margin: 0; }

/* tabs */
.site-tabs { display: none; flex-wrap: wrap; justify-content: center; gap: 10px; }
.js .site-tabs { display: flex; }
.site-tab {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px 0 16px;
  border: 2px solid transparent; border-radius: 999px; background: var(--ground-3); color: var(--ink);
  font: 600 var(--t-s)/1 var(--text); cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .16s var(--ease-out);
}
.site-tab i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 2px var(--ground-3); }
.site-tab[aria-selected="true"] { border-color: var(--c); background: var(--ground-2); }
.site-tab:active { transform: scale(.97); }
.site-tab:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .site-tab:hover { background: var(--ground-2); } }

/* the monitor: the live site is laid out at a real 1280 px desktop width, then scaled to fit the screen */
.sites-monitor { width: min(100%, 900px); animation: none; }
.sites-monitor .monitor-screen { transition: background-color .35s; }
.sites-view { position: relative; aspect-ratio: 1280 / 752; overflow: hidden; border-radius: 10px; background: #111; --k: .6; }
.sites-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .4s; }
.sites-frame {
  position: absolute; left: 0; top: 0; width: 1280px; height: 752px; border: 0; background: #111;
  transform: scale(var(--k)); transform-origin: 0 0; opacity: 0; transition: opacity .4s; pointer-events: none;
}
.sites-view.is-live .sites-frame { opacity: 1; }
.sites-view.is-live .sites-poster { opacity: 0; }
.sites-view.is-active .sites-frame { pointer-events: auto; }
.sites-use {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 0; z-index: 2;
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--ink-dark); font: 650 var(--t-s)/1 var(--text); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: background-color .2s, transform .16s var(--ease-out), opacity .2s;
}
.sites-use:active { transform: scale(.97); }
.sites-use:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .sites-use:hover { background: var(--accent-2); } }
.sites-view.is-active .sites-use { opacity: 0; pointer-events: none; }

/* the story under the monitor */
.site-panels { width: 100%; display: grid; gap: 48px; }
.site-panel { display: grid; gap: 22px; padding-top: 6px; }
.js .site-panel[hidden] { display: none; }
.site-panel:focus-visible { outline: 3px solid var(--yellow); outline-offset: 6px; border-radius: 12px; }
.site-head { display: grid; gap: 4px; justify-items: center; text-align: center; }
.site-head h4 { font: 600 var(--t-m)/1.05 var(--display); letter-spacing: -.02em; }
.site-kind { color: var(--ink-2); font-size: 1.0625rem; }
.site-cols { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); text-align: left; }
.site-col { display: grid; gap: 8px; align-content: start; }
.site-col h4, .site-col h5 { font: 600 1.125rem/1.2 var(--display); color: var(--accent-2); margin-top: 10px; }
.site-col h4:first-child, .site-col h5:first-child { margin-top: 0; }
.site-col p, .site-col li { font-size: var(--t-body); line-height: 1.5; max-width: 52ch; }
.site-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.site-col li { padding-left: 22px; position: relative; }
.site-col li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.site-proof { text-align: center; color: var(--ink-2); font-size: var(--t-s); }
.site-actions { display: flex; justify-content: center; }

@media (max-width: 760px) {
  .site-cols { grid-template-columns: minmax(0, 1fr); }
  .site-tab { padding: 0 16px 0 12px; min-height: 44px; }
  .sites { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sites-poster, .sites-frame, .site-tab, .sites-use { transition: none; }
}

/* Physical Design: the case study under the concepts row */
.cs { gap: 22px; }
.cs .work-meta { margin-top: -4px; }
.cs .site-actions { gap: 12px 16px; flex-wrap: wrap; }

/* contact block at the end of the page */
.end-open { color: var(--ink); font-size: clamp(1rem, 1.2vw, 1.1875rem); }
.end-links { display: flex; justify-content: center; gap: 8px 28px; flex-wrap: wrap; }
.end-links a { color: var(--ink); font-weight: 600; text-underline-offset: 5px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; min-height: 44px; display: inline-flex; align-items: center; }
.end-facts { width: min(100%, 560px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px clamp(24px, 4vw, 56px); text-align: center; justify-items: center; margin-top: 12px; }
.end-facts h3 { font: 600 1.125rem/1.2 var(--display); color: var(--accent-2); margin: 0 0 6px; }
.end-facts p { max-width: 44ch; color: var(--ink-2); font-size: var(--t-s); line-height: 1.55; margin: 0 auto; }
@media (max-width: 720px) { .end-facts { grid-template-columns: minmax(0, 1fr); } }

/* keep the big name's descenders (the y and the g) off the line under it */
.end-name { margin-bottom: .2em; }
.end-role { margin-top: 0; }
@media (max-width: 720px) { .end-name { margin-bottom: .1em; } }
