/* appshift.xyz home: the studio page. Loads after /appshift.css (and /mivu/styles.css for the
   Mivu screens in the showcase). Showcase and author block follow playbook.appshift.xyz. */

/* Hero: centred, like the playbook */
.home-hero { position: relative; display: grid; justify-items: center; text-align: center; padding: 104px 0 56px; }
.home-hero h1 { font-size: clamp(46px, 7vw, 84px); margin: 22px 0 18px; max-width: 900px; }
.home-hero .lead { font-size: 19px; color: var(--muted); max-width: 600px; }
.home-hero .hero-cta { justify-content: center; }
.home-hero .trust { justify-content: center; }

/* ─── App showcase ─────────────────────────────────────────────────────────────── */
.showcase { display: flex; flex-direction: column; gap: 18px; }
.stage {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center;
  padding: 26px; border-radius: 32px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-soft); animation: stage-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.stage[hidden] { display: none; }
@keyframes stage-in { from { opacity: 0; transform: translateY(10px); } }
.stage-visual {
  position: relative; height: 440px; border-radius: 24px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--highlight-strong), transparent), var(--tone-bg);
}
.stage-glow { position: absolute; inset: 20% 10%; border-radius: 50%; background: var(--tone-fg); opacity: 0.18; filter: blur(60px); }
.shots { position: absolute; inset: 0; }
.sshot {
  position: absolute; bottom: -60px; left: 50%; width: 200px; aspect-ratio: 600 / 1299;
  border-radius: 26px; overflow: hidden; object-fit: cover; background: #0b0a12;
  box-shadow: 0 0 0 1px var(--highlight), 0 40px 60px -30px rgba(var(--shadow-ink), 0.55);
  transform: translateX(calc(-50% + (var(--n) - 1) * 150px)) rotate(calc((var(--n) - 1) * 5deg)) translateY(calc(var(--n) * -14px + 20px));
  animation: shot-in 0.7s calc(var(--n) * 90ms) cubic-bezier(0.2, 0.7, 0.2, 1) both;
  z-index: calc(3 - var(--n));
}
.sshot:nth-child(2) { z-index: 3; transform: translateX(-50%) translateY(6px); }
.sshot:nth-child(3) { z-index: 1; }
@keyframes shot-in { from { opacity: 0; transform: translateX(calc(-50% + (var(--n) - 1) * 150px)) translateY(60px); } }
/* Mivu's shots are the live HTML screens from its own page */
.sshot-app .screen { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.stage-metric {
  position: absolute; left: 18px; top: 18px; z-index: 5; display: flex; flex-direction: column;
  padding: 12px 16px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); box-shadow: var(--shadow-float);
}
.stage-metric strong { font-size: 34px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: var(--tone-fg); font-variant-numeric: tabular-nums; }
.stage-metric span { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.stage-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-right: 12px; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.byline img { flex: none; width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.byline > span { display: flex; flex-direction: column; line-height: 1.25; }
.byline strong { font-size: 15px; color: var(--foreground); }
.stage-copy h3 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; }
.stage-copy p { font-size: 17px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.stage-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* One row always: five tabs share the width on desktop; on narrow screens the row scrolls
   sideways (snapping, no scrollbar) instead of wrapping. Padding keeps the hover lift and the
   active ring from being clipped by the scroll container. */
.app-tabs {
  position: relative; display: flex; gap: 10px; justify-content: safe center; padding: 4px; margin: -4px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.app-tabs::-webkit-scrollbar { display: none; }
.app-tabs > .app-tab { flex: 1 1 0; min-width: 156px; max-width: 200px; scroll-snap-align: start; }
.app-tab {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; overflow: hidden;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--foreground);
  font: inherit; text-align: left; cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
}
.app-tab:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.app-tab.active { border-color: var(--tone-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone-fg) 16%, transparent); }
.app-tab img { flex: none; width: 36px; height: 36px; border-radius: 11px; }
.app-tab > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.app-tab strong { font-size: 13px; font-weight: 600; }
.app-tab em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--tone-fg); }
.tab-progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--tone-fg); transform: scaleX(0); transform-origin: left; }
.app-tab.active .tab-progress { animation: tab-progress 7s linear forwards; }
.showcase.is-paused .tab-progress { animation: none; transform: scaleX(0); }
@keyframes tab-progress { to { transform: scaleX(1); } }
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; gap: 24px; padding: 16px; }
  .stage-visual { height: 380px; }
  .stage-copy { padding: 0 8px 8px; }
}
@media (max-width: 520px) { .sshot { width: 160px; } }

/* Studio principles */
#studio .steps .step h3 { margin-top: 4px; }
.tone-sky .step-ic { color: var(--sky-fg); }

/* ─── About: portrait, three sentences and the stack drifting around (as on the playbook) */
.author { position: relative; padding: 72px 16px 64px; overflow: clip; }
.author-scatter { position: absolute; inset: 0; pointer-events: none; }
.author-chip {
  position: absolute; left: var(--x); top: var(--y); display: inline-flex; align-items: center; justify-content: center;
  width: var(--size); height: var(--size); border-radius: calc(var(--size) / 3.2); background: var(--surface);
  box-shadow: 0 1px 0 var(--highlight) inset, 0 10px 26px -12px rgba(var(--shadow-ink), 0.4);
  transform: translate(-50%, -50%) rotate(var(--rot));
  animation: drift-chip var(--dur) ease-in-out var(--delay) infinite alternate;
}
.author-chip img { width: 62%; height: 62%; object-fit: cover; border-radius: 26%; }
@keyframes drift-chip { to { transform: translate(-50%, calc(-50% - 12px)) rotate(calc(var(--rot) * -0.55)); } }
.author-inner { position: relative; z-index: 1; width: min(560px, 100%); margin: 0 auto; text-align: center; }
.author-photo {
  display: block; margin: 0 auto; width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--background), 0 0 0 5px var(--border), 0 18px 40px -18px rgba(var(--shadow-ink), 0.45);
}
.author-x { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.author-x:hover { color: var(--accent); }
.author-inner h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.03em; margin: 16px 0 12px; }
.author-inner p { font-size: 16.5px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.author-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; }
.author-link {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 16px; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.author-link:hover { background: var(--elevated); color: var(--foreground); transform: translateY(-1px); }
.author-link > img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; background: var(--elevated); }
.author-inner .author-note { margin-top: 12px; font-size: 13px; line-height: 1.5; font-style: italic; color: var(--faint); }
.author-tip {
  position: absolute; bottom: calc(100% + 12px); left: 50%; z-index: 3; display: flex; flex-direction: column; gap: 10px;
  width: 288px; padding: 14px 16px 15px; border-radius: 18px; text-align: left; color: var(--foreground);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow: 0 1px 0 var(--highlight) inset, 0 28px 60px -22px rgba(var(--shadow-ink), 0.5);
  opacity: 0; pointer-events: none; transform: translate(-50%, 8px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.32s cubic-bezier(0.22, 1.4, 0.4, 1);
}
.author-tip::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(150px 90px at 14% 0%, var(--tone-bg), transparent 70%); opacity: 0.85; pointer-events: none; }
.author-tip > * { position: relative; }
.author-tip-head { display: flex; align-items: center; gap: 10px; }
.author-tip-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px;
  font-size: 20px; color: var(--tone-fg); background: var(--tone-bg); box-shadow: 0 1px 0 var(--highlight) inset;
  transform: scale(0.82) rotate(-6deg); transition: transform 0.4s cubic-bezier(0.22, 1.4, 0.4, 1) 0.06s;
}
.author-tip-kind { flex: 1; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tone-fg); }
.author-tip-head > .i { font-size: 14px; color: var(--faint); }
.author-tip-text { font-size: 14px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.author-tip::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; border-radius: 2px;
  background: var(--glass-strong); border-right: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);
  transform: translateX(-50%) rotate(45deg);
}
.author-link:hover .author-tip, .author-link:focus-visible .author-tip { opacity: 1; transform: translate(-50%, 0) scale(1); }
.author-link:hover .author-tip-icon, .author-link:focus-visible .author-tip-icon { transform: scale(1) rotate(0deg); }
@media (max-width: 1040px) { .author-chip { --size: 34px; } }
@media (max-width: 1180px) { .author { padding: 40px 16px; } .author-chip { display: none; } }

/* Playbook CTA */
.playbook-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px; margin: 24px 0 72px; border-radius: 32px; background: var(--elevated); }
.playbook-cta h2 { font-size: clamp(26px, 3vw, 34px); margin: 10px 0 8px; }
.playbook-cta p { color: var(--muted); max-width: 520px; }
.playbook-cta .button { flex: none; }
@media (max-width: 720px) { .playbook-cta { flex-direction: column; align-items: flex-start; padding: 28px; } }
